How to Test Internet Connection Speed using Speedtest-Cli on Ubuntu Server

in How To

When you’re doing speed tests your internet connection usually use Speedtest.net. but Speedtest.net requires the Adobe Flash Player plugin to perform the speed test, although most users have flash player on their web browsers, this is very uncomfortable for those who do not have a graphical user interface (GUI), administrators remote server, VPS or just users not using FlashPlayer for personal reasons.

Well, on this is a simple tutorial I will show you how to test the Internet connection speed on ubuntu server using the command line tool called speedtest-cli. Speedtest-cli is a simple client written in Python CLI to measure bidirectional bandwidth Internet using the Speedtest.net infrastructure. It works with Python 2.4 to 3.4.

Installing speedtest-cli Using pip command:

First, install pip with the following command:

sudo apt-get install python-pip

Once pip installed, now install speedtest-cli by using pip command:

sudo pip install speedtest-cli

Installing speedtest-cli Manually

To installing speedtest-cli in manually method you need to download the latest speedtest-cli python script from github:

sudo wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

make speedtest_cli.py executable

sudo chmod a+rx speedtest_cli.py

Move speedtest_cli.py to directory /usr/bin

sudo mv speedtest_cli.py /usr/bin/speedtest-cli

Test Connection Speed using Speedtest-cli

It is easy to check internet speed with speedtest-cli. Just type command speedtest-cli without any arguments.

speedtest-cli

After execute this command it will automatically detect locate the closest of Speedtest server (in terms of geographical distance) and show the report download speed an upload speed

speed test using speedtest cli How to Test Internet Connection Speed using Speedtest Cli on Ubuntu Server

If you would like to share the results of the speed test, you can use “–share” option after speedtest-cli command, which allows you to share results of the speed test with others in an image format via Speedtest.net .

speedtest-cli --share

speedtest How to Test Internet Connection Speed using Speedtest Cli on Ubuntu Server

For a list of servers Speedtest.net available worldwide, use “–list” option. An ordered list of servers is displayed Speedtest.net (geographically nearest first).

speedtest-cli --list

speed test  How to Test Internet Connection Speed using Speedtest Cli on Ubuntu Server

In the server list shown above, each server Speedtest.net shows a server ID associated on the front. You can manually specify the server ID for the test, instead of using the geographically closest server. For example, if I want to use a sever in Valenca – Brazil, I can specify a corresponding server ID (eg, 3203).

speedtest-cli --server 3203

More information about speedtest-cli, type:

speedtest-cli --help
Advertisement:

Previous post:

Next post: