// AIX 5.2
I have a log file ( /u02/oracle/admin/prod/bdump/prod1/alert_prod1.log ).
The log has the following pattern.
Each segment of the log ALWAYS starts with the time stamp with the format of i.e. Tue Oct 23 23:20:20 2007
If a segment has the word 'Error' or 'error' and/or 'ORA-' in it, I want to get the error/alert messages via e-mail.
So, what I want in e-mail is the specific segment i.e. from the the below example.
Tue Oct 23 23:22:05 2007
Errors in file /u02/oracle/admin/prod/udump/prod1/prod1_ora_1360080.trc:
ORA-01555: snapshot too old: rollback segment number 7 with name "RB05" too small
The log is very big and lengthy, so I like to run the crontab every 10 minutes.
Thus, the alert e-mail should contain segments with the word 'Error' or 'error' and/or 'ORA-' within 10 minutes from 'now'.
thx much
********** log example ***********
bla ....
Tue Oct 23 23:20:20 2007
Thread 1 advanced to log sequence 40125
Current log# 1 seq# 40125 mem# 0: /dev/rprod_0256_900
Current log# 1 seq# 40125 mem# 1: /dev/rprod_0256_901
Tue Oct 23 23:20:20 2007
ARC1: Evaluating archive log 4 thread 1 sequence 40124
ARC1: Beginning to archive log 4 thread 1 sequence 40124
Creating archive destination LOG_ARCHIVE_DEST_1: '/u02/oracle/admin/prod/arch/pr
od1/redo1_40124.arc'
ARC1: Completed archiving log 4 thread 1 sequence 40124
Tue Oct 23 23:22:05 2007
Errors in file /u02/oracle/admin/prod/udump/prod1/prod1_ora_1360080.trc:
ORA-01555: snapshot too old: rollback segment number 7 with name "RB05" too small
Tue Oct 23 23:22:42 2007
Thread 1 advanced to log sequence 40126
Current log# 2 seq# 40126 mem# 0: /dev/rprod_0256_902
Current log# 2 seq# 40126 mem# 1: /dev/rprod_0256_903
I have a log file ( /u02/oracle/admin/prod/bdump/prod1/alert_prod1.log ).
The log has the following pattern.
Each segment of the log ALWAYS starts with the time stamp with the format of i.e. Tue Oct 23 23:20:20 2007
If a segment has the word 'Error' or 'error' and/or 'ORA-' in it, I want to get the error/alert messages via e-mail.
So, what I want in e-mail is the specific segment i.e. from the the below example.
Tue Oct 23 23:22:05 2007
Errors in file /u02/oracle/admin/prod/udump/prod1/prod1_ora_1360080.trc:
ORA-01555: snapshot too old: rollback segment number 7 with name "RB05" too small
The log is very big and lengthy, so I like to run the crontab every 10 minutes.
Thus, the alert e-mail should contain segments with the word 'Error' or 'error' and/or 'ORA-' within 10 minutes from 'now'.
thx much
********** log example ***********
bla ....
Tue Oct 23 23:20:20 2007
Thread 1 advanced to log sequence 40125
Current log# 1 seq# 40125 mem# 0: /dev/rprod_0256_900
Current log# 1 seq# 40125 mem# 1: /dev/rprod_0256_901
Tue Oct 23 23:20:20 2007
ARC1: Evaluating archive log 4 thread 1 sequence 40124
ARC1: Beginning to archive log 4 thread 1 sequence 40124
Creating archive destination LOG_ARCHIVE_DEST_1: '/u02/oracle/admin/prod/arch/pr
od1/redo1_40124.arc'
ARC1: Completed archiving log 4 thread 1 sequence 40124
Tue Oct 23 23:22:05 2007
Errors in file /u02/oracle/admin/prod/udump/prod1/prod1_ora_1360080.trc:
ORA-01555: snapshot too old: rollback segment number 7 with name "RB05" too small
Tue Oct 23 23:22:42 2007
Thread 1 advanced to log sequence 40126
Current log# 2 seq# 40126 mem# 0: /dev/rprod_0256_902
Current log# 2 seq# 40126 mem# 1: /dev/rprod_0256_903