Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: LISTENER.LOG file compress
Seema,
I just posted a question on this earlier today. If you are on unix I was given this suggestion from 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
I am on NT but I believe you can use on of these two methods.
or
2) -at a dos prompt type.... -MSDOS> lsnrctl set log_file listener1.log -This can be done without stopping the listener service
Dave
"So many cats...........So few recipes!!"
-----Original Message-----
Sent: Wednesday, June 27, 2001 10:36 AM
To: Multiple recipients of list ORACLE-L
Hi
My Listener.log file big.I want to rename the listener.log file.Can you
please suggest the steps.
Thanks
-Seema
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Seema Singh INET: oracledbam_at_hotmail.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_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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Farnsworth, Dave INET: DFarnsworth_at_Ashleyfurniture.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_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 - 12:13:29 CDT