linux系統下的網絡測速speedtest


linux系統下的網絡測速speedtest

最近換了一條千兆寬帶,用網頁版的speedtest.net測速最多就500Mbps不到,找聯通上面測試,結果是操作系統的問題。win7系統測就500Mbps不到,MacOS測就能到1000Mbps。

嘗試在vm下安裝的centos7.8上跑測速是不是能跑到1000Mbps,下面是操作過程

參考網址:https://github.com/sivel/speedtest-cli

一、安裝和使用:

第一步:下載speedtest在linux命令行工具

這是一個Python編寫的工具,在Python2.4到3.7之間版本都可以運行。

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

github是國外網站,可能會出現下載不成功的現象,多試幾次。

第二步:給下載的文件增加執行權限

chmod +x speedtest.py

第三步:執行網速測試

./speedtest.py

二、選項與用法

所有的選項可以使用以下命令調出 ./speedtest.py -h

[root@server1 ~]# ./speedtest.py -h
usage: speedtest.py [-h] [--no-download] [--no-upload] [--single] [--bytes]
                    [--share] [--simple] [--csv]
                    [--csv-delimiter CSV_DELIMITER] [--csv-header] [--json]
                    [--list] [--server SERVER] [--exclude EXCLUDE]
                    [--mini MINI] [--source SOURCE] [--timeout TIMEOUT]
                    [--secure] [--no-pre-allocate] [--version]

Command line interface for testing internet bandwidth using speedtest.net.
--------------------------------------------------------------------------
https://github.com/sivel/speedtest-cli

--list 顯示speedtest可用服務器列表,按距離排序

[root@server1 ~]# ./speedtest.py --list
Retrieving speedtest.net configuration...
43752) BJ Unicom (BeiJing, China) [3.31 km]
17184) China Mobile TianJin-5G (Tianjin, CN) [111.96 km]
34115) China Telecom TianJin-5G (TianJin, China) [123.83 km]

--server SERVER 指定要測試的服務器ID號

[root@server1 ~]# ./speedtest.py --server 43752
Retrieving speedtest.net configuration...
Testing from China Unicom Beijing (123.113.101.196)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM