[rrd-users] Re: grep dates on snmp collected data

Fruitman, Corey Corey.Fruitman at allstream.com
Mon Dec 8 19:55:13 MET 2003


Hi Seun.

Your best bet isn't to use grep at all.  You can use time offset specification in rrdtool and include it in your fetch statement.

Set up a cron job that runs every Saturday and fetches the last five day's data.  Should do the trick.

Hope that helps,
Corey.

-----Original Message-----
From: rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch]On Behalf Of gab.seun
jones.ewulomi
Sent: December 8, 2003 1:14 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] grep dates on snmp collected data


Hi people,

I use egrep to grep on data of the format below

10/11/2003 00:00	299	0.43	0.45	140.54	68.34	72.2	32
11/11/2003 00:05	301	0.25	0.34	93.56	39.77	53.78	28
12/11/2003 00:10	300	0.34	0.37	113.91	54.08	59.83	32

1) To see all data for just a certain day I usually do
grep '^10/.*/2003' <snmp.log>

2)to see all data for some days I usually do
egrep -e '11/.*/2003' -e '12/.*/2003' snmp.log

Now if I want to see the all data for example from 10/11/2003 - 15/11/2003 
how would this be done with awk, egrep or sed.

My main aim is to see/filter all data in a snmp log file just for 
mondays-fridays and omitting all the weekend dates.

Any help or advice will be graetlu appreciated.

regards,
seun

_________________________________________________________________
On the move? Get Hotmail on 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

--
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