Log Rotation of Catalina.out

Hi,

Recently i received a request to rotate logs of catalina.out (tomcat). The file size was about 807 MB. I used logadm to truncate the log ( -c ) and zip (-z 0) it.
Everything worked fine, catalina.out.0.gz was created (22 MB) and the size of original catalina.out became 0kb.
After about 5 minutes, the size of the catalina.out again reached 807MB. I made a copy and ziped it again and this time the compression made it 8kb. Running the cat command does not produce any output. Its like a file created using the mkfile command. Has anyone come across this issue?

Thanks

Have a look at this thread for a similar situation: Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

For proper logrotation you have to send SIGUSR1 to tomcat after the logfile was rotated. You can find the PID in the file $CATALINA_PID, which defaults to $CATALINA_HOME/temp/tomcat.pid