Linux:如何通过CLI快速测试您的连接

时间:2020-02-23 14:39:47  来源:igfitidea点击:

注意:由于脚本的更改和最新的wget更新[22/12/2015],自初始发布以来,本文已被编辑。

如果您习惯了流行的" SpeedTest.net"来测试带宽连接,那么这里是如何使用相同的工具但使用Linux终端的方法。

1.下载python脚本:

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

旧脚本(信息性的,请跳到下一步!):

wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

2.使其可执行:

chmod +x speedtest.py

3.使用脚本运行测试:

./speedtest.py

4.输出应如下所示:

[user@node01 ~]$./speedtest.py 
Retrieving speedtest.net configuration...
Testing from Netelligent Hosting Services (0.0.0.0)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Netelligent Hosting Services Inc. (Montreal, QC) [19.13 km]: 1.1 ms
Testing download speed................................................................................
Download: 916.41 Mbit/s
Testing upload speed....................................................................................................
Upload: 901.87 Mbit/s
[user@node01 ~]$