Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Internet speedtest from the CLI

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Internet speedtest from the CLI

#1 Post by Hallvor »

Why use it?

This application is nice if you want to monitor your broadband connection from the CLI. This makes it ideal for headless servers.

Many of you might have tried the web page: http://beta.speedtest.net/ It should give you the same result.


Installation
Simply install it by typing:

Code: Select all

# apt-get install speedtest-cli
Using it
We can now launch the application from the CLI by typing, as regular user:

Code: Select all

$ speedtest-cli
Speedtest will select the server with the lowest ping and give you the results, like this:

Code: Select all

hallvor@debian-hp:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from HomeNet (XX.XX.XX.XX)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Telenor A/S (Aalborg) [168.97 km]: 50.952 ms
Testing download speed................................................................................
Download: 20.07 Mbit/s                                                                                                                                                                          
Testing upload speed....................................................................................................                                                                        
Upload: 17.97 Mbit/s                                                                                                                                                                            
hallvor@debian-hp:~$ 
Not very impressive... :roll:
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Internet speedtest from the CLI

#2 Post by Bulkley »

Nice idea. Thanks.

Does speedtest-cli need Flash? The one on the web site does. I've been using Speed of Me which uses HTML5.

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Internet speedtest from the CLI

#3 Post by Ardouos »

Bulkley wrote:Nice idea. Thanks.

Does speedtest-cli need Flash?
Nope :)
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Internet speedtest from the CLI

#4 Post by Bulkley »

Speedtest CLI is fast!

Code: Select all

Selecting best server based on ping...
Hosted by Monashee Mountain Multimedia (Revelstoke, BC) [196.14 km]: 61.974 ms
Testing download speed................................................................................
Download: 5.79 Mbit/s
Testing upload speed....................................................................................................
Upload: 1.00 Mbit/s
Yes, I know it's slow but Internet is expensive here and I can live with this.

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Internet speedtest from the CLI

#5 Post by RU55EL »

Nice! Thanks for the thread!

Code: Select all

russel@debian-nuc:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from SimpleLink (xxx.xxx.xx.xx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Line Systems (West Chester, PA) [137.61 km]: 83.369 ms
Testing download speed................................................................................
Download: 10.70 Mbit/s
Testing upload speed....................................................................................................
Upload: 21.33 Mbit/s
interesting that my upload speed is about double the download speed.

User avatar
alan stone
Posts: 269
Joined: 2011-10-22 14:08
Location: In my body.

Re: Internet speedtest from the CLI

#6 Post by alan stone »

RU55EL wrote:interesting that my upload speed is about double the download speed.
:oops: Is your ISP located south of where you are? :oops:

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Internet speedtest from the CLI

#7 Post by kedaha »

Very nice! Thanks very much for the post. I've just tried it on my headless server:

Code: Select all

user@server:~$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from ****** (**.***.***.***)...
Selecting best server based on latency...
Hosted by wilhelm.tel (Norderstedt) [18.59 km]: 22.128 ms
Testing download speed........................................
Download: 93.44 Mbits/s
Testing upload speed..................................................
Upload: 79.99 Mbits/s
Not bad at all!
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Internet speedtest from the CLI

#8 Post by RU55EL »

alan stone wrote:
RU55EL wrote:interesting that my upload speed is about double the download speed.
:oops: Is your ISP located south of where you are? :oops:
Not anymore:

Code: Select all

russel@debian-nuc:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from SimpleLink (xxx.xxx.xx.xx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Comcast (Baltimore, MD) [139.59 km]: 103.526 ms
Testing download speed................................................................................
Download: 9.94 Mbit/s
Testing upload speed....................................................................................................
Upload: 22.92 Mbit/s
[edit]
It seems to be balanced at work:

Code: Select all

russel@NUC-G:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from SimpleLink (xxx.xxx.xx.xx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Hotwire Fision (Philadelphia, PA) [130.72 km]: 78.648 ms
Testing download speed................................................................................
Download: 18.00 Mbit/s
Testing upload speed....................................................................................................
Upload: 18.67 Mbit/s
[/edit]

gusnov
Posts: 1
Joined: 2018-01-27 03:02

Re: Internet speedtest from the CLI

#9 Post by gusnov »

thank u, its work bro :)

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Internet speedtest from the CLI

#10 Post by sunrat »

Be aware of the section titled "Inconsistency" at https://github.com/sivel/speedtest-cli
I just tested with both speedtest-cli and Speedtest beta and got similar download speeds but very different ping and upload. This was expected as I also recently compared 4 web-based test sites and got different results every time even with multiple consecutive uses of the same test.
Bottom line is speed tests will only give ball-park results.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

jppattison
Posts: 42
Joined: 2015-02-23 18:13

Re: Internet speedtest from the CLI

#11 Post by jppattison »

Thanks Hallvor, I was wondering if we were getting what we were promised - I don't think so ....

Code: Select all

Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by xxxxx(Billings, MT) [73.05 km]: xxxxxx
Testing download speed................................................................................
Download: 7.58 Mbit/s
Testing upload speed....................................................................................................
Upload: 1.53 Mbit/s
Billings is south of us by about 110 miles! pretty slow on the upload!

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Internet speedtest from the CLI

#12 Post by Thorny »

jppattison wrote:..., I was wondering if we were getting what we were promised - I don't think so ....
You should double check your terms of service, generally they list speeds as up to, since many things can affect actual speed at any given time. Internet congestion, busy server that you are communicating with, rerouteing due to hardware issues on the shortest path, others. Even things like time of day can matter. It is often on non-commercial accounts that upload is significantly lower than download speed.

DBNLNX
Posts: 5
Joined: 2018-07-02 14:51

Re: Internet speedtest from the CLI

#13 Post by DBNLNX »

If you add --server xxxx it can test speed against server you choose.
Here you can find server list - https://www.speedtestserver.com
root@Debian:/home/debian/speedtest# ./speedtest-cli --server 1234
Retrieving speedtest.net configuration...
Testing from XXX (xxx.xxx.xxx.xxx)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by XXX [312.63 km]: 11.086 ms
Testing download speed................................................................................
Download: 817.73 Mbit/s
Testing upload speed................................................................................................
Upload: 81.22 Mbit/s

Post Reply