Linux中上下行网速测试工具 speedtest-cli

speetest-cli 是linux下一个上下行网速测试工具,是一个用python写的命令行脚本。

需要python2.4-3.3支持。

github项目地址:https://github.com/sivel/speedtest-cli


安装方法有很多种:


1、pip / easy_install

pip install speedtest-cli

or

easy_install speedtest-cli


2、Github

pip install git+https://github.com/sivel/speedtest-cli.git

or

git clone https://github.com/sivel/speedtest-cli.git

python speedtest-cli/setup.py install


3、Just download (Like the way it used to be)

wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

chmod +x speedtest-cli

or

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

chmod +x speedtest-cli


下载后添加可执行权限,直接执行命令

会查找距离最近的speedtest.net服务器,并打印出你服务器当前的下行和上行带宽。

[root@localhost ~]# ./speedtest-cli

Retrieving speedtest.net configuration...

Testing from China Telecom Guangdong (183.62.174.54)...

Retrieving speedtest.net server list...

Selecting best server based on ping...

Hosted by ShenZhen Telecom (Shenzhen) [0.00 km]: 1118.768 ms

Testing download speed................................................................................

Download: 4.65 Mbit/s

Testing upload speed................................................................................................

Upload: 9.15 Mbit/s


使用--share 参数,会将测试结果上传到speedtest.net 服务器并以图形方式展示。通过链接地址获得图形报告,如下图。

[root@localhost ~]# ./speedtest-cli --share

Retrieving speedtest.net configuration...

Testing from China Telecom Guangdong (183.62.174.54)...

Retrieving speedtest.net server list...

Selecting best server based on ping...

Hosted by 75510010 (ShenZhen) [0.00 km]: 2552.787 ms

Testing download speed................................................................................

Download: 2.43 Mbit/s

Testing upload speed................................................................................................

Upload: 2.31 Mbit/s

Share results: http://www.speedtest.net/result/7253182155.png

7253182155.png


使用./speedtest-cli -h 获得使用帮助


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值