Linux up and down line speed test

Source: Internet
Author: User
Tags documentation python script

This program is a python-developed scripting program that leverages Speedtest.net's services to measure the bandwidth of the upper and lower lines. SPEEDTEST-CLI can be based on the physical distance from the speed of the engine room to list the speed server, or for a server to speed up, but also for you to generate a URL for you to share your speed results.

To install the latest version of SPEEDTEST-CLI on Linux, you must install Python 2.4-3.4 or later.

Installing SPEEDTEST-CLI on Linux

There are two ways to install SPEEDTEST-CLI. The first method needs to use the python-pip Package Manager, the second method needs to install the Python script, build the installation files and then run, here we introduce two methods:

Installing SPEEDTEST-CLI with Pythin-pip

First you need to install python-pip the Package Manager, then you can use the PIP command to install SPEEDTEST-CLI

    1. $ sudo apt-get install python-pip

    2. $ sudo pip install speedtest-cli

If you want to upgrade SPEEDTEST-CLI to the latest version, you need to enter the following command

    1. $ sudo pip install speedtest-cli --upgrade

Install SPEEDTEST-CLI via Pyhton script

First, use the wget command to get the Python script from GitHub, then extract the downloaded file (master.zip)

    1. $ wget https://github.com/sivel/speedtest-cli/archive/master.zip

    2. $ unzip master.zip

After extracting the file, go to the extracted directory speedtest-cli-master and make the script executable.

    1. $ cd speedtest-cli-master/

    2. $ chmod 755 speedtest_cli.py

Next, move the executable script to the /usr/bin folder so that you don't have to enter the full script path every time.

    1. $ sudo mv speedtest_cli.py /usr/bin/

Using SPEEDTEST-CLI to test Internet connectivity speed

1. To test your download and upload speed, only need to run the speedtest-cli command, do not need to take parameters.

    1. $ speedtest_cli.py

Test upload download speed under Linux

2. Test the upload download speed (in bytes)

    1. $ speedtest_cli.py --bytes

Test the speed of the bytes

3. The tool provides a link to download images generated by your broadband test results that you can share to your family and friends.

Share Speed Results

The picture below is the one you created with the above command line speed.

Speed results

4. If you just need to ping, upload, download the results, run the following command:

    1. $ speedtest_cli.py --simple

Test ping, upload, download speed

5. List speedtest.net all servers distance to your physical distance, in kilometers (km)

    1. $ speedtest_cli.py --list

List servers for Speedtest.net

6. After getting a very long list of servers, how do I list a server I want? What if I want to find a server in Mumbai (India) in the Speedtest.net server list?

    1. $ speedtest_cli.py --list | grep -i Mumbai

List the closest servers

7. Speed up the specified server. We use the server ID obtained in example 5 and example 6 above:

    1. $ speedtest_cli.py --server [server ID]

    2. $ speedtest_cli.py --server [5060]## 这里使用服务器ID为5060作为例子

Speed up the specified server

8. Output speedtest-cli version information and help documentation

    1. $ speedtest_cli.py --version

Output version number

    1. $ speedtest_cli.py --help

Output Help documentation

Reminder: The delay in the report is not an exact result and should not be relied upon; This value can be used as a relative delay, which is reliable for you to select a test server. At the same time, the CPU and memory capacity can affect the accuracy of the results.

Conclusion

System administrators and developers should have this simple scripting tool, this lightweight tool is full-featured, it's awesome. The reason I don't like speedtest.net is that it's used for Flash, and the opposite speedtest-cli just poked in my pain point.

SPEEDTEST_CLI is a third-party tool and cannot automatically record broadband speeds. Speedtest.net has millions of users and you can make a small speed server on your own.


Linux up and down network test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.