Thank you for the ideas on maintaining a reasonable size listener.log file.
I am trying out the scripts now in development to see which one works the
best for me.
Bryan
-----Original Message-----
Sent: Saturday, August 24, 2002 12:03 PM
To: Multiple recipients of list ORACLE-L
You can do it online. I have a CRON job which periodically truncates the
file to the last X (e.g. 20000) lines. In this code, I've added your
requirement
to archive and preserve the log.
e.g
#!/usr/bin/sh
set `date`
ORACLE_HOME=/u01/app/oracle/product/8.1.7;export ORACLE_HOME
cd $ORACLE_HOME/network/log
find . -name 'listener.log.preserve*' -mtime +15 -exec rm {} \;
cp listener.log listener.log.preserve.$1$2
touch to_overwrite
#optional : keep the last 20000 lines of the logfile
#tail -20000 listener.log > to_overwrite
cat to_overwrite > listener.log
Test the script before you use it.
Essentially, you can overwrite the listener.log online -- but you should
not try to "rm" or "mv" it .
Hemant
At 08:53 AM 23-08-02 -0800, you wrote:
>Hello all,
>
>I have an 8.1.7.4 database on 11.0 HP-UX server with a listener.log file
and
>it records information as long as the listener is up. The problem is that
>the listener is always up and the file is getting larger and larger. I am
>looking for a way to periodically copy the data from the listener.log to
>another file (that would be around for two weeks and then purged) without
>having to bring the listener down. It seems like one of those tricks of
>replacing a tire on a car while it is still being driven.
>
>TIA,
>
>Bryan Rodrigues
>DBA
>Elcom, Inc.
Hemant K Chitale
Now using Eudora Email. Try it !
My home page is : http://hkchital.tripod.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Hemant K Chitale
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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Rodrigues, Bryan
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).