Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Listener.log
Hello,
Thank you very much for your responses. What i
wanted to do was compressing the listener.log. It works fine as below
:
cp listener.log listener.log.$(date
+%y%d%m)
cat /dev/null > listener.log
compress listener.log.$(date +%y%d%m)
Regards,
Nguyen Thanh-truc
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Sent: Wednesday, April 25, 2001 1:45
AM
Subject: RE: Listener.log
For those of you who did not see my response in the
thread of "Perl DBA Tools" I will repeat it here, it answers this thread as
well. Also, there is no need to shutdown the database to bounce the
listener.
How about wrapping this in a script of your
choice:
ARCHIVE_LISTENER_FILENAME=listener`date +%Y%m%d%H%M`.log
lsnrctl set log_file listener2.logmv listener.log
$ARCHIVE_LISTENER_FILENAMEmv listener2.log listener.loglsnrctl set
log_file listener.loggzip $ARCHIVE_LISTENER_FILENAME
This way, you don't have to stop the listener and you don't loose
anything. Remember, in Unix, when you rename a file, any program that
has it open still points to it.
Regards,
John
Received on Wed Apr 25 2001 - 09:26:04 CDT
![]() |
![]() |