[rrd-users] find top 10 in > 4000 rrd files

Steve Shipway s.shipway at auckland.ac.nz
Thu Oct 2 22:40:15 CEST 2014


> I am measuring the bandwidth usage of over 4000 ports in a network using
> sFlow.
...
> Now I would like to find the top 10 of bandwidth usage in these 4000
files.
> Anyone done something like this before or does somebody have an idea on
> how to do this?

The Routers2 frontend for MRTG/RRD has a feature to do similar to this,
ordering the component interface graphs on the Compact display or summary
page by current or average in or out.  It also lets you suppress interfaces
with a zero usage, though it doesn't order by the total usage.  

However, with 4000+ RRD files, there's a fair amount of processing required,
particularly if you want to order by the total usage (IE, sum[time
period](avg x interval)).  To order by daily total, this is the same as
ordering by daily average (because daily total = daily average rate x 1day),
so make sure you have an RRA that pre-calculates this so that you can
retrieve the daily average with a single rrdfetch of a single value per RRD.
Then you'll just want to sort your resulting 4000+ element array to get the
top 10.

Steve

Steve Shipway
s.shipway at auckland.ac.nz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5909 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20141002/feea5db4/attachment.bin>


More information about the rrd-users mailing list