Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g7TFERl25551
 for <oracle-l@naude.co.za>; Thu, 29 Aug 2002 11:14:27 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id IAA24590;
 Thu, 29 Aug 2002 08:00:29 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004C27B2; Thu, 29 Aug 2002 07:13:21 -0800
Message-ID: <F001.004C27B2.20020829071321@fatcity.com>
Date: Thu, 29 Aug 2002 07:13:21 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Rodrigues, Bryan" <BRodrigues@elcom.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Rodrigues, Bryan" <BRodrigues@elcom.com>
Subject: RE: Maintenance of listener.log files
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

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: hkchital@singnet.com.sg

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: ListGuru@fatcity.com (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: BRodrigues@elcom.com

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: ListGuru@fatcity.com (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).

