Title: RE: Listener problems

The following script is one I pulled off from the list a few months ago and added a few lines. It is proving pretty useful. Note it uses the set option to redirect to a new output file

John

#!/bin/ksh
# Script to copy out listener.log and compress it.
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/8.1.6
export ORACLE_HOME

PATH=$ORACLE_HOME/bin:/usr/local/bin:/bin:/usr/bin

export PATH

COMPRESSED_FILE=/u01/app/oracle/product/8.1.6/network/log/listener`date
+%Y%m%d%H%M`.log

lsnrctl set log_file /u01/app/oracle/product/8.1.6/network/log/listener2.log
mv /u01/app/oracle/product/8.1.6/network/log/listener.log $COMPRESSED_FILE
mv /u01/app/oracle/product/8.1.6/network/log/listener2.log
/u01/app/oracle/product/8.1.6/network/log/listener.log
lsnrctl set log_file /u01/app/oracle/product/8.1.6/network/log/listener.log
compress $COMPRESSED_FILE
#
# now remove all compressed listener logs older than 10 days
#
find /u01/app/oracle/product/8.1.6/network/log/list*.Z -mtime +10 -print
-exec rm {} \;


A suitable crontab entry for the oracle account would be

00 19 * * * /home/oracle/tidy_listener_log.sh  >
/home/oracle/tidy_listener_log.log 2>&1




-----Original Message-----
From: Rachel Carmichael [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2001 09:30
To: Multiple recipients of list ORACLE-L
Subject: Re: Listener problems


once clients are connected, you can shut down the listener... all that
means is that no one else can connect once it is down.

size of listener.log is OS dependent, it's just  a file on disk. You
can recreate it by

shutting down the listener
renaming or deleting the listener.log file
starting up the listener


--- "Tatireddy, Shrinivas (MED, Keane)"
<[EMAIL PROTECTED]> wrote:
> Hi lists,
>
> I have some problem with my listener.  That is resolved with the help
> of
> metalink. But I have a doubt in this regard.
>
> When I try to see the status, lsnrctl status 816LISTENER
>
> the statement hung for 10 minutes. I checked metalink and found the
> solution was,
> probably the size of listener.log is very big. So archive/remove it.
>
> In the mean time , this was resolved by another group of DBAs.
>
> In such a situations how to create another listener.log.
>
> If I stop/start the listener, this will affect the clients who are
> running trnx.
>
> how do i create another log.
>
> And how to know the size of listener.log (There is no parameter for
> this)
> is is o/s dependent?
>
> Thnx and regards,
> Srinivas
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Tatireddy, Shrinivas (MED, Keane)
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Rachel Carmichael
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



**********************************************************************
This email and any attachments may be confidential and the subject of
legal professional privilege. Any disclosure, use, storage or copying
of this email without the consent of the sender is strictly prohibited.
Please notify the sender immediately if you are not the intended
recipient and then delete the email from your inbox and do not
disclose the contents to another person, use, copy or store the
information in any medium.
**********************************************************************

Reply via email to