linux网速测试工具 speedtest iperf3
来源:原创
时间:2022-05-09
作者:脚本小站
分类:Linux
speedtest:
wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py python speedtest.py Testing download speed......................................... Download: 59.08 Mbit/s Testing upload speed........................................... Upload: 59.45 Mbit/s
参数:
speedtest.py --bytes 以字节计算的方式来测试上下行速度 speedtest.py --share 将速度测试的结果生成一张图片链接 speedtest.py --simple 只显示ping和上下行速度 speedtest.py --list 列出speedtest.net所有的服务器距离你的物理距离,单位是千米(km)
查看测试节点:
~]# python speedtest.py --list Retrieving speedtest.net configuration... 5396) China Telecom JiangSu 5G (Suzhou, China) [84.89 km] 27249) China Mobile jiangsu 5G (Nanjing, China) [269.42 km] 24462) Homeplus (Taoyuan, Taiwan) [686.03 km] 29107) Asia Pacific Telecom (Taoyuan, Taiwan) [686.03 km] 11702) Taiwan Mobile (Taoyuan, Taiwan) [686.03 km] 29716) Homeplus (Neihu District, Taiwan) [686.51 km] 23844) China Telecom Wuhan Branch (Wuhan, China) [689.95 km] 2327) Far Eastone Telecommunications Co., Ltd. (Taipei, Taiwan) [690.40 km] 30370) PEGATRON (Taipei, Taiwan) [690.40 km] 35066) DFT (Taipei, Taiwan) [690.40 km]
指定服务:
python speedtest.py --server=5317
iperf3:
yum install -y iperf3
1、开启ipert3服务器端
iperf3 -s iperf3 -s -p 2222 #可以指定服务器测试的端口号;
2、客户端测速命令
iperf3 -c 172.16.0.211 #连接测速,默认测的是从客户端到服务端的带宽(服务器接收,客户端发送); iperf3 -R -c 172.16.0.211 #-R 设置服务器发送,客户端接收 iperf3暂不支持全双工测试,有点遗憾 iperf3 -t 60 -c 172.16.0.211 #-t 参数可以置顶测速时间; iperf3 -p 2222 -c 172.16.0.211 #-p 指定测速服务器端口 iperf3 -c 10.99.1.250 -P 10 -t 30 #建议使用该项采用10线程打流,打流时间时间为30S
参考:
www.xxshell.com/2664.html www.cnblogs.com/bloglogs/p/16017645.html