服务器测速工具-Speedtest

Speedtest.net

         Speedtest.net强大而知名的全球宽带网络速度测试网站,采用Flash载入界面,Alexa世界排名非常高,Speedtest.net在全球有数百个测试节点,国内有测速节点几十个。作为一款在线并且可视化的网速测试工具。使用方法简单,无需下载、安装多余软件,只需有浏览器即可。
         Speedtest.net还推出了命令行测速工具speedtest-cli

      网站简介

         SpeedtestOokla推出的一款基于全球视图的可视化网速测试工具。与众不同的是它可以在一个世界地图上来选择指定的测试服务器,用绿色三角标记的是建议用来测速的服务器,白点标记的是可用测试点服务器。测试的结果显示了你连接到此服务器的上传及下载速率网络延时等信息。

安装与使用:

[root@localhost ~]# wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py
--2023-07-25 15:54:26-- https://raw.github.com/sivel/speedtest-cli/master/speedtest.py
Resolving raw.github.com (raw.github.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connecting to raw.github.com (raw.github.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py [following]
--2023-07-25 15:54:27-- https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65334 (64K) [text/plain]
Saving to: ‘speedtest.py’

100%[===========================================================================================================================================>] 65,334 --.-K/s in 0.08s

2023-07-25 15:54:27 (800 KB/s) - ‘speedtest.py’ saved [65334/65334]

[root@localhost ~]# ls
 speedtest.py 
[root@localhost ~]# chmod a+rx speedtest.py
[root@localhost ~]# ls
 speedtest.py 

[root@localhost ~]# mv speedtest.py /usr/local/bin/speedtest-cli
[root@localhost ~]# ls /usr/local/bin/speedtest-cli
/usr/local/bin/speedtest-cli

测试:

[root@localhost ~]# speedtest-cli
Retrieving speedtest.net configuration...
Testing from China Unicom (221.11.26.50)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by China Telecom (Lanzhou) [505.69 km]: 24.256 ms
Testing download speed................................................................................
Download: 52.20 Mbit/s    (下载速度)
Testing upload speed................................................................................................
Upload: 53.61 Mbit/       (上传速度)

它还可以自动生成一个图片链接,在浏览器以图片的形式把测速结果呈现出来:

[root@localhost ~]# speedtest-cli --shar
Retrieving speedtest.net configuration...
Testing from China Unicom (221.11.26.50)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by China Telecom AnHui 5G (Hefei) [822.94 km]: 29.911 ms
Testing download speed................................................................................
Download: 42.00 Mbit/s
Testing upload speed................................................................................................
Upload: 24.22 Mbit/s
Share results: http://www.speedtest.net/result/15034042630.png (自动生成的图片链接)

 

命令使用详情:

-h, –help
show this help message and exit
–bytes
Display values in bytes instead of bits. Does not affect the image generated by –share
–share
Generate and provide a URL to the speedtest.net share results image
–simple
Suppress verbose output, only show basic information
–list
Display a list of speedtest.net servers sorted by distance
–server SERVER
Specify a server ID to test against
–mini MINI
URL of the Speedtest Mini server
–source SOURCE
Source IP address to bind to
–timeout TIMEOUT
HTTP timeout in seconds. Default 10
–secure
Use HTTPS instead of HTTP when communicating withspeedtest.net operated servers
–version
Show the version number and exit

云野 » 服务器测速工具-Speedtest

1 评论

发表回复