speedtest.net命令行版本

找到一个命令行版本的speedtest.net,可以在没有浏览器的情况下进行网络测速,具体的地址在[sivel/speedtest-cli][1]
[1]: https://github.com/sivel/speedtest-cli

单文件,只依赖Python,可以直接下载:

curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli

下载后直接运行即可:

[root@test ~]# ./speedtest-cli
Retrieving speedtest.net configuration...
Testing from XXX Networks (x.x.x.x)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Atlantic Metro (Los Angeles, CA) [1.30 km]: 1.565 ms
Testing download speed................................................................................
Download: 631.41 Mbit/s
Testing upload speed....................................................................................................
Upload: 48.73 Mbit/s