Windows we can very convenient direct browser access to Speedtest.net for speed testing, in the absence of a graphical management interface of the Linux system, we can also use a small script speedtest-cli to speed.
The small scripts used in this article are tested under CentOS 6, Debian 7, and Ubuntu 12.04/14.04 because these distributions contain the Python 2.7.* that are often easy to use.
First, download the script and give permission
Wget-o speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x SPEEDTEST-CLI
Or
Curl-o speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x SPEEDTEST-CLI
Second, the Operation method
The default speed method is to run only one command:
./speedtest-cli
The results appear as follows:
root@example:~#./speedtest-cli
Retrieving Speedtest.net configuration ...
Retrieving Speedtest.net server list ...
Testing from the Earth (192.0.0.2) ...
Hosted by Earth (Unknown) [100.00 km]: 100.00 ms
Testing download speed ....... ...... ..... ..... ..... ..... ...... ...
download:100.00 mbits/s
Testing upload speed ....... ...... ...... ..... ..... ..... ..... ..... ..... ..... ...
upload:100.00 mbits/s
But sometimes the server's IP to judge the location of the speed server is not accurate, we can specify the server ID way to do, first of all, open this page:
http://www.speedtest.net/speedtest-servers-static.php
You can then use Ctrl + F to search for the physical location of the server you want, for example, I want to speed up the Hong Kong server, and find a HK Kong node:
<server url= "http://speedtestneta.hkix.net/speedtest/upload.php" lat= "22.3000" lon= "114.2000" Name= "The Kong" country= "cc=" "HK" sponsor= "HKIX1" id= "5120" url2= "http://speedtestnetb.hkix.net/speedtest/upload.php" host= " speedtestneta.hkix.net:8080 "/>
We can see the ID is 5120, then in your server, just run
./SPEEDTEST-CLI--server 5120
You can specify the server for Speed measurement
Sometimes your server access http://www.speedtest.net/speedtest-servers-static.php will 403 Forbdden error, because your server's network is blocked by Speedtest.net, You simply do a Nginx and then modify the Speedtest-cli file.