iperf 网络传输性能测试工具

iperf 网络传输性能测试工具

官网:https://iperf.fr/

安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@host-10-11 ~]# rpm -ivh iperf3-3.1.3-1.fc24.x86_64.rpm 
Preparing... ################################# [100%]
Updating / installing...
1:iperf3-3.1.3-1.fc24 ################################# [100%]
[root@host-10-11 ~]# rpm -ql iperf3
/usr/bin/iperf3
/usr/lib64/libiperf.so.0
/usr/lib64/libiperf.so.0.0.0
/usr/share/doc/iperf3
/usr/share/doc/iperf3/LICENSE
/usr/share/doc/iperf3/README.md
/usr/share/doc/iperf3/RELEASE_NOTES
/usr/share/man/man1/iperf3.1.gz
/usr/share/man/man3/libiperf.3.gz

服务端

选项释义
-sIperf服务器模式
-u使用UDP方式,默认TCP方式
-p指定服务端端口,5201
1
2
3
4
iperf3 -s 
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

客户端

选项释义
-c运行Iperf的客户端模式,连接到指定的Iperf服务器端,服务器端的IP为1192.168.1.100
-u指定udp协议
-p设置端口,与服务器端的监听端口一致。默认是5201端口,与tcp的一样
-b目标带宽,单位为bits/sec(0表示无限制),单位K,M,G
-t设置传输的总时间。Iperf在指定的时间内,重复的发送指定长度的数据包。默认是10秒
-n传输的字节数,不能和-t同时使用,单位K,M,G
-R运行反向模式(服务器发送,客户端接收)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
iperf3 -c 10.10.10.12  -t 10
Connecting to host 10.10.10.12, port 5201
[ 4] local 10.10.10.11 port 48760 connected to 10.10.10.12 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 557 MBytes 4.67 Gbits/sec 0 1.04 MBytes
[ 4] 1.00-2.00 sec 635 MBytes 5.32 Gbits/sec 0 1.30 MBytes
[ 4] 2.00-3.00 sec 654 MBytes 5.49 Gbits/sec 0 1.40 MBytes
[ 4] 3.00-4.00 sec 671 MBytes 5.63 Gbits/sec 0 1.45 MBytes
[ 4] 4.00-5.00 sec 650 MBytes 5.44 Gbits/sec 0 1.53 MBytes
[ 4] 5.00-6.00 sec 674 MBytes 5.67 Gbits/sec 0 1.55 MBytes
[ 4] 6.00-7.00 sec 675 MBytes 5.66 Gbits/sec 0 1.59 MBytes
[ 4] 7.00-8.00 sec 705 MBytes 5.90 Gbits/sec 0 1.64 MBytes
[ 4] 8.00-9.00 sec 668 MBytes 5.61 Gbits/sec 0 1.67 MBytes
[ 4] 9.00-10.00 sec 701 MBytes 5.88 Gbits/sec 0 1.67 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 6.43 GBytes 5.53 Gbits/sec 0 sender
[ 4] 0.00-10.00 sec 6.43 GBytes 5.52 Gbits/sec receiver

iperf Done.

可以看到带宽平均在5.5Gbits/sec左右。

打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2018-2024 Outsrkem
  • 访问人数: | 浏览次数:

      请我喝杯咖啡吧~

      支付宝
      微信