iperf测试带宽linux,iperf3-网络带宽性能测试工具
作用:基于TCP或UDP,對網絡帶寬吞吐量進行測試
安裝:yum install iperf3 -y
服務端參數:
-s:表示啟動服務端
-i:表示打印報告的時間間隔
-p:指定監聽端口,默認為5201
-D:以后臺方式運行(默認是前臺運行,將測試結果打印在屏幕)
用法示例:iperf3 -s -i 1 -p 10000
客戶端參數:
-c:表示啟動客戶端,后邊跟上服務端IP
-b:指定目標的最大帶寬(用ethtool 網卡名字可以查看)
-t:指定測試時間
-P:指定并發數
-p:指明服務端啟動的端口
-R:逆向測試
-d:雙向測試
用法示例:iperf3 -c 192.168.0.30 -b 1G -t 5 -P 2 -p 10000
舉例說明:
#啟動服務端
[[email?protected]~]#?iperf3?-s?-i?1?-p?10000
-----------------------------------------------------------
Server?listening?on?10000
-----------------------------------------------------------
Accepted?connection?from?192.168.10.121,?port?40322
[??5]?local?192.168.10.122?port?10000?connected?to?192.168.10.121?port?40324
[?ID]?Interval???????????Transfer?????Bandwidth
[??5]???0.00-1.00???sec???110?MBytes???926?Mbits/sec
[??5]???1.00-2.00???sec???121?MBytes??1.02?Gbits/sec
[??5]???2.00-3.00???sec???117?MBytes???980?Mbits/sec
[??5]???3.00-4.00???sec???119?MBytes???997?Mbits/sec
[??5]???4.00-5.00???sec???120?MBytes??1.01?Gbits/sec
[??5]???5.00-5.00???sec??0.00?Bytes??0.00?bits/sec
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-
[?ID]?Interval???????????Transfer?????Bandwidth
[??5]???0.00-5.00???sec??0.00?Bytes??0.00?bits/sec??????????????????sender
[??5]???0.00-5.00???sec???587?MBytes???984?Mbits/sec??????????????????receiver#啟動客戶端
[[email?protected]~]#?iperf3?-c?192.168.10.122?-t?5?-b?1G?-P?1?-p?10000?-R
Connecting?to?host?192.168.10.122,?port?10000
Reverse?mode,?remote?host?192.168.10.122?is?sending
[??4]?local?192.168.10.121?port?40328?connected?to?192.168.10.122?port?10000
[?ID]?Interval???????????Transfer?????Bandwidth
[??4]???0.00-1.00???sec???108?MBytes???909?Mbits/sec
[??4]???1.00-2.00???sec???122?MBytes??1.02?Gbits/sec
[??4]???2.00-3.00???sec???118?MBytes???992?Mbits/sec
[??4]???3.00-4.00???sec???119?MBytes???999?Mbits/sec
[??4]???4.00-5.00???sec???120?MBytes??1.00?Gbits/sec
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-
[?ID]?Interval???????????Transfer?????Bandwidth???????Retr
[??4]???0.00-5.00???sec???587?MBytes???985?Mbits/sec????0?????????????sender
[??4]???0.00-5.00???sec???587?MBytes???985?Mbits/sec??????????????????receiver
可以看到發送方和接收方的Bandwidth(帶寬)大概都是985M/s,很接近網卡的1000M/s;
總結
以上是生活随笔為你收集整理的iperf测试带宽linux,iperf3-网络带宽性能测试工具的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql 开启远程访问_QxOrm 访
- 下一篇: linux系统date s使用,简述Li