Linux command line in the network speed test method detailed

  

When browsing the website suddenly changed the card, I do not know the reason for the computer or the speed of the network, this requires testing the network speed, the following small series to Everyone introduces how to use the Linux command line to test the speed of the network. If you are interested, you may wish to understand it.

at the site can be used to test broadband speeds in, Speedtest.net is the most widely used.

Speedtest.net doesn't work: it loads JavaScript code in your browser and automatically detects the Speedtest.net server closest to you, then sends an HTTP GET and POST request to the server to test the upstream /Downstream speed.

But when you don't have a graphical desktop (for example, when you log in to the server remotely via the command line or use an operating system without a graphical interface), Flash-based, friendly-friendly Speedtest.net won't work. Fortunately, Speedtest.net provides a command line version ——speedtest-cli. Below I will show you how to use the speedtest-cli in the Linux command line to test the speed of the broadband connection.

Installing speedtest-cli

speedtest-cli is a lightweight Linux command-line tool written in Python that runs under Python 2.4 to 3.4. It is based on the infrastructure of Speedtest.net to measure the uplink/downlink rate of the network. Installing speedtest-cli is very simple —— just download its Python script file.

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

2$ chmod a+rx speedtest_cli.py

3$ sudo mv speedtest_cli.py /usr/local/bin/speedtest-cli

4$ sudo chown root:root /usr/local/bin/speedtest-cli

Using speedtest- Cli test network speed

The speedtest-cli command is also very simple, it does not require any parameters to work.

1$ speedtest-cli

After entering this command, it will automatically find the Speedtest.net server (geographic distance) closest to you, and then print out the test network up/down rate.

If you are willing to share test results, you can use the parameter & ldquo; & ndash; share & rdquo ;. It will upload your test results to the Speedtest.net server and share it graphically with others.
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved