[rrd-users] Re: using grep on snmp collected data
Serge Maandag
serge.maandag at staff.zeelandnet.nl
Tue Nov 18 12:17:34 MET 2003
> > cat bla | grep ' 1[0123]:'|awk '{s += $10}END{print "sum is", s, " average is", s/NR}'
> In addition to the "useles use of cat award", this also qualifies for the "useles use of grep award" :)
useles as in use less s in useless that is. :)
It's a 10 seconds fix for which I used a test file called bla.
Please don't shoot me...
> This, by the way, selects " 10:" which probably stands for the
> timeframe "09:55:00 .. 10:00:00". After all, a rate is not known
> until the time has passed; the entry at 10:00 should thus describe
> the past, not the future. Similarly 14:00:00 is not selected while
> it probably should.
You're right there though..
Serge.
> -----Original Message-----
> From: Alex van den Bogaerdt [mailto:alex at ergens.op.het.net]
>
> To save cpu cycles, file descriptors and what more:
>
> <bla awk '/ 1[0123]:/{s+=$10}END{print "sum is",s," average
> is ",s/NR}'
>
> HTH
> Alex
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list