Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Monitoring the alert log ...

Monitoring the alert log ...

From: stv <stvsmth_at_gmail.com>
Date: Sun, 10 Sep 2006 09:20:06 -0600
Message-ID: <9493d0340609100820x1b1efe40m8c1d25530d6c97ed@mail.gmail.com>


Howdy,

I'm a newish DBA and I wanna simplify some daily checks. I'm curious as to how other people monitor the alert logs. Is this something most folks do?

Right now, I have a simple shell script that looks at the tail of the alert log. I exclude (or at least that's my intention) regular log switches & log archives. Generally speaking this should generate no output :) but if it does, I just grab the line number & go a huntin.

This is the first cut, if I keep it around I clean some things up like checking inputs, more robust dropping of timestamps or other things that folks may suggest.

Also, what do other folks do about cycling the alert_SID.log? Is there a size you aim for? Date range?

#!/bin/sh

# alertlog -- default to last 200 lines of the alert_log,
# but if caller passes a parameter, use that number
# alert_excludes trims all dates, and standard
# redo log activity

if [ $# = 1 ] ; then
  NUMLINES=$1
else
  NUMLINES=200
fi
tail -${NUMLINES} $ORACLE_BASE/admin/${SID}/bdump/alert_${SID}.log \

     | fgrep -vnf alert_excludes

$ cat alert_excludes
Creating archive
Evaluating archive
Beginning to archive
Completed archiving
Thread 1 advanced
Current log#
Sat
Sun
Mon
Tue
Wed
Thu
Fri

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Sep 10 2006 - 10:20:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US