【发布时间】:2016-08-29 17:51:01
【问题描述】:
我正在使用 iperf 版本 2.0.5 来测试两台机器之间的 TCP 带宽(都运行 Linux Debian 8)。我正在使用双重测试在-d, --dualtest 选项的帮助下测量双向带宽,并且我有一个抓取测试结果的python 包装器(使用正则表达式),并且我依赖于 iperf 报告输出中两个结果的出现顺序。
但是,报告的结果不断改变出现的顺序,没有明显的原因。 它们会像这样出现一次:
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
【问题讨论】:
标签: networking tcp server bandwidth iperf