Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Monitoring alert.log

Re: Monitoring alert.log

From: Andreas Stephan <andreas.stephan.as_at_bayer-ag.de>
Date: Fri, 21 Sep 2001 11:14:59 +0200
Message-ID: <9of0ej$sbj6@byz672.bayer-ag.com>


What about this:

use tail -f alert_SID.log | my_own_cprog

This will pump every character which is written to alertlog in the standard input of a c program.
There you can read lines from standard input and do with them what you want. Alternatively use perl or a complex awk script to compute the lines. This is real realtime. As soon as the lines are written they can be processed. No cron no delay.

HTH
Andy

Chuck Hamilton <chuck_hamilton_at_yahoo.com> schrieb in im Newsbeitrag: 9odghg$ckeu2$1_at_ID-85580.news.dfncis.de...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Has anyone ever tried to do real-time or near real-time monitoring of
> the alert log for new messages on a unix system? How did you do it? I
> want to do it but don't want to change the name of the alert log or
> copy it to some other file.
>
> What do you think of this idea. Run a cron job every few minutes
> that:
> 1. appends a comment with an embedded sequential counter to the alert
> log.
> 2. reads the previous sequential counter from a separate file
> 3. uses sed to extract everything between the previous counter and
> the new counter and scans those lines for error messages
> 4. writes the new counter to the separate file to be used as the
> starting point for the next time it runs.
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBO6ofAmm5A4kkb4ZsEQJ5xQCbB30JtCT4WfFTzdtN9z5o19dHM48Aniqp
> 4ZEvd3FyBZsZiFtTzKNoYA/F
> =4+9A
> -----END PGP SIGNATURE-----
>
>
>
Received on Fri Sep 21 2001 - 04:14:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US