欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

linux中利用speedtest-cli测网速

程序员文章站 2022-04-18 11:29:08
[root@elegant-snap-3 you-get]# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py--2019-10-22 05:15:00-- https://raw.githu... ......
[root@elegant-snap-3 you-get]# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
--2019-10-22 05:15:00--  https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.196.133
connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.196.133|:443... connected.
http request sent, awaiting response... 200 ok
length: 65018 (63k) [text/plain]
saving to: ‘speedtest.py’

100%[=================================================================================================================================>] 65,018      --.-k/s   in 0.003s  

2019-10-22 05:15:00 (22.9 mb/s) - ‘speedtest.py’ saved [65018/65018]

[root@elegant-snap-3 you-get]# chmod +x ./speedtest.py 
[root@elegant-snap-3 you-get]# ./speedtest.py 
retrieving speedtest.net configuration...
testing from it7 networks (176.122.184.179)...
retrieving speedtest.net server list...
selecting best server based on ping...
hosted by bel air internet llc (los angeles, ca) [0.90 km]: 3.238 ms
testing download speed................................................................................
download: 833.87 mbit/s
testing upload speed................................................................................................
upload: 793.63 mbit/s
[root@elegant-snap-3 you-get]# 

就这样,我的国外vps速度很快,然而在国内的腾讯云vps上下行速度慢10倍,上行速度慢百倍,国内的vps硬盘慢网速也慢而且还贵,不是地理位置近些延迟低些真的毫无优点。。