1、登录到服务器的Home目录下,下载speedtest.py
sudo wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
2、加上执行权限,需要有python环境支持下执行:
(相关学习视频推荐:linux视频教程)
sudo chmod 755 speedtest.py ./speedtest.py
[wuyun@localhost home]$ ./speedtest.py Retrieving speedtest.net configuration... Testing from China Telecom (219.131.192.35)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by CTM Internet Services (Macau) [8.74 km]: 43.531 ms Testing download speed................................................................................ Download: 74.49 Mbit/s Testing upload speed................................................................................................ Upload: 80.77 Mbit/s
最好选择网络空闲时段再测试。它会自动发现离你最近的Speedtest.net服务器(地理距离),然后显示测试的网络上/下行速率。
相关教程推荐:linux教程
以上是如何测试linux服务器的上传下载速度的详细内容。更多信息请关注PHP中文网其他相关文章!