CentOS下使用speedtest.net测速

一键安装脚本:

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

服务器列表可以访问 https://www.speedtest.net/speedtest-servers-static.php

其实还有一些高级玩法

比如

speedtest-cli [-h] [--bytes] [--share] [--simple] [--list]
[--server SERVER] [--mini MINI] [--source SOURCE]
[--timeout TIMEOUT] [--secure] [--version]

-h, –help 显示帮助
–bytes 生成结果以字节显示(并不影响–share生成的图片)
–share 生成结果保存在speedtest服务器上并保存为图片链接

–simple 禁止详细输出,仅显示基本信息
–list 列出所有服务器ID
–server SERVER 指定一个服务器ID
–mini 指定你自己上传的speedtest mini客户端
–source SOURCE Source IP address to bind to
–timeout TIMEOUT HTTP timeout in seconds. Default 10
–secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers
–version Show the version number and exit

大多用到的功能就是 –server **** 和–share 了

获取一下 Ctrl+F搜索你想测试的服务器吧 后面有个4位数的是ID

比如用郑州电信服务器测试 ID4595 并且生成图片

./speedtest-cli --server 4595 --share
[root@MyServer ~]# ./speedtest-cli --server 4595 --share
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from CNISP-Union Technology (Beijing) Co. (42.51.16.74)...
Hosted by China Telecom HeNan Branch (Zhengzhou) [14.17 km]: 76.243 ms
Testing download speed........................................
Download: 33.25 Mbit/s
Testing upload speed..................................................
Upload: 0.69 Mbit/s
Share results: http://www.speedtest.net/result/5802066888.png
 
Copyright © 2014 - 2021 創雲信息科技(國際)電信集團 All Rights Reserved