nv-l

RE: [nv-l] TRAPD.LOG - archival

2002-07-18 15:00:46
Subject: RE: [nv-l] TRAPD.LOG - archival
From: "Allison, Jason (JALLISON)" <JALLISON AT arinc DOT com>
To: "'nv-l'" <nv-l AT lists.tivoli DOT com>
Date: Thu, 18 Jul 2002 15:00:46 -0400
Ill shoot from the hip here

--
#!/bin/ksh

MAXSIZE=5000

LOG_FILE_NAME=`date -u +%m%d%Y-%H%M%S"`-trapd.log

# Size in K
CURRENT_SIZE=`du -k /usr/OV/log/trapd.log | awk {'print \$1'}`

if [[ $MAXSIZE -le $CURRENT_SIZE ]]; then

  # Lets just delete
  cp /usr/OV/log/trapd.log /tmp/$LOG_FILE_NAME
  # So no one cut and pastes!
  # rm /usr/OV/log/trapd.log
  # touch will only work as root (sudo)
  touch /usr/OV/trapd.log

  # Compress
  compress /tmp/$LOG_FILE_NAME

fi

Enjoy...


Jason Allison
Principal Engineer
ARINC Incorporated
Office:  (410) 266-2006
FAX:  (410) 573-3026


-----Original Message-----
From: Barr, Scott [mailto:Scott_Barr AT csgsystems DOT com]
Sent: Thursday, July 18, 2002 1:31 PM
To: nv-l
Subject: RE: [nv-l] TRAPD.LOG - archival


You are on track with everything here. I don't really care about the
interval, it can be hours, days or weeks, I just want it to roll to an
archival file when it attempts to wrap to the beginning after having reached
maximum size. I'll see if anyone else has any suggestions. 

-----Original Message-----
From: Allison, Jason (JALLISON) [mailto:JALLISON AT arinc DOT com]
Sent: Thursday, July 18, 2002 11:09 AM
To: 'nv-l'
Subject: RE: [nv-l] TRAPD.LOG - archival


I think the problem you will run into is Netview continues to write to the
same log file.  My recommendation would be to determine you 'archival'
needs:  hourly, daily, weekly; traps 1, 2, 3, 6, 899, etc; etc.  Then write
a simple script to extract your needed information, compress and viola.
Have that script run by crontab so you have a date/time reference.

Now, if you dont need to archive at all by date, just copy off a version of
the file at a specified time frame.

If you are worried about a simple syslog file, this is how my Admin group
handles it:
rm -f /tmp/syslog.out
touch /tmp/syslog.out
refresh -s syslogd

I hope I at least answered you question by saying I am unaware of any
Netview specific mechanisims.

Jason Allison
Principal Engineer
ARINC Incorporated
Office:  (410) 266-2006
FAX:  (410) 573-3026


-----Original Message-----
From: Barr, Scott [mailto:Scott_Barr AT csgsystems DOT com]
Sent: Thursday, July 18, 2002 11:53 AM
To: nv-l
Subject: [nv-l] TRAPD.LOG - archival


I am looking for the best way to maintain my trapd.log - I see there is an
option for a "maintenance" script server setup. I want to keep several
iterations of the log so history is available further back then whats in the
current trapd.log. Any recommendations? The problem is Cisco (yah, go
figure) sending in "Syslog" traps for EVERYTHING (content switches,
firewalls, routers etc.) - I have no easy way to keep them out of the log (I
can't filter syslog traps I need some of them but not all of them in the
log)

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)


---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)

<Prev in Thread] Current Thread [Next in Thread>