22

I'm looking to find a way to test my internet speed at home through ssh. Does anyone know a terminal app that can give me calculations similar info to speedtest.net?

It would also be really cool if there was something that would do tests based on common internet ports too (i.e. web, torrent, etc) so you can see if you're getting throttled by your ISP.

1

6 Answers 6

17

You may use nload (Install nload) for this purpose. Sample output:

alt text

You can install nload by this command:

sudo apt-get install nload

Also available in software center.

1
  • this works perfect using the -u and -t options. Thanks!
    – wajiw
    Nov 30, 2010 at 14:12
9

Update Nov 2016: I discontinued it. Please use another provider i.e. Init7 with http://speedtest.init7.net/10GB.dat

Original answer:

There is also this easy "speedtest":

wget -O/dev/null speedtest.pixelwolf.ch

This gives you the current speed and it is available up to 100 megabits per second.

6
  • Could you plz explain the -0/dev/null bit? Apr 4, 2013 at 11:08
  • 2
    quote from man wget: -O FILE or --output-document=FILE is where to save the result of wget command. And /dev/null is a device in Linux systems which is not really existent. Everything saved there or sent to there will be ignored and it does not use space on your filesystem. Otherwise you would have to delete the saved file of the speedtest.
    – thonixx
    Apr 4, 2013 at 15:09
  • but why is it then -0/dev/null and not -0 /dev/null; does the space not matter? does it work with and without the space? Apr 4, 2013 at 15:13
  • 2
    Yep, works with and without. And it is O (like Oscar) and not 0 (zero).
    – thonixx
    Apr 4, 2013 at 18:32
  • For me it failed. --2016-11-06 06:33:56-- http://speedtest.pixelwolf.ch/ Resolving speedtest.pixelwolf.ch (speedtest.pixelwolf.ch)... failed: No address associated with hostname. wget: unable to resolve host address 'speedtest.pixelwolf.ch' Nov 6, 2016 at 6:34
6

How about netperf? http://manpages.ubuntu.com/manpages/maverick/man1/netperf.1.html

netperf Install netperf

Quoting from the man page:

Netperf is a benchmark that can be used to measure various aspects of networking performance. Currently, its focus is on bulk data transfer and request/response performance using either TCP or UDP, and the Berkeley Sockets interface. In addition, tests for DLPI, and Unix Domain Sockets, tests for IPv6 may be conditionally compiled-in.

3
  • What a brilliant program. Nov 26, 2010 at 10:58
  • Keeps giving me an error in 10.04: netperf: send_tcp_stream: data socket connect failed: Address family not supported by protocol. any ideas on an example usage?
    – wajiw
    Nov 30, 2010 at 14:04
  • TCP Stream Performance The TCP stream performance test is the default test type for the netperf program. The simplest test is performed by entering the command: /opt/netperf/netperf -H remotehost which will perform a 10 second test between the local system and the system identified by remotehost. The socket buffers on either end will be sized according to the systems' default and all TCP options (e.g. TCP_NODELAY) will be at their default settings.
    – OpenNingia
    Dec 1, 2010 at 20:17
5

The simplest solution I know is to simply use

wget -O/dev/null http://releases.ubuntu.com/saucy/ubuntu-13.10-desktop-i386.iso

wget will provide you with file size, download time, and download speed.

If you need more complex solution, have a look at iperf. This solution is however more complicated, because it requires more set-up, and is not straight-forward (for example it requires a server with higher speed than yours).

6
  • 1
    I'm more looking for a package that will return the calculations as a more simple string so I can setup a script that will put those into a database and let me run analytics on my connection. Thanks for the suggestion though
    – wajiw
    Nov 25, 2010 at 21:17
  • I guess you may need to write a small bash script that would format the wget output to a simple string (and might even run test periodically), but when it comes to measuring speed, I doubt if there is anything that will return just a string, most software says lots of thing in addition, and hopes the user will be happy with the details it provided, so I suspect you may need to format the output manually (or with a script) Nov 25, 2010 at 21:23
  • @RafałCieślak Could you plz explain the -0/dev/null bit? Apr 4, 2013 at 11:07
  • 1
    @nuttyaboutnatty sure! It tells wget to write downloaded data to /dev/null, so in fact everything that is downloaded does not get stored/saved anywhere, as it would be silly to waste one's disk space to test network speed. Apr 4, 2013 at 15:00
  • @RafałCieślak thanks; I had never heard about the "null device" en.wikipedia.org/wiki//dev/null before; interesting stuff, slowling expanding my *nix knowledge... Elsewhere I've seen wget --output-document=/dev/null http://speedtest.. How does this differ to -0/dev/null ? Apr 4, 2013 at 15:07
2

you also can use iftop while transferring files

0
scp [email protected]:/some-file.ext .

will show something like :

some-file.ext
24% 16KB 13.0KB/s 00:03 ETA^

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .