linux测网速

一、ethtool

判断网口速率

# ethtool eno1|grep Speed
Speed: 1000Mb/s

二、speedtest-cli

speedtest-cli是一个用Python编写的轻量级Linux命令行工具,在Python2.4至3.4版本下均可运行。它基于Speedtest.net的基础架构来测量网络的上/下行速率。
文件speedtest-cli.txt
下载:

# wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py  
# chmod +x speedtest-cli 

测试:仅需要Ping,上传,下载的结果

# python speedtest-cli --simple 

三、iperf

iperf两台服务器之间测网速
安装

# apt install iperf

测试:
服务端:

iperf -s

客户端:

iperf -c ip

服务端可用nohup iperf -s &放在后台

猜你喜欢

转载自blog.csdn.net/lxypeter521/article/details/86085840
今日推荐