Speed measurement using speedtest-cli in CentOS

Source: Internet
Author: User
Tags nginx reverse proxy
In Windows, we can easily access speedtest.net through a browser for speed testing. in a Linux system without a graphical management interface, we can also use a small script speedtest-cli for speed testing. The small scripts used in this article have passed the test in CentOS6, Debian7, Ubuntu12.04/14.04, because these releases contain Pyth by default.

In Windows, we can easily access speedtest.net through a browser for speed testing. in a Linux system without a graphical management interface, we can also use a small script speedtest-cli for speed testing.

The small scripts used in this article have passed the test in CentOS 6, Debian 7, Ubuntu 12.04/14.04, because these releases all contain Python. * by default.

1. download the script and grant permissions
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.pychmod +x speedtest-cli

Or

curl -o speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.pychmod +x speedtest-cli
II. running method

The default speed measurement method only needs to run one command:

./speedtest-cli

The result is as follows:

root@example:~# ./speedtest-cliRetrieving speedtest.net configuration...Retrieving speedtest.net server list...Testing from Earth (192.0.0.2)...Hosted by Earth (Unknown) [100.00 km]: 100.00 msTesting download speed........................................Download: 100.00 Mbits/sTesting upload speed..................................................Upload: 100.00 Mbits/s

However, sometimes the geographic location of the speedserver is determined by the IP address of the server. we can do this by specifying the server ID. first, open this page:

http://www.speedtest.net/speedtest-servers-static.php

Then you can useCtrl + FSearch for the physical location of your server. for example, if you want to speed up a server in Hong Kong, findHong KongNode:

 

We can see that the ID is 5120, so in your server, as long as you run

./speedtest-cli --server 5120

You can specify a server for speed measurement.

Sometimes your server may accesshttp://www.speedtest.net/speedtest-servers-static.phpThe 403 Forbdden error occurs. this is because the network on your server is blocked by speedtest.net. you can simply create an Nginx Reverse proxy and modify it.speedtest-cliFile.

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.