Scriptable net speed measuring tool

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
thewanderer
Posts: 416
Joined: 2007-03-19 18:11
Location: my desk, Warsaw, Poland

Scriptable net speed measuring tool

#1 Post by thewanderer »

Hi,
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
As it just sleeps while waiting for the second data read, you can just:

Code: Select all

while true; do ./ethspeed.i386 >stats; done;
It will provide you with self-updating stats file that you can use for any purpose (your own system monitor, web stats display etc.).
Note: I'm too lazy to provide any license notes for the program - you may assume it's GPL'd.
[url=irc://irc.freenode.net/debian]Find me on #debian at irc.freenode.net[/url] | Linux permission HOWTO | Shorewall firewall | Virtual web hosting

DT-Andrew
Posts: 5
Joined: 2008-08-24 21:54

#2 Post by DT-Andrew »

The link
is not currently working. I don't know if this is just something on my end or not but I thought you would like to know.

User avatar
Wolven
Posts: 56
Joined: 2004-11-03 14:23
Location: Norway

#3 Post by Wolven »

DT-Andrew wrote:The link
is not currently working. I don't know if this is just something on my end or not but I thought you would like to know.
The link is not working here either.

thewanderer
Posts: 416
Joined: 2007-03-19 18:11
Location: my desk, Warsaw, Poland

#4 Post by thewanderer »

Bah. There goes my lair cleaning!
Thanks for pointing out the lack of my file. It seems to have been eaten in the midway when upgrading my server. Online again from now on :D
[url=irc://irc.freenode.net/debian]Find me on #debian at irc.freenode.net[/url] | Linux permission HOWTO | Shorewall firewall | Virtual web hosting

Post Reply