speetest-cli is an upstream and downstream network speed test tool under linux. It is a command line script written in python.
Requires python2.4-3.3 support.
github project address: https://github.com/sivel/speedtest-cli
There are many installation methods:
1、pip / easy_install
pip install speedtest-cli
or
easy_install speedtest-cli
2、Github
pip install git+https://github.com/sivel/speedtest-cli.git
or
git clone https://github.com/sivel/speedtest-cli.git
python speedtest-cli/setup.py install
3、Just download (Like the way it used to be)
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
or
curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
After downloading, add executable permissions and execute commands directly
It will find the nearest speedtest.net server and print out the current downstream and upstream bandwidth of your server.
[root@localhost ~]# ./speedtest-cli
Retrieving speedtest.net configuration...
Testing from China Telecom Guangdong (183.62.174.54)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ShenZhen Telecom (Shenzhen) [0.00 km]: 1118.768 ms
Testing download speed................................................................................
Download: 4.65 Mbit/s
Testing upload speed................................................................................................
Upload: 9.15 Mbit/s
With the --share parameter, the test results will be uploaded to the speedtest.net server and displayed graphically. Get a graphical report through the link address, as shown below.
[root@localhost ~]# ./speedtest-cli --share
Retrieving speedtest.net configuration...
Testing from China Telecom Guangdong (183.62.174.54)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 75510010 (ShenZhen) [0.00 km]: 2552.787 ms
Testing download speed................................................................................
Download: 2.43 Mbit/s
Testing upload speed................................................................................................
Upload: 2.31 Mbit/s
Share results: http://www.speedtest.net/result/7253182155.png
Use ./speedtest-cli -h for help