Speedtes CLI Speedtest is a command line interface for testing internet bandwidth using speedtest.net
Setup on any device: https://www.speedtest.net/apps or install speedtest cli app: https://www.speedtest.net/apps/cli
HOW TO INSTALL SPEEDTEST
-CLICode Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bash sudo yum install speedtestyum install python python-setuptools python2-speedtest-cli |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
sudo apt-get update && sudo apt-get inst | ||||||
Code Block | ||||||
| ||||||
yum install python python-setuptools python2-speedtest-cliinstall curl curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash sudo apt-get install speedtest |
HOW TO USE SPEEDTEST
-CLIThe easiest way of using speedtest-cli, is just by invoking it without options in the terminal.
First you need to accept the license typing: YES, then the application will select the closest available server to test the connection against, then it will display the download and upload speed:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
root@test:~# speedtest-cli
Retrieving speedtest.net configuration...
Testing from Fishnet Communications LLC (77.73.67.143)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by TRINITY (Mariupol) [1505.65 km]: 59.954 ms
Testing download speed...................................
Download: 182.19 Mbit/s
Testing upload speed.....................................
Upload: 168.31 Mbit/s |
One very useful option of speedtest-cli is --share: when using it, a graphical representation of the results of the speed test will be generated and hosted online; the command will return the URL we can use to access and share it:
Code Block | ||||
---|---|---|---|---|
| ||||
root@test:~# speedtest-cli --share Share results: http ============================================================================== You may only use this Speedtest software and information generated from it for personal, non-commercial use, through a command line interface on a personal computer. Your use of this software is subject to the End User License Agreement, Terms of Use and Privacy Policy at these URLs: https://www.speedtest.net/about/eula https://www.speedtest.net/about/terms https://www.speedtest.net/about/privacy ============================================================================== Do you accept the license? [type YES to accept]: yes License acceptance recorded. Continuing. ============================================================================== Ookla collects certain data through Speedtest that may be considered personally identifiable, such as your IP address, unique device identifiers or location. Ookla believes it has a legitimate interest to share this data with internet providers, hardware manufacturers and industry regulators to help them understand and create a better and faster internet. For further information including how the data may be shared, where the data may be transferred and Ookla's contact details, please see our Privacy Policy at: http://www.speedtest.net/privacy ============================================================================== Do you accept the license? [type YES to accept]: yes License acceptance recorded. Continuing. Speedtest by Ookla Server: 2 Cloud Ltd - Riga (id: 40557) ISP: Sia Veesp Idle Latency: 0.63 ms (jitter: 0.05ms, low: 0.58ms, high: 0.67ms) Download: 833.50 Mbps (data used: 907.6 MB) 0.74 ms (jitter: 0.19ms, low: 0.52ms, high: 2.10ms) Upload: 991.97 Mbps (data used: 1.6 GB) 0.75 ms (jitter: 0.26ms, low: 0.55ms, high: 10.27ms) Packet Loss: 0.0% Result URL: https://www.speedtest.net/result/10259127090.pngc/ab2a575f-12de-4318-83e1-e1d05af024ac |
By default, the program runs a test against the closest speedtest.net server. If we want to force the test against a specific server, we first have to generate the list of the available ones:
Code Block | ||||
---|---|---|---|---|
| ||||
root@test:~# speedtest -cli --list Retrieving speedtest.net configuration... 3526) Rostelecom (Pskov, Russian Federation) [609.77 km] 11075) Net By Net Holding LLC (Pskov, Russian Federation) [609.77 km] 27770) Pskovline, LTD (Pskov, Russia) [609.77 km] 29684) Vels Ltd (Ludza, Latvia) [618.83 km] 1119) MGTS (Minsk, Belarus) [674.23 km] 25480) BYFLY.BY (Minsk, Belarus) [674.23 km] 4268) Mobile TeleSystems JLLC (Minsk, Belarus) [674.23 km] 30453) Beltelecom Minsk branch (Minsk, Belarus) [674.23 km] 3704) UNET.BY (Minsk, Belarus) [674.23 km] 10323) JLLC "COSMOS TV" (Minsk, Belarus) [674.23 km] 1399) DauTKom TV (Daugavpils, Latvia) [692.83 km] 23382) Elevi AS (Tartu, Estonia) [720.05 km] 12265) Cgates (Vilnius, Lithuania) [789.51 km] 6083) Tele2 (Vilnius, Lithuania) [789.51 km] 22608) M4host (Ogre, Latvia) [810.56 km] 13246) Baltcom (Riga, Latvia) [841.42 km] 1268) Tet (Riga, Latvia) [841.49 km] 1348) AS Balticom (Riga, Latvia) [841.49 km] 2148) Latvijas Mobilais Telefons (Riga, Latvia) [841.49 km] 24231) MīTs LV, SIA (Riga, Latvia) [841.49 km]L Closest servers: ID Name Location Country ============================================================================== 1348 AS Balticom Riga Latvia 1268 Tet Riga Latvia 2148 Latvijas Mobilais Telefons Riga Latvia 5834 SIA Bite Latvija Riga Latvia 19456 GARMTECH Riga Latvia 24424 LIVAS Riga Latvia 8455 DEAC Riga Latvia 7322 Telenet, sia Riga Latvia 44717 Octopus Telecom Riga Latvia 40557 2 Cloud Ltd Riga Latvia |
The list is quite long, therefore just a part of it is reported here. Now, to test the connection against a specific server, we run the command with the --server s option, providing the server ID (which is reported in the first column of the list) as the argument:
Code Block | ||||
---|---|---|---|---|
| ||||
root@test:~# speedtest-cli -s 1348 speedtest --servers 60831348 Retrieving speedtest.net configuration... Testing from SIA Serverum (212.6.44.32)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by Tele2 (Vilnius) [789.51 km]: 37.345 ms Testing download speed........................... Download: 450.82 Mbit/s Testing upload speed............................. Upload: 629.44 Mbit/s Speedtest by Ookla Server: AS Balticom - Riga (id: 1348) ISP: Sia Veesp Idle Latency: 1.12 ms (jitter: 0.33ms, low: 0.85ms, high: 1.66ms) Download: 906.21 Mbps [======\ ] 33% - latency: 3.96 ms ^C |
Info |
---|
In this tutorial we saw how to install and use the speedtest |
application. The program is basically the command line interface equivalent of running a speed test on the https://www.speedtest.net site, and can be very useful when operating on a machine without a graphical server installed. |