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 -- //www.freelists.org/webpage/oracle-l