iperf 网络带宽测试工具
类型:Software
创建时间:2022-04-19 16:19:50
更新时间:2022-04-19 16:27:17
类型:Software
更新时间:2022-04-19 16:27:17
iperf 程序是一个网络性能测试工具,通常可以用于测试网络设备之间的带宽质量,支持UDP/TCP
在Ubuntu1804中安装iperf
sudo apt install -y iperf
下面以测试本地到服务器(104.160.18.230)之间的网络质量
在104.160.18.230上安装iperf并运行
sudo apt install -y iperf
iperf -s -p 55201
参数解释
- -s 服务端
- -p 指定端口(默认55201)
在本地的Ubuntu1804机器上安装iperf并运行
sudo apt install -y iperf
iperf -c 104.160.18.230 -t 30s -i 1s -p 55201
参数解释
- -c 客户端运行
- -w tcp 数据包大小
- -t 测试时间
- -i 刷新时间
- -p 服务端接收的端口
测试结果输出如下
➜ ~ iperf -c 104.160.18.230 -w 2m -t 30s -i 1s -p 55201
Invalid value of '1s' for -i interval
------------------------------------------------------------
Client connecting to 104.160.18.230, TCP port 55201
TCP window size: 416 KByte (WARNING: requested 1.91 MByte)
------------------------------------------------------------
[ 3] local 192.168.4.11 port 50038 connected with 104.160.18.230 port 55201
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 892 KBytes 7.31 Mbits/sec
[ 3] 1.0- 2.0 sec 1.12 MBytes 9.44 Mbits/sec
[ 3] 2.0- 3.0 sec 1.62 MBytes 13.6 Mbits/sec
[ 3] 3.0- 4.0 sec 1.50 MBytes 12.6 Mbits/sec
[ 3] 4.0- 5.0 sec 2.12 MBytes 17.8 Mbits/sec
[ 3] 5.0- 6.0 sec 2.25 MBytes 18.9 Mbits/sec
...
[ 3] 24.0-25.0 sec 3.00 MBytes 25.2 Mbits/sec
[ 3] 25.0-26.0 sec 2.75 MBytes 23.1 Mbits/sec
[ 3] 26.0-27.0 sec 2.88 MBytes 24.1 Mbits/sec
[ 3] 27.0-28.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 28.0-29.0 sec 2.25 MBytes 18.9 Mbits/sec
[ 3] 29.0-30.0 sec 3.00 MBytes 25.2 Mbits/sec
[ 3] 0.0-30.1 sec 87.7 MBytes 24.4 Mbits/sec
[[replyMessage== null?"发表评论":"@" + replyMessage.m_author]]
account_circle
email
web_asset
textsms
评论列表([[messageResponse.total]])
[[messageItem.m_author]]
[[messageItem.m_author]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]]
[[subMessage.m_author]]
@
[[subMessage.parent_message.m_author]]
[[subMessage.parent_message.m_author]]
[[getEnviron(messageItem.m_environ)]]