[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:00299 0.430.45140.54 68.34 72.232 11/11/2003 00:05301 0.250.3493.56 39.77 53.78 28 12/11/2003 00:10300 0.340.37113.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:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: using grep on snmp collected data
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 [EMAIL PROTECTED] To: rrd-users@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:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi _ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] using grep on snmp collected data
Hi people, I have a huge ascii text file with data collection point. the text file is of the form(below) How could I use grep/awk to grep for data between a time frame In KbitsR1 6/1.10 3/105 to R2 31/10/03 10:15:00 3657.07 In KbitsR1 6/1.10 3/105 to R2 31/10/03 10:20:00 3976.85 In KbitsR1 6/1.10 3/105 to R2 31/10/03 10:25:00 5088.18 In KbitsR1 6/1.10 3/105 to R2 31/10/03 11:00:00 3471.26 In KbitsR1 6/1.10 3/105 to R2 31/10/03 11:05:00 4311.4 In KbitsR1 6/1.10 3/105 to R2 31/10/03 11:10:00 2000.9 In KbitsR1 6/1.10 3/105 to R2 31/10/03 12:50:00 3021.64 In KbitsR1 6/1.10 3/105 to R2 31/10/03 12:55:00 3385.86 In KbitsR1 6/1.10 3/105 to R2 31/10/03 13:00:00 3483.98 In KbitsR1 6/1.10 3/105 to R2 31/10/03 13:05:00 3920.98 In KbitsFR1 6/1.10 3/105 to R2 31/10/03 14:00:00 5627.66 In KbitsR1 6/1.10 3/105 to R2 31/10/03 14:05:00 5252.07 In KbitsR1 6/1.10 3/105 to R2 31/10/03 14:10:00 3768.24 I can use awk and grep to get required columns and to get data for a set date but I dont know how to grep for data for between time frames in a day. From the week data to get all data for a certain date i usually use $ grep '^03/.*/2003' data file BUT If I would like to see all data within a week between 10am and 14pm how can I do this? Can someone please help as I think have tried everything to my knowledge and understanding Any help will be greatly appreciated regards, gab _ Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] change fonts on png graphs
Hi People, How can I change the fonts on the png graphs generated by rrdtool regards, seun _ Overloaded with spam? With MSN 8, you can filter it out http://join.msn.com/?page=features/junkmailpgmarket=en-gbXAPID=32DI=1059 -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: MRTG to RRDTool.
Hi, Il try and search my file. But all in all from on top of my head 1)install mrtg(which you have) 2)install rrdtool 3)in your mrtg.cfg files under the Global Defaults part put the statement ### Global Defaults PathAdd: /usr/local/rrdtool/bin #path to your rrdtool bin directory LibAdd: /usr/local/rrdtool/lib/perl #path to the rrdtool lib perl directory LogFormat: rrdtool Some one on the forum might be able to give more details regards, seun From: Carles Xavier Munyoz Baldó [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: rrd-users@list.ee.ethz.ch Subject: [rrd-users] MRTG to RRDTool. Date: Fri, 25 Apr 2003 12:00:54 +0200 Hi, Is there any tutorial for migrate my MRTG network traffic graphics to the RRDTool monitoring graphics system ? Greetings. --- Carles Xavier Munyoz Baldó [EMAIL PROTECTED] http://www.unlimitedmail.net/ --- -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi _ Overloaded with spam? With MSN 8, you can filter it out http://join.msn.com/?page=features/junkmailpgmarket=en-gbXAPID=32DI=1059 -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: Help with running remstats
Hi Thomas, Have downloaded and compiled it very fine. You just save me from having to compile a old version of perl. Thank you very much. The only problem now is starting the remstats processes using ./run-remstats2 has you suggested I get this error in the LAST/LOGs 2003-03-17 16:36:56 read config file 2003-03-17 16:36:56 starting 2003-03-17 16:36:56 starting stage check 2003-03-17 16:36:56 forked 31315 for check:check-config 2003-03-17 16:36:57 finished 31315 for check:check-config 2003-03-17 16:36:57 done stage check 2003-03-17 16:36:57 starting stage ping 2003-03-17 16:36:57 forked 31317 for ping:ping 2003-03-17 16:37:10 finished 31317 for ping:ping 2003-03-17 16:37:10 done stage ping 2003-03-17 16:37:10 starting stage collectors 2003-03-17 16:37:10 forked 31323 for collectors:nt-status 2003-03-17 16:37:11 forked 31326 for collectors:dbi 2003-03-17 16:37:12 forked 31329 for collectors:port 2003-03-17 16:37:13 forked 31332 for collectors:log 2003-03-17 16:37:14 forked 31335 for collectors:snmp 2003-03-17 16:37:15 forked 31338 for collectors:unix-status 2003-03-17 16:37:20 finished 31326 for collectors:dbi 2003-03-17 16:37:21 finished 31329 for collectors:port 2003-03-17 16:37:21 finished 31323 for collectors:nt-status 2003-03-17 16:37:21 finished 31332 for collectors:log 2003-03-17 16:37:21 finished 31338 for collectors:unix-status 2003-03-17 16:37:22 finished 31335 for collectors:snmp 2003-03-17 16:37:22 done stage collectors 2003-03-17 16:37:22 starting stage post-collector 2003-03-17 16:37:22 forked 31343 for post-collector:error-collector 2003-03-17 16:37:23 finished 31343 for post-collector:error-collector 2003-03-17 16:37:23 done stage post-collector 2003-03-17 16:37:23 starting stage monitors 2003-03-17 16:37:23 forked 31346 for monitors:ping-monitor 2003-03-17 16:37:24 forked 31348 for monitors:alert-monitor 2003-03-17 16:37:25 finished 31346 for monitors:ping-monitor 2003-03-17 16:37:25 finished 31348 for monitors:alert-monitor 2003-03-17 16:37:25 done stage monitors 2003-03-17 16:37:25 starting stage pagemakers 2003-03-17 16:37:25 check for 'CONFIGCHANGE' failed; skipped 2003-03-17 16:37:25 done stage FINISH DEBUG output of ./run-remstats2 [EMAIL PROTECTED] bin]$ ./run-remstats2 -d 000 DEBUG: DEBUG: Starting stage check DEBUG: check for '' passed snip DEBUG: DEBUG: Starting stage ping DEBUG: check for '' passed snip DEBUG: Starting stage collectors DEBUG: check for '' passed snip DEBUG: DEBUG: Starting stage post-collector DEBUG: check for '' passed DEBUG: freq: post-collector:error-collector: last=0, freq=300 = 1 DEBUG: 2003-03-17 17:09:29 31750 forked for post-collector:error-collector DEBUG: 2003-03-17 17:09:31 31750 finished for post-collector:error-collector DEBUG: DEBUG: Starting stage monitors DEBUG: check for '' passed snip: DEBUG: Starting stage pagemakers DEBUG: last changed config was /var/remstats/etc/config/./html at 2003-03-17 15:49:29 DEBUG: check_when: stage=pagemakers, check=CONFIGCHANGE = 0 DEBUG: check for 'CONFIGCHANGE' failed; skipped 1)when I invoke the ./run-remstats2 command it just hangs then quits. But when I do a ps I see no remstat processes 2)AFAIK All the file have been created under the hosts, data, html etc directories. 3)To go to the remstats url index page. typing the http://ip address of server I presume should take me straight there but all I see is the apache test page. It is saying failed for 'CONFIGCHANGE'. i really dont know what to do with that file or what it does Please any help will me appreciated. I feel so discouraged. regards, seun _ MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: Help with running remstats
Hi Thomas, Thank you very much for your reply it. My apologies I didnt mention I was running apache(every information counts). I had no problems compiling and installing the dependencies. I just couldnt seem to get my head round the configuration even when I used the -h switch for help. im still getting the error while starting 'run-remstats' (OUTPUT ERROR) [EMAIL PROTECTED] bin]$ ./run-remstats Errors from ping-collector: defined(@array) is deprecated at /var/remstats/bin/ping-collector line 75. (Maybe you should just omit the defined()?) updater: ERROR update for /var/remstats/data/bristol/ping.rrd failed with 1047573602:10:10:13:110:930 Errors from port-collector: defined(@array) is deprecated at /var/remstats/bin/port-collector line 75. (Maybe you should just omit the defined()? With the reply you posted Yeah. You've got a more recent perl than was available when I built that version of remstats. You can ignore them for now. I'm going to do a release within a week on sourceforge. will downgrading to the perl version 5.005_03 solve the issue because I still cant start 'run-remstats' or will it be better to wait for your release within a week on sourceforge. Will you be releasing another version of remstats thanks again regards, gab _ Stay in touch with absent friends - get MSN Messenger http://messenger.msn.co.uk -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Re: Help with running remstats
Hi Thomas, 1)My web-server is run as root? How do I change it otherwise 2)I did as you suggested. I went into the directory where unpacked it remstats and typed make owner 3)Yes I did create a remstats user. I have also created a host config file(by your direction) using new-config. which then created the pseudo-host _remstats_ 4) I then tried to use the new-ping-hosts to create a host. Im I using the new-ping-hosts in the correct way. can you help if possible. (output below) ./new-ping-hosts -d -f /var/remstats/etc/config/ /var/remstats/etc/config/hostnames Argument -f isn't numeric in numeric gt () at /var/remstats/lib/remstats.pl line 2715, FILE line 1. DEBUG: unknown host aberdeen; attempting to continue DEBUG: unknown host bristol; attempting to continue /var/remstats/etc/config/hostnames = the file that contains hostnames this however created a host in the /var/remstats/etc/config/hosts directory called aberdeen and bristol. But they didnt look right. I then edited with the correct ip address, group etc 5)I then tried to run run-remstats logging in as remstats user (su - remstats). But I get the error below Thank you very much for your reply. [EMAIL PROTECTED] bin]# ./run-remstats Errors from ping-collector: defined(@array) is deprecated at /var/remstats/bin/ping-collector line 75. (Maybe you should just omit the defined()?) Errors from port-collector: defined(@array) is deprecated at /var/remstats/bin/port-collector line 75. (Maybe you should just omit the defined()?) Errors from snmp-route-collector: defined(@array) is deprecated at /var/remstats/bin/snmp-route-collector line 64. (Maybe you should just omit the defined()?) 6)The version of remstats Im running is remstats-1.00a4 I was using the latest version(remstats-1.0.9b) but decided to drop down to the 1.00a4 version because I was getting to many errors. My apologies on the long reply. But your help or anyones help will be greatly appreciated regards From: Thomas Erskine [EMAIL PROTECTED] To: gab.seun jones.ewulomi [EMAIL PROTECTED],rrd-users@list.ee.ethz.ch Subject: [rrd-users] Re: Help with running remstats Date: Wed, 12 Mar 2003 05:57:21 -0500 At 05:17 2003-03-11, gab.seun jones.ewulomi wrote: Hi, Can anyone help me. I cant seem to get remstats to work. Iv followed the documentation in and out and I still dont know what is wrong. Any help will be greatly appreciated Error below [EMAIL PROTECTED] bin]# /usr/bin/run-remstats You're going to have problems running remstats as root. You don't run your web-server as root do you? Go back to the directory where you unpacked it and , as root, type make owner. Then only run remstats programs as the remstats user. I'm assuming that you did create one. run-remstats: ERROR: put_status: directory /var/remstats/data/_remstats_ is missing; skipped This will happen if you don't have a host config file for the pseudo-host _remstats_. Since new-config will create this, I don't know how you avoided getting it created? How did you create your configuration directory? Did you use new-config /var/remstats/etc/config or wherever you told it to expect configuration directories? Which version of remstats are you installing from? _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- Unsubscribe mailto:[EMAIL PROTECTED] Helpmailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdminhttp://www.ee.ethz.ch/~slist/lsg2.cgi
[rrd-users] Help with running remstats
Hi, Can anyone help me. I cant seem to get remstats to work. Iv followed the documentation in and out and I still dont know what is wrong. Any help will be greatly appreciated Error below [EMAIL PROTECTED] bin]# /usr/bin/run-remstats run-remstats: ERROR: put_status: directory /var/remstats/data/_remstats_ is missing; skipped run-remstats: ERROR: put_status: directory /var/remstats/data/_remstats_ is missing; skipped run-remstats: ERROR: put_status: directory /var/remstats/data/_remstats_ is missing; skipped run-remstats: ERROR: put_status: directory /var/remstats/data/_remstats_ is missing; skipped Errors from check-config: check-config: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact Services check-config: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups check-config: ABORT: 2 errors found Errors from ping-collector: defined(@array) is deprecated at /var/remstats/bin/ping-collector line 75. (Maybe you should just omit the defined()?) ping-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact Arup-ITS-Services ping-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups ping-collector: ABORT: 2 errors found updater: ERROR read_config_hosts(hosts): Aberdeen: unknown line: contact Arup-ITS-Services updater: ERROR read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups updater: ABORT: 2 errors found Errors from port-collector: defined(@array) is deprecated at /var/remstats/bin/port-collector line 75. (Maybe you should just omit the defined()?) port-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact Arup-ITS-Services port-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups port-collector: ABORT: 2 errors found updater: ERROR read_config_hosts(hosts): Aberdeen: unknown line: contact ITS-Services updater: ERROR read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups updater: ABORT: 2 errors found Errors from snmp-route-collector: defined(@array) is deprecated at /var/remstats/bin/snmp-route-collector line 64. (Maybe you should just omit the defined()?) snmp-route-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact ITS-Services snmp-route-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups snmp-route-collector: ABORT: 2 errors found Errors from log-collector: defined(@array) is deprecated at /var/remstats/bin/log-collector line 68. (Maybe you should just omit the defined()?) log-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact ITS-Services log-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups log-collector: ABORT: 2 errors found Errors from unix-status-collector: defined(@array) is deprecated at /var/remstats/bin/unix-status-collector line 66. (Maybe you should just omit the defined()?) unix-status-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact ITS-Services unix-status-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups unix-status-collector: ABORT: 2 errors found Errors from snmp-collector: defined(@array) is deprecated at /var/remstats/bin/snmp-collector line 68. (Maybe you should just omit the defined()?) snmp-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contact ITS-Services snmp-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups snmp-collector: ABORT: 2 errors found Errors from nt-status-collector: defined(@array) is deprecated at /var/remstats/bin/nt-status-collector line 83. (Maybe you should just omit the defined()?) nt-status-collector: ERROR: read_config_hosts(hosts): Aberdeen: unknown line: contactArup-ITS-Services nt-status-collector: ERROR: read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups nt-status-collector: ABORT: 2 errors found updater: ERROR read_config_hosts(hosts): Aberdeen: unknown line: contact Arup-ITS-Services updater: ERROR read_config_hosts(hosts): www.theweathernetwork.com wants to be in group Other Servers, but that's not listed in groups updater: ABORT: 2 errors found Errors from ping-monitor: ping-monitor: read_config_hosts(hosts): Aberdeen: unknown line: