[rrd-users] Re: using grep on snmp collected data
gab.seun jones.ewulomi
seun_ewulomi at hotmail.com
Tue Nov 18 10:43:09 MET 2003
Hi,
Like to gratefully thank everyone for their input. I now have different ways
to do this.
Thanks again.
Regards,
seun
>From: Alex van den Bogaerdt <alex at ergens.op.het.net>
>To: rrd-users at list.ee.ethz.ch
>Subject: [rrd-users] Re: using grep on snmp collected data
>Date: Mon, 17 Nov 2003 23:24:43 +0100
>
>On Mon, Nov 17, 2003 at 09:26:26PM +0100, Serge Maandag wrote:
> > Put these lines in a file called "bla" and for the sum of all entries
>between 10 and 14 try:
> >
> > 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" :)
>
>
>To save cpu cycles, file descriptors and what more:
>
><bla awk '/ 1[0123]:/{s+=$10}END{print "sum is",s," average is ",s/NR}'
>
>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.
>
>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
>
_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile
--
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