Test the network speed using command lines in CentOS

Source: Internet
Author: User
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 that can be used to test the bandwidth speed ;. Speedtest.net provides a command line version & mdash; speedtest-cli. The following shows how to use speedtest-cli in Linux command line to test the bandwidth connection speed. I,

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.

[Root @ localhost temp] # wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
[Root @ localhost temp] # chmod a + rx speedtest_cli.py
[Root @ localhost temp] # mv speedtest_cli.py/usr/local/bin/speedtest-cli
[Root @ localhost temp] # chown root: root/usr/local/bin/speedtest-cli

You can also download speedtest_cli.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.

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.