Re: oracle11 logs, the sequel.

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Tue, 15 Jan 2008 13:21:06 -0800 (PST)
Message-ID: <f8b54f46-5cbe-4280-a702-e9a75dd3b3bd@v29g2000hsf.googlegroups.com>


On Jan 15, 1:09 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Jan 15, 6:58 am, Mladen Gogala <mgog..._at_yahoo.com> wrote:
>
>
>
>
>
> > Oracle RDBMS 11.1.0.6 maintains XML version of alert_$ORACLE_SID.log,
> > in addition to the ASCII one. Some of you might remember that log files
> > are inclined to grow. To prevent endless growth which would fill up my
> > disk space, I use logadm on Solaris and logrotate on Linux. I can do
> > that on the ASCII version only because it doesn't have any kind of an
> > internal structure. The award winning question is what to do about the
> > XML version? If I let logrotate cut it weekly, I will end up with a
> > useless XML file which I cannot validate or parse. It will require a
> > manual intervention to make it into a proper XML file again. On the other
> > hand, if I don't cut it with logrotate, it will grow like a sequoia in
> > a vase, with similar consequences.
> > The award winning question is what to do about that? How can I slice &
> > dice the log.xml file while preserving its usefulness? This file is
> > extremely useful because it contains the exact timestamp for every
> > message. An entry looks like this:
>
> > <msg time='2008-01-14T22:01:40.698+01:00' org_id='oracle' comp_id='rdbms'
> >  client_id='' type='UNKNOWN' level='16'
> >  module='' pid='25495'>
> >  <txt>Thread 1 advanced to log sequence 535
> >  </txt>
> > </msg>
>
> > That provides, timestamp, component and message text, for every message.
>
> Just thinking out loud:
>
> Could you use your favorite tool to parse it into single lines ending
> with the </msg>, tail some configurable number of lines, then parse
> back breaking lines on a space less than 78 or \>$?
>
> Or maybe easier, logrotate, then figure out where the first complete </
> msg> is, head that to the archived file (if you are keeping one), and
> tail everything after that for the new one.
>
> I think the latter might be faster, I'm not sure about race issues
> with oracle writing the logs.
>
> jg
> --
> @home.com is bogus.
> "My RSS Reader is Empty!" - Alex Gorbachev- Hide quoted text -
>
> - Show quoted text -

Mladen, I consider your post of "Oracle RDBMS 11.1.0.6 maintains XML version of alert_$ORACLE_SID.log, in addition to the ASCII one" to be good news. I thought that the alert log was now XML. I do not have a spare server capable of handling the load so I am stuck waiting for the Express version so I can actually see 11g in action.

Your final solution on how to trim the XML version of the file is bound to be of interest. We just trim ours manually once or twice a year.

  • Mark D Powell --
Received on Tue Jan 15 2008 - 15:21:06 CST

Original text of this message