Linux under the speed of the Speedtest command, it is written in the Python language, for python2.4-python3.4 and other versions. Here's how:
1. Download this file
wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
(Note: The former is speedtest-cil, this article takes Centos7 as an example)
2. Modify the file name, increase the execution permission, move to the default path
MV speedtest.py speedtestchmod a+x SPEEDTESTMV speedtest/usr/local/bin/
3. Test (direct execution)
The results are as follows
[Email protected] ~]# Speedtest
Retrieving Speedtest.net configuration ...
Testing from 263 (211.157.166.229) ...
Retrieving Speedtest.net server list ...
Selecting best servers based on ping ...
Hosted by China Mobile Group Beijing Co.Ltd (Beijing) [1.69 km]: 106.603 ms
Testing download speed ....... ....... ................. .............................
download:2.50 Mbit/s
Testing upload speed ................................................................................................
upload:3.11 Mbit/s
We can see the download speed is 2.5mb/s, upload 3.11mb/s.
How to measure speed under Linux