Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to run a command line speedtest (not web!)

1,549 views
Skip to first unread message

Anyar Bakalin

unread,
Nov 6, 2015, 2:50:43 PM11/6/15
to
For two reasons, it's a pain to run a web-based speedtest:
1. My Linux browser doesn't have flash (so most don't work)
(eg speedtest.comcast.net, speedtest.net).
2. It's faster to run a quick speedtest via the command line
(eg ping 8.8.8.8, traceroute 8.8.8.8)

Of course, I run a traceroute and ping, but is there a command-line
speedtest ability that will get us up and down megabits per second?




$ traceroute !$
traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
..... same thing all the way to 30.


$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=114 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=233 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=135 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=53 time=151 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=53 time=179 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=53 time=176 ms
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5003ms
rtt min/avg/max/mdev = 114.146/164.989/233.309/38.050 ms

Mike Easter

unread,
Nov 6, 2015, 3:05:58 PM11/6/15
to
Anyar Bakalin wrote:
> is there a command-line speedtest ability that will get us up and
> down megabits per second?

https://github.com/sivel/speedtest-cli Command line interface for
testing internet bandwidth using speedtest.net

http://ubuntuserverguide.com/2014/01/how-to-test-internet-connection-speed-using-speedtest-cli-on-ubuntu-server.html
how to test the Internet connection speed on ubuntu server using the
command line tool called speedtest-cli.



--
Mike Easter

John Hasler

unread,
Nov 6, 2015, 3:37:52 PM11/6/15
to
Mike Easter writes:
> https://github.com/sivel/speedtest-cli Command line interface for testing
> internet bandwidth using speedtest.net

It's in Debian as well. Thank you. I did not know about that.
--
John Hasler
jha...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

William Unruh

unread,
Nov 6, 2015, 4:54:38 PM11/6/15
to
On 2015-11-06, Anyar Bakalin <abak...@us.ibm.com> wrote:
> For two reasons, it's a pain to run a web-based speedtest:
> 1. My Linux browser doesn't have flash (so most don't work)
> (eg speedtest.comcast.net, speedtest.net).
> 2. It's faster to run a quick speedtest via the command line
> (eg ping 8.8.8.8, traceroute 8.8.8.8)

That is not a speedtest.

>
> Of course, I run a traceroute and ping, but is there a command-line
> speedtest ability that will get us up and down megabits per second?

Transfer a large file from one computer to another. Use rsync or ftp or
scp say. rsync with --progress will even give you a running "speed"
although it is a bit upset by the intial setup of rsync.

>
>
>
>
> $ traceroute !$
> traceroute 8.8.8.8
> traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
> 1 * * *
> 2 * * *
> 3 * * *
> ..... same thing all the way to 30.

It means that the intermediat steps do not respond to echo requests. Not
unuaual these days.
But why 8.8.8.8?


Anyar Bakalin

unread,
Nov 6, 2015, 5:40:06 PM11/6/15
to
On Fri, 06 Nov 2015 21:52:22 +0000, William Unruh wrote:

> Transfer a large file from one computer to another. Use rsync or ftp or
> scp say. rsync with --progress will even give you a running "speed"
> although it is a bit upset by the intial setup of rsync.

What machine on the net can I transfer that file to from my home?

tjoen

unread,
Nov 6, 2015, 5:47:37 PM11/6/15
to
John Hasler wrote:

> It's in Debian as well. Thank you. I did not know about that.

What does it mean to "be in debian"?
I'm on Ubuntu. But this failed.
$ sudo apt-get install speedtest-cli

This worked:
$ sudo apt-get install python-pip
$ sudo pip install speedtest-cli

I don't know what "pip" is, but can I delete it now?
If I delete "pip", will it affect the speedtest-cli?

Anyar Bakalin

unread,
Nov 6, 2015, 5:53:31 PM11/6/15
to
On Fri, 06 Nov 2015 12:05:54 -0800, Mike Easter wrote:

> https://github.com/sivel/speedtest-cli
> testing internet bandwidth using speedtest.net

Thanks!
Worked like a charm!

$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Cox Communications (72.203.195.92)...
Selecting best server based on latency...
Hosted by CCI Systems (Lake Buena Vista) [164.86 km]: 160.869 ms
Testing download speed................................
Download: 6.26 Mbit/s

Testing upload
speed.................................................
Upload: 1.48 Mbit/s

John Hasler

unread,
Nov 6, 2015, 6:47:08 PM11/6/15
to
I wrote:
> It's in Debian as well. Thank you. I did not know about that.

tjoen writes:
> What does it mean to "be in debian"?

It means that there is a speedtest-cli package in the Debian archive.

> I'm on Ubuntu. But this failed.
> $ sudo apt-get install speedtest-cli

How?

> This worked:
> $ sudo apt-get install python-pip
> $ sudo pip install speedtest-cli

> I don't know what "pip" is

Package: python-pip
Version: 1.5.6-7
Installed-Size: 455
Maintainer: Debian Python Modules Team <python-mo...@lists.alioth.debian.org>
Architecture: all
Depends: ca-certificates, python-colorama, python-distlib, python-html5lib, python-pkg-resources, python-requests, python-setuptools (>= 0.6c1), python-six, python, python:any (<< 2.8), python:any (>= 2.7.5-5~)
Recommends: build-essential, python-dev-all (>= 2.6), python-wheel
Description-en: alternative Python package installer
pip is a replacement for easy_install, and is intended to be an improved
Python package installer. It integrates with virtualenv, doesn't do partial
installs, can save package state for replaying, can install from non-egg
sources, and can install from version control repositories.
Description-md5: 8d21e4048f43043df36daaae334010b5
Homepage: http://www.pip-installer.org/

Mike Easter

unread,
Nov 7, 2015, 3:53:25 PM11/7/15
to
tjoen wrote:
> I don't know what "pip" is, but can I delete it now?
> If I delete "pip", will it affect the speedtest-cli?

There is plenty to read about at the Python Packaging User Guide, but
the fastest way for you to find out is to uninstall python-pip and see
if speedtest-cli still runs; I think that it would, as speedtest-cli is
simply a python script and you still have python.

https://python-packaging-user-guide.readthedocs.org/en/latest/install_requirements_linux/




--
Mike Easter
0 new messages