[clue] [tech] Calculate total bandwidth usage for an interface using rrdtool

Dan Kulinski daniel at kulinski.net
Fri Jun 10 13:31:25 MDT 2011


Why not have a script that checks a couple of items?  You can check the
total bytes of the interface transferred using ifconfig.  A simple script
will keep track of this.  These counters are reset on reboot and will roll
over.  I don't know if they are still a 32 bit value or not.  Roll over and
reboot detection should be easy and this will give you an exact number, not
a guess from rrdtool numbers.  Simply have a cron job run every 15 minutes
and add the number to a file or even a quick sqlite database. I would
suggest the latter as you can easily sum, average and do all sorts of other
types of reporting.

I am a bit biased against RRD because I have seen spikes in our ganglia
reports that can't be accounted for.  These spikes skew the data and are
usually easily removed but it is a hassle I shouldn't have to go through.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110610/00a8ea30/attachment.html 


More information about the clue mailing list