Home » Articles » Using speedtest.net from Linux CLI

Using speedtest.net from Linux CLI

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

Results:

BiteOfTechSpeedtest

About Brian Aldridge

I am a software developer and podcaster. Catch me weekly on Infection - The Survival Podcast at https://infectionpodcast.com

Check Also

Securing webmail in Plesk w/Let’s Encrypt

Let’s Encrypt is a great free option for securing your websites with an SSL certificate. Plesk Control Panel allows you to secure your control panel, websites, and webmail interface with the latest version of their Let’s Encrypt extension.