following script reads the entries for entire day to end of alert log
set `date`;
gret=`grep -n $1\ $2\ $3 /ora/admin/ORACLE_SID/bdump/alert_ORACLE_SID.log|awk -F: '{print $1}'|head -1`
dy=`cat /ora/admin/ORACLE_SID/bdump/alert_ORACLE_SID.log|wc -l`
di=`echo $dy-$gret|bc`
tail -$di /ora/admin/ORACLE_SID/bdump/alert_ORACLE_SID.log>filtemp
mailx -s "daily alert log" abs@dhdjh.com<filtemp
No comments:
Post a Comment