利用iperf测试服务器之间的网络带宽

1:下载安装(以ubuntu为例)

sudo wget -O /usr/lib/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3
sudo wget -O /usr/bin/iperf3 https://iperf.fr/download/ubuntu/iperf3_3.1.3
sudo chmod +x /usr/bin/iperf3

2:测试
A服务器执行(内网IP为172.26.22.201)
iperf3 -s
B服务器上执行
iperf3 -s 172.26.22.201
结果为:

Connecting to host 172.26.22.201, port 5201
[  4] local 172.26.29.32 port 53560 connected to 172.26.22.201 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   117 MBytes   984 Mbits/sec   42    454 KBytes       
[  4]   1.00-2.00   sec   112 MBytes   939 Mbits/sec   34    315 KBytes       
[  4]   2.00-3.00   sec   115 MBytes   965 Mbits/sec   38    437 KBytes       
[  4]   3.00-4.00   sec   111 MBytes   931 Mbits/sec   28    341 KBytes       
[  4]   4.00-5.00   sec   115 MBytes   965 Mbits/sec   36    332 KBytes       
[  4]   5.00-6.00   sec   114 MBytes   960 Mbits/sec   29    428 KBytes       
[  4]   6.00-7.00   sec   115 MBytes   963 Mbits/sec   38    385 KBytes       
[  4]   7.00-8.00   sec   115 MBytes   963 Mbits/sec   39    358 KBytes       
[  4]   8.00-9.00   sec   113 MBytes   950 Mbits/sec   38    306 KBytes       
[  4]   9.00-10.00  sec   115 MBytes   966 Mbits/sec   37    393 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.12 GBytes   959 Mbits/sec  359             sender
[  4]   0.00-10.00  sec  1.11 GBytes   957 Mbits/sec                  receiver

另外,如果用外网IP,速率会慢很多

参考:
https://iperf.fr/iperf-download.php

标签: none

添加新评论