CentOS下使用命令列測試網速

來源:互聯網
上載者:User

CentOS下使用命令列測試網速
Speedtest.net提供了一個命令列工具 speedtest-cli我們可以在Linux中使用speedtest-cli來測試寬頻速度
speedtest-cli是由Python編寫的輕量級Linux命令列工具基於Speedtest.net的基礎架構來測量網路的上/下行速率
運行環境:Python2.4-3.4
github:https://github.com/sivel/speedtest-cli

下載speedtest-cli.py 並更改許可權# wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py# chmod a+rx speedtest_cli.py 使用speedtest-cli# speedtest-cli# 下方內容為回顯內容(整個過程需要花上一點時間)*****************************************************************Retrieving speedtest.net configuration...Retrieving speedtest.net server list...Testing from China Unicom ####### (0.0.0.0)...Selecting best server based on ping...Hosted by Vladlink (Vladivostok) [509.76 km]: 14.623 msTesting download speed........................................Download: 2.10 Mbit/sTesting upload speed..................................................Upload: 0.41 Mbit/s***************************************************************** # speedtest-cli -husage: speedtest-cli [-h] [--share] [--simple] [--list] [--server SERVER]                     [--mini MINI] [--source SOURCE] [--version] Command line interface for testing internet bandwidth using speedtest.net.-------------------------------------------------------------------------- https://github.com/sivel/speedtest-cli optional arguments:  -h, --help       show this help message and exit  --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  --version        Show the version number and exit   #如果想方便的使用speedtest-cli 可以對speedtest-cli.py進行如下操作# sudo mv speedtest_cli.py /usr/local/bin/speedtest-cli# sudo chown root:root /usr/local/bin/speedtest-cli

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.