There are many network speed monitors out there. However, all of them seem to run in interactive mode, thus being useless when it comes to scripting.
What I'd like to present today is a program that measures the speed of chosen network interface and reports it in a simple manner.
http://thewanderer.dyndns.org/download/ethspeed.tar.bz2 (source code + binaries for i386 and amd64)
The program runs for time specified in its argument list, by default 1 second (call it with no arguments for some help on usage). Then, it reports the results in a form similar to:
Code: Select all
start=1.05992M end=1.37779M delta=325.492K avg=65.0977K
Code: Select all
while true; do ./ethspeed.i386 >stats; done;
Note: I'm too lazy to provide any license notes for the program - you may assume it's GPL'd.