Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: listener.log
All,
Can someone explain to me if there is anything wrong with the following as I don't issue the "lsnrctl set log_file" command. I seem to remember someone saying in the original thread that this can cause problems. I have been running the following method for months with no ill effects.
cp the current file to archive area (this is then written to tape and
removed)
cat /dev/null to the current one
This appears to work, my first entry in the newly truncated listener log file is 1 minute past midnight (the job runs at midnight on the first day of the month).
Regards
Lee
-----Original Message-----
Sent: 27 June 2001 15:55
To: Multiple recipients of list ORACLE-L
Dave,
This came from the list a few weeks ago. I amended it slightly but it still
all works.
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
# # now remove all compressed listener logs older than 10 days #
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
The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Robertson Lee - lerobe INET: lerobe_at_acxiom.co.uk 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_at_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).Received on Wed Jun 27 2001 - 10:21:02 CDT