网络压测
yum install iperf
# 开启 server 端 10.0.0.1
iperf -s -i 2
# 开启 client 端 10.0.0.2
iperf -c 10.0.0.1 -i 2
实例演示
# server
[root@zuiyoujie01 tools] iperf -s -i 2
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
recvn abort failed: Success
[ 4] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 40328
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 0.0 sec 0.00 Bytes 0.00 bits/sec
[ 4] local 10.0.0.1 port 5001 connected with 10.0.1.14 port 58742
[ 4] 0.0- 0.6 sec 0.00 Bytes 0.00 bits/sec
[ 4] local 10.0.0.1 port 5001 connected with 10.0.1.14 port 58744
[ 4] 0.0- 2.0 sec 13.9 MBytes 58.2 Mbits/sec
[ 4] 2.0- 4.0 sec 21.5 MBytes 90.3 Mbits/sec
[ 4] 4.0- 6.0 sec 22.8 MBytes 95.6 Mbits/sec
[ 4] 6.0- 8.0 sec 21.1 MBytes 88.4 Mbits/sec
[ 4] 8.0-10.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 4] 0.0-10.3 sec 102 MBytes 83.2 Mbits/sec
# client
[root@zuiyoujie02 tools]# iperf -c 10.0.0.1 -i 2
------------------------------------------------------------
Client connecting to 10.0.0.1, TCP port 5001
TCP window size: 272 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.1.14 port 58744 connected with 10.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 15.0 MBytes 62.9 Mbits/sec
[ 3] 2.0- 4.0 sec 22.0 MBytes 92.3 Mbits/sec
[ 3] 4.0- 6.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 6.0- 8.0 sec 21.4 MBytes 89.7 Mbits/sec
[ 3] 8.0-10.0 sec 21.5 MBytes 90.2 Mbits/sec
[ 3] 0.0-10.0 sec 102 MBytes 85.9 Mbits/sec
标签:MBytes,10.0,Mbits,压测,cmd,0.1,sec,iperf,port
From: https://www.cnblogs.com/tssc/p/17408754.html