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.

Jorge Castro
  • 71,754
wajiw
  • 2,396
  • Or you can use iperf as was suggested in this hint: http://askubuntu.com/questions/7976/how-do-you-test-the-network-speed-betwen-two-boxes. – larsr Sep 18 '13 at 11:55

6 Answers6

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.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
aneeshep
  • 30,321
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.

thonixx
  • 862
  • Could you plz explain the -0/dev/null bit? – nutty about natty Apr 04 '13 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 04 '13 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? – nutty about natty Apr 04 '13 at 15:13
  • 2
    Yep, works with and without. And it is O (like Oscar) and not 0 (zero). – thonixx Apr 04 '13 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'

    – Ahmad Awais Nov 06 '16 at 06:34
  • Sorry for that. I did not continue the file (I did it for a few years since 2012 though). Currently I use "wget -O /dev/null http://speedtest.init7.net/10GB.dat" which is provided by the Gigabit provider Init7 in Switzerland. – thonixx Nov 07 '16 at 15:41
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.

OpenNingia
  • 3,303
  • What a brilliant program. – Stefano Palazzo Nov 26 '10 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 '10 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 01 '10 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).

  • 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 '10 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) – Rafał Cieślak Nov 25 '10 at 21:23
  • @RafałCieślak Could you plz explain the -0/dev/null bit? – nutty about natty Apr 04 '13 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. – Rafał Cieślak Apr 04 '13 at 15:00
  • @RafałCieślak thanks; I had never heard about the "null device" http://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 ? – nutty about natty Apr 04 '13 at 15:07
  • @nuttyaboutnatty These two options are exactly the same. -0 is a synonym for --optput-document. Using man wget will help you explore it's all flags! – Rafał Cieślak Apr 04 '13 at 17:26
2

you also can use iftop while transferring files

jet
  • 7,274
0
scp [email protected]:/some-file.ext .

will show something like :

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