安装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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM