Linux command line test speed Speedtest.net

Source: Internet
Author: User
Tags python script

When Internet speed is found to be slow, people usually first test their computer to the network service provider (often referred to as the "last kilometer") network connection speed. In websites that can be used to test broadband speeds, speedtest.net may be the most widely used. Speedtest.net's work is not complicated: it loads JavaScript code in your browser and automatically detects the Speedtest.net server closest to you, and then sends an HTTP GET and POST request to the server to test the uplink/downlink speed. However, when there is no graphical desktop (for example, when you remotely log on to a server via the command line or use an operating system that does not have a graphical interface), flash-based, user-friendly speedtest.net will not work. Fortunately, Speedtest.net provides a command-line version of--SPEEDTEST-CLI.

Below I will show you how to test the broadband connection speed using SPEEDTEST-CLI on the Linux command line.

Installing SPEEDTEST-CLI

SPEEDTEST-CLI is a lightweight Linux command-line tool written in Python that runs under the Python2.4 to 3.4 version. It measures the upstream/downstream rate of the network based on the Speedtest.net infrastructure. Installing SPEEDTEST-CLI is simple-just download its Python script file.

Installing SPEEDTEST_CLI
1234 $ wgetHTTPS://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py$ chmod a+Rxspeedtest_cli. PY$ sudoMV speedtest_cli. PY /usr/Local/bin/Speedtest-CLI$ sudoChown Root:Root /usr/Local/bin/Speedtest-CLI</Div>
Test speed with SPEEDTEST-CLI

Using the SPEEDTEST-CLI command is also simple, and it does not require any parameters to work.

1 $ Speedtest - CLI

After entering this command, it will automatically discover the nearest Speedtest.net server (geographic distance), and then print out the test's network/downlink rate.

If you are willing to share the test results, you can use the parameter "–share". It will upload your test results to the Speedtest.net server and share them graphically with others.

Here is a test result that is automatically generated by Speedtest-cli and uploaded to Speedtest.net:

If you are interested in all currently available Speedtest.net servers, you can use the parameter "–list". It prints out all the Speedtest.net servers (sorted by from near from your geographic distance).

In the list above, each server has a corresponding ID in front of it. If you want to use the specified server to test your network speed, you only need to specify its ID after the SPEEDTEST-CLI command. For example, if you want to use a server on a Washington DC, you only need to specify the corresponding server ID (such as 935).

Original link: Dan Nanni translation: Geek van-Path empty translation link: http://www.geekfan.net/5521/

Linux command line test speed Speedtest.net

Related Article

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.