linux服务器网络测速的方法
一、安装 Speedtest 进行测试
Speedtest 是一个用 Python 编写的轻量级 Linux 命令行工具,可基于 Speedtest.net 的基础架构来测量linux服务器网络的上/下行速率!
[root@kht118 kht] wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py
[root@kht118 kht] chmod a+rx speedtest.py
[root@kht118 kht] mv speedtest.py /usr/local/bin/speedtest
[root@kht118 kht] chown root:root /usr/local/bin/speedtest
[root@kht118 kht]# speedtest
Retrieving speedtest.net configuration...
Testing from China Unicom (60.12.8.241)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by China Telecom Wuhan Branch (Wuhan) [564.31 km]: 46.601 ms
Testing download speed................................................................................
Download: 7.66 Mbit/s
Testing upload speed................................................................................................
Upload: 14.33 Mbit/s
#也可以执行下面的命令,分享测试结果并生成结果图片的连接
[root@kht118 kht]# speedtest --share
Retrieving speedtest.net configuration...
Testing from China Unicom (60.12.8.241)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by China Telecom Wuhan Branch (Wuhan) [564.31 km]: 41.679 ms
Testing download speed................................................................................
Download: 10.70 Mbit/s
Testing upload speed................................................................................................
Upload: 13.33 Mbit/s
Share results: http://www.speedtest.net/result/14209763944.png