As a server admin I have times when I would like to know the real-time calculation of a server’s upload and download speeds. Speedtest.net is a great site, but, it normally requires a GUI and browser that supports Flash to run the testing application. I ran across a great python script that will run Speedtest.net from a command line and give you the link to the image file showing your results.
Prerequisite:
speedtest-cli requires Python 2.4 – 3.4
Quick Install:
pip install speedtest-cli
Manual Install:
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py;chmod +x speedtest-cli
Run:
speedtest-cli --share
or
./speedtest-cli --share
Usage:
$ speedtest-cli -h usage: 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