Thursday, March 11, 2010

Parsing alert log (gegrep) - Solaris 10

You can easily parse the Oracle alert log with gegrep to find out the times as well as the parsed line.

# Show two lines before the matching string
gegrep -B 2 ORA- alert_DB1.log

# Show how many times the database has been started up and when
gegrep -B 1 "Completed: ALTER DATABASE OPEN" alert_DB1.log

No comments:

Post a Comment