Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

11g Listener Logs

548 views
Skip to first unread message

ExecMan

unread,
Apr 23, 2012, 9:17:57 AM4/23/12
to
Hi,

I'm trying to find a good way to parse / audit the 11g listener logs.
In our 10g databases this was pretty simple. A couple of procedures
and an external table pointing to the log and I can run queries and
gather stats by the hour, connect counts from different hosts, etc.

But, for 11g with the log being in XML and could be a number of logs,
I'm not quite sure how to get this accomplished. I've been searching
around and trying to brainstorm and was looking to see what anyone
else has done. I'm sure I'm not the first who wants to parse the
listener log and get stats / counts.

Thanks!

ddf

unread,
Apr 23, 2012, 11:26:09 AM4/23/12
to
I'm running 11.2.0.3 and I find a text copy of the listener log in C:
\oradb\diag\tnslsnr\<host>\listener\trace where c:\oradb is my
diagnostic_dest. I also find this text log under Linux on 11.2.0.2,
again starting at <diagnostic_dest> and going to diag/tnslsnr/<host>/
listener/trace. I would expect that you can point this 10g script to
the 11g location and continue to use it as you have always done.


David Fitzjarrell

joel garry

unread,
Apr 23, 2012, 11:55:27 AM4/23/12
to
Some people have done some similar things with the alert log:
http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format.html

I'm lazy, I'd go along with the old scripts unless I saw something
really kewl someone had already figured out. I can see the reasons
for adcri - all sorts of versions and platforms coming in to Oracle
support, uniform and stratifiable error logging - but I'm hard to
convince that they are better at any site than the simple olde ways of
text files and a nice parsing language.

jg
--
@home.com is bogus.
http://www.infoworld.com/t/intellectual-property/oracle-java-patent-upheld-191484

ExecMan

unread,
Apr 23, 2012, 12:25:36 PM4/23/12
to
Hmm...I guess I could do that. I was hoping to use the newer
features, since eventually the old stuff will be scratched. Maybe
loading it and some type of XML query would work against it?

Mladen Gogala

unread,
Apr 23, 2012, 1:16:30 PM4/23/12
to
Are you aware of the v$diag_alert_ext table? It also contains the messages
for the Oracle*Net home:

SQL> select distinct adr_home from v$diag_alert_ext;

ADR_HOME
--------------------------------------------------------------------------------
diag/tnslsnr/dmc125/listener
diag/rdbms/apexdb/apexdb

Then, there is a wonderful new utility called ADRCI. Unfortunately, I have
no problems that I can show:

dmc125:oracle>adrci

ADRCI: Release 11.2.0.3.0 - Production on Mon Apr 23 13:13:28 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights
reserved.

ADR base = "/mnt/san-oracle/u01/app/oracle"
adrci> set home diag/tnslsnr/dmc125/listener
adrci> show problems

ADR Home = /mnt/san-oracle/u01/app/oracle/diag/tnslsnr/dmc125/listener:
*************************************************************************
0 rows fetched

adrci> show incident

ADR Home = /mnt/san-oracle/u01/app/oracle/diag/tnslsnr/dmc125/listener:
*************************************************************************
0 rows fetched



If only Oracle would make some trouble that I could share....


--
http://mgogala.freehostia.com

AM

unread,
Apr 23, 2012, 1:27:27 PM4/23/12
to
On Apr 23, 9:55 am, joel garry <joel-ga...@home.com> wrote:
> On Apr 23, 6:17 am, ExecMan <artme...@yahoo.com> wrote:
>
> > Hi,
>
> > I'm trying to find a good way to parse / audit the 11g listener logs.
> > In our 10g databases this was pretty simple.  A couple of procedures
> > and an external table pointing to the log and I can run queries and
> > gather stats by the hour, connect counts from different hosts, etc.
>
> > But, for 11g with the log being in XML and could be a number of logs,
> > I'm not quite sure how to get this accomplished.  I've been searching
> > around and trying to brainstorm and was looking to see what anyone
> > else has done.  I'm sure I'm not the first who wants to parse the
> > listener log and get stats / counts.
>
> > Thanks!
>
> Some people have done some similar things with the alert log:http://laurentschneider.com/wordpress/2008/04/alert-log-in-xml-format...
>
> I'm lazy, I'd go along with the old scripts unless I saw something
> really kewl someone had already figured out.  I can see the reasons
> for adcri - all sorts of versions and platforms coming in to Oracle
> support, uniform and stratifiable error logging - but I'm hard to
> convince that they are better at any site than the simple olde ways of
> text files and a nice parsing language.
>
> jg
> --
> @home.com is bogus.http://www.infoworld.com/t/intellectual-property/oracle-java-patent-u...

Short of writing some AWK script to go through the log every hour and
parse / count occurrences, then pass that to the database to store in
a table, I was hoping to do it from within the database. In 10g I
just created an external table and a procedure to parse the log. That
is working great. But it does not work with the log.xml, so I am
looking for another solution.

Mladen Gogala

unread,
Apr 23, 2012, 2:50:46 PM4/23/12
to
On Mon, 23 Apr 2012 10:27:27 -0700, AM wrote:

> Short of writing some AWK script to go through the log every hour and
> parse / count occurrences, then pass that to the database to store in a
> table, I was hoping to do it from within the database. In 10g I just
> created an external table and a procedure to parse the log. That is
> working great. But it does not work with the log.xml, so I am looking
> for another solution.

Well, in 11G there is a ready-made external table for you and a utility to
purge it.



--
http://mgogala.freehostia.com
0 new messages