Linux Command Line test network speed

Source: Internet
Author: User

Linux Command Line test network speed

In many cases, we need to test the uplink and downlink bandwidths of Linux servers. Speedtest.net may be one of the most widely used websites ".
Speedtest.net provides a command line version-speedtest-cli. The following shows how to use speedtest-cli in Linux Command Line to test the bandwidth connection speed.

1. Install speedtest-cli
Speedtest-cli is a lightweight Linux Command Line tool written in Python. It can be run from Python 3.4 to Python. It is based on the infrastructure of Speedtest.net to measure the uplink/downlink speed of the network. Installing speedtest-cli is simple-you only need to download its Python script file. The tutorial on the Internet is very old, and only the expired script will be reported. The update is as follows:

Wgethttps: // raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

Chmod a + rx speedtest. py

Mv speedtest. py/usr/local/bin/speedtest-cli

Chown root: root/usr/local/bin/speedtest-cli

Speedtest-cli

You can also download speedtest. py from your computer and upload it to the server.

Ii. Use speedtest-cli to test the network speed
Using the speedtest-cli command is also simple, and it can work without any parameters.

[Root @ localhost temp] # speedtest-cli

After you enter this command, it will automatically find the nearest Speedtest.net server (geographic distance), and then print the Network/downlink rate of the test.

[Root @ localhost temp] # speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from China Telecom (219.135.214.145 )...
Selecting best server based on latency...
Hosted by CTM Internet Services (Macau) [106.48 km]: 55.974 MS
Testing download speed ........................................
Download: 3.15 Mbit/s
Testing upload speed ..................................................
Upload: 0.58 Mbit/s

Test result Description: The behavior is 0.58 Mbit/s and 3.15 Mbit/s.
Of course, the test results may not always be able to meet this value in actual applications. It can only be used as a reference.

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.