Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Speedtes CLI Speedtest is a command line interface for testing internet bandwidth using speedtest.net

Divclasstitle-box

Setup on any device: https://www.speedtest.net/apps or install speedtest cli app: https://www.speedtest.net/apps/cli

HOW TO INSTALL SPEEDTEST

-CLIHOW TO USE SPEEDTEST-CLI


Code Block
languagebash
themeMidnight
titleCentOS 7Fedora/RHELCentos/FedoraRedhat
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
languagebash
themeMidnight
titleDebian/Ubuntu (using the old good apt)
sudo apt-get update && sudo apt-get inst
Code Block
languagebash
themeMidnight
titleCentOS 7/RHEL/Fedora
yum install python python-setuptools python2-speedtest-cli
Div
classtitle-box
install 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


The 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
languagebash
themeMidnight
titleDebian / Ubuntu
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
languagebash
themeMidnight
root@test:~# speedtest-cli --share

Share results:
==============================================================================

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/result/10259127090.png

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
languagebash
themeMidnight
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]
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/c/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 onesThe 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 option, providing the server ID (which is reported in the first column of the list) as the argument:

Code Block
languagebash
themeMidnight
root@test:~# speedtest-cli --server 6083

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

In this tutorial we saw how to install and use the speedtest-cli 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.

CSS Stylesheet.home-banner {
L

Closest servers:

    ID  Name                           Location             Country
==============================================================================
  1348  AS Balticom               
background:
 
#459df0;
    Riga                
color:
 
#fff;
Latvia
  1268  Tet                       
font-size:
 
20px;
    Riga                
padding:
 
20px;
Latvia
  2148  Latvijas Mobilais Telefons     Riga          
}
       Latvia
  5834  SIA Bite Latvija        
.home-banner
  
h2
 
{
    Riga                
color:
 
#fff;
Latvia
 19456  GARMTECH                   
}
    Riga                
.title-box
 
{
Latvia
 24424  LIVAS                 
border:
   
1px
 
none
 
#459df0;
    Riga                
padding:
 
10px;
Latvia
  8455  DEAC                    
}
       Riga              
.title-box
 
>
 
h2
 
{
Latvia
  7322  Telenet, sia                
background: #459df0;
   Riga                 Latvia
 44717  Octopus Telecom      
bottom: 10px;
          Riga                
color:
 
#fff;
Latvia
 40557  2 Cloud Ltd               
margin-left: -10px;
     Riga                 
margin-right: -10px;
Latvia

Now, to test the connection against a specific server, we run the command with the -s option, providing the server ID (which is reported in the first column of the list) as the argument:

Code Block
languagebash
themeMidnight
root@test:~# speedtest -s 1348

speedtest -s 1348

   Speedtest by Ookla

      Server: AS Balticom - Riga (id: 1348)
        
padding
 ISP: 
2px
Sia 
10px;
Veesp
Idle Latency:     1.12 ms   (jitter: 0.33ms, low: 0.85ms, high: 1.66ms)
    Download:   906.21 
position: relative;
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.}