テクめも

プログラミング関連のちょっとしたTipsなどを書いています。

CLIでスピードテストを行う

リモートホストの速度測定するには、Python製のspeedtest-cliが便利です。

インストール

$ pip install speedtest-cli

OR

$ wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
$ chmod +x speedtest-cli

実行

$ speedtest-cli

AWSのEC2上で実行した結果です。

Retrieving speedtest.net configuration...
Testing from Amazon.com (13.112.205.69)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by OPEN Project (via 20G SINET) (Tokyo) [6.15 km]: 6.718 ms
Testing download speed................................................................................
Download: 640.55 Mbit/s
Testing upload speed......................................................................................................
Upload: 631.70 Mbit/s