0
我使用iperf的版本2.0.5测试两个机器(这两种运行Linux的Debian 8)之间TCP带宽。我使用双测试在-d, --dualtest
选项的帮助下测量双向带宽,并且我有一个可以抓取测试结果(使用正则表达式)的python包装器,并且我依赖于iperf报告输出中两个结果的出现顺序。的iperf 2.0.5 TCP双向测试输出无序
但是,报告的结果不断变化的顺序,因为没有出现任何原因。 他们会出现一次这样的:
Client connecting to ServerIP, TCP port 5002
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
[ 5] local ClientIP port 53653 connected with ServerIP port 5002
[ 4] local ClientIP port 5002 connected with ServerIP port 46306
[ ID] Interval Transfer Bandwidth
[ 5] 0.0-10.6 sec 3.00 MBytes 2.36 Mbits/sec
[ 4] 0.0-10.7 sec 40.8 MBytes 32.0 Mbits/sec
等次这样的:
Client connecting to ServerIP, TCP port 5002
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
[ 5] local ClientIP port 54043 connected with ServerIP port 5002
[ 4] local ClientIP port 5002 connected with ServerIP port 46372
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.7 sec 40.8 MBytes 32.0 Mbits/sec
[ 5] 0.0-10.7 sec 3.00 MBytes 2.36 Mbits/sec
我已经解决我的包装的代码来承担第二个,它包含在最后的预期更高的带宽线路和线路中的其他带宽。
- 如何强制iperf报告的某个输出顺序?
- 为什么它使用
4
和5
作为ID? - 有没有办法决定什么 号码用于ID?因为他们似乎从 一个测试改变到另一个测试。也就是说,它使用
6
和7
例如当 它运行在不同的时间或从不同的机器。
这是我在客户机上运行的iperf:
iperf -c ServerIP -d -p 5002 -f m
,这是服务器计算机上:
iperf -s -p 5002 -D