安装Speedtest到Python

Speedtest模块可以测试主机的网络带宽大小。

运行环境

系统版本:CentOS Linux release 7.3.1611 (Core)
软件版本:无
硬件要求:无

安装过程

1、安装Speedtest

root@localhost:~# pip install speedtest-cli  -i "http://mirrors.aliyun.com/pypi/simple/" --trusted-host mirrors.aliyun.com

2、网络测速

root@localhost:~# speedtest-cli --bytes
Retrieving speedtest.net configuration...
Testing from Hangzhou Alibaba Advertising Co.,Ltd. (47.98.238.23)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Chinamobile-5G (Shanghai) [19.64 km]: 11.277 ms
Testing download speed................................................................................
测试下载速率
Download: 14.06 Mbyte/s
Testing upload 
speed................................................................................................
测试上传速率
Upload: 1.46 Mbyte/s
posted @ 2020-06-15 17:48  RidingWind  阅读(1688)  评论(0)    收藏  举报