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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: perl/shell script for alert log

Re: perl/shell script for alert log

From: Jose Luis Delgado <joseluis_delgado_at_yahoo.com>
Date: Wed, 27 Aug 2003 10:34:41 -0800
Message-ID: <F001.005CD836.20030827103441@fatcity.com>


HTH
#!/bin/sh
# This Script search for Oracle error messages in last
100 lines in the alert log file ,
# keep log to a file.

# You should pass name of ORACLE_SID as a parameter.

#!/usr/bin/sh
#
# Comments: Script checks last 100 lines of
# the alert log for specific
# Oracle errors, e-mails depending on the error.

# Parameter: ORACLE_SID
# -------------------
#
#------------------------------------------------

DIR=/u01/app/oracle/admin
ORACLE_SID=$1
export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/8.1.7 export ORACLE_HOME

ALERT_DEST=/u01/app/oracle/admin/${ORACLE_SID}/bdump LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin
export PATH

COLLECTOR=`tail -100
$ALERT_DEST/alert_${ORACLE_SID}.log |grep "ORA-"` if [ "$COLLECTOR" <> "" ]
then
echo ""
echo "******** Errors found in: ====> $ALERT_DEST/alert_${ORACLE_SID}.log"
echo ""
echo $COLLECTOR
echo ""
fi;


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jose Luis Delgado
  INET: joseluis_delgado_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Aug 27 2003 - 13:34:41 CDT

Original text of this message

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