Saturday 25 July 2009

Speedometer - measuring network interface load

On my quest to find the more unusual or interesting network monitoring tools I stumbled upon speedometer. Speedometer is a useful text based network throughput meter - it provides a scrolling load graph and annotates throughput peaks:


To install, use:

sudo apt-get install speedometer

and run by specifying the rx and/or tx network interface:

speedometer -rx wlan0 -tx wlan0

One can also use it to monitor the rate of a running download. For example, suppose I'm downloading a Ubuntu ISO using firefox, one can monitor the download speed using:

speedometer -f Desktop/ubuntu-9.04-desktop-i386.iso.part

The ability to measure the rate that a file is being written to means one can use speedometer to measure the write speed on a filesystem using:

dd if=/dev/zero of=test.dat bs=1M count=4096 &
speedometer -f test.dat

Specifying multiple network interfaces will draw the network activity in graphs stacked one on top of another. However, one can stack the graphs in columns by using the -c flag:

speedometer -rx wlan0 -c -rx wlan0


If you don't like the fancy graphs, a simple text mode output can be selected using the -t flag, as illustrated below:

speedometer -p -tx wlan0
[.]34.1 KB/s [c]34.1 KB/s [A]34.1 KB/s (....::::++++| )
[.]44.7 KB/s [c]37.6 KB/s [A]41.2 KB/s (....::::++++| )
[.]33.8 KB/s [c]38.3 KB/s [A]38.3 KB/s (....::::++++| )
[.]47.2 KB/s [c]39.3 KB/s [A]40.8 KB/s (....::::++++| )
[.]31.1 KB/s [c]39.2 KB/s [A]38.6 KB/s (....::::++++| )
[.]35.0 KB/s [c]38.0 KB/s [A]38.0 KB/s (....::::++++| )
[.]46.7 KB/s [c]38.2 KB/s [A]39.3 KB/s (....::::++++| )
[.]36.9 KB/s [c]38.9 KB/s [A]39.0 KB/s (....::::++++| )

One can also specify the update interval in seconds using the -i flag, e.g. for half second updates use:

speedometer -rx wlan0 -i 0.5

All in all, not bad for a text based console utility.

Postscript. I while back I wrote a network throughput measuring script which can be downloaded from my scripts git repository. It's not as pretty as speedometer, but it's yet tool that you may find useful. To clone this repository, read the instructions here.

No comments:

Post a Comment