Re: looking at alert log

From: Yong Huang <"Yong>
Date: Fri, 18 Nov 2016 22:34:43 +0000 (UTC)
Message-ID: <1224285614.3791330.1479508483046_at_mail.yahoo.com>


Brian,

Instead of reading the entire alert.log, which could grow big, why not read the tail?

tail -f alert.log | grep pattern

I have a fairly sophiscated example (called ck_alert_log.sh) at http://yong321.freeshell.org/computer/logfile.html

The `tail -f' command uses near-zero CPU and I/O, regardless the size of alert.log, and can immediately notify you of an error (if the command is piped to mail),

If you must do this with SQL, x$dbgalertext is the table you need to query as others have suggested. Or v$diag_alert_ext, which is the ADR version, and is slower. Alternatively, create an external table based on alert.log. But you can't read from the tail of the file.

Yong

Zelli, Brian wrote:

> I am running this script to check the alert log for errors and it runs every few minutes.
> How can I just look at the last few minutes as opposed to the entire day?

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 18 2016 - 23:34:43 CET

Original text of this message