[rrd-users] find top 10 in > 4000 rrd files
rrdtool at martin.sperl.org
Thu Oct 2 10:49:42 CEST 2014
Here a simple way to do it:
for x in *.rrd; do
rrdtool graph /dev/null \
--start ... --end ... --step ... \
| grep = \
| sort -t= -nrk 2 \
| head -10
and you get the top 10
Set start,step,end and the column you are interested in.
possibly modify the vdef to what you need to measure.
Note: this assumes no ":" or "=" in the filename as you would otherwise
need to escape the ":" in the filename and then use a different
separator besides "=" for output/sorting !
On 02.10.2014 10:29, Rob Hassing wrote:
> I am measuring the bandwidth usage of over 4000 ports in a network using
> The sFlow daemon I use generates a rrd file for each port.
> So I have over 4000 rrd files named: x.x.x.x-Y.rrd
> Where x.x.x.x is the ip address of the host and y is the portindex number.
> 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?
> Thank you very much in advance
> Best regards,
> Rob Hassing
> View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/find-top-10-in-4000-rrd-files-tp7582509.html
> Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
More information about the rrd-users