Hi
I have a log file that I just want the interesting stuff out of each day.
Each record starts with a Date and may be on two or more lines.
How can I filter out the sections that include 'Current log#' and 'media recovery disabled', but keep the other sections. The output will go to a new file.
I haven't had to do any awk work before (got away with it till now!) and I can see there's a potential number of different methods, but Im keep getting stumped on the various options.
The log file looks like:
Tue Aug 20 08:02:18 2002
Thread 1 advanced to log sequence 14581
Tue Aug 20 08:02:18 2002
ARC0: media recovery disabled
Tue Aug 20 08:02:18 2002
Current log# 1 seq# 14581 mem# 0: /log_area/LOG1A.RDO
Current log# 1 seq# 14581 mem# 1: /log_area/LOG1B.RDO
Tue Aug 20 08:12:53 2002
ARC0: media recovery disabled
Tue Aug 20 08:12:53 2002
Thread 1 advanced to log sequence 14582
Current log# 2 seq# 14582 mem# 0: /log_area/LOG2A.RDO
Current log# 2 seq# 14582 mem# 1: /log_area/LOG2B.RDO
Tue Aug 20 09:00:03 2002
alter database datafile '/u11/IDX02.dbf' resize 710m
Tue Aug 20 09:00:04 2002
Completed: alter database datafile '/u11/oradata/CMBM/CMBM_ID
Tue Aug 20 09:00:09 2002
alter database datafile '/u11/IDX02.dbf' resize 720m
Completed: alter database datafile '/u11/oradata/CMBM/CMBM_ID
Tue Aug 20 09:00:21 2002
alter database datafile '/u11/IDX02.dbf' resize 730m
Tue Aug 20 09:00:23 2002
Tue Aug 20 09:00:23 2002
ORA-1237 signalled during: alter database datafile '/u11/ID.
Tue Aug 20 09:00:29 2002
alter database datafile '/u11/IDX02.dbf' resize 725m
Completed: alter database datafile '/u11/CMBM_ID
Any help would be appreciated.
dklloyd
I have a log file that I just want the interesting stuff out of each day.
Each record starts with a Date and may be on two or more lines.
How can I filter out the sections that include 'Current log#' and 'media recovery disabled', but keep the other sections. The output will go to a new file.
I haven't had to do any awk work before (got away with it till now!) and I can see there's a potential number of different methods, but Im keep getting stumped on the various options.
The log file looks like:
Tue Aug 20 08:02:18 2002
Thread 1 advanced to log sequence 14581
Tue Aug 20 08:02:18 2002
ARC0: media recovery disabled
Tue Aug 20 08:02:18 2002
Current log# 1 seq# 14581 mem# 0: /log_area/LOG1A.RDO
Current log# 1 seq# 14581 mem# 1: /log_area/LOG1B.RDO
Tue Aug 20 08:12:53 2002
ARC0: media recovery disabled
Tue Aug 20 08:12:53 2002
Thread 1 advanced to log sequence 14582
Current log# 2 seq# 14582 mem# 0: /log_area/LOG2A.RDO
Current log# 2 seq# 14582 mem# 1: /log_area/LOG2B.RDO
Tue Aug 20 09:00:03 2002
alter database datafile '/u11/IDX02.dbf' resize 710m
Tue Aug 20 09:00:04 2002
Completed: alter database datafile '/u11/oradata/CMBM/CMBM_ID
Tue Aug 20 09:00:09 2002
alter database datafile '/u11/IDX02.dbf' resize 720m
Completed: alter database datafile '/u11/oradata/CMBM/CMBM_ID
Tue Aug 20 09:00:21 2002
alter database datafile '/u11/IDX02.dbf' resize 730m
Tue Aug 20 09:00:23 2002
Tue Aug 20 09:00:23 2002
ORA-1237 signalled during: alter database datafile '/u11/ID.
Tue Aug 20 09:00:29 2002
alter database datafile '/u11/IDX02.dbf' resize 725m
Completed: alter database datafile '/u11/CMBM_ID
Any help would be appreciated.
dklloyd