logrotate

Kaushal Shriyan kaushalshriyan at gmail.com
Fri Jul 16 06:53:56 UTC 2010


On Fri, Jul 16, 2010 at 12:10 PM, Kaushal Shriyan
<kaushalshriyan at gmail.com> wrote:
> Hi,
>
> I have question about logrotate on Ubuntu server 8.04,It did not
> rotated a 17 GB catalina.out file but i can see the status file
> "/opt/tomcat1/logs/catalina.out"
> -rw-rw-r--+ 1 tomcat tomcat 17078943939 2010-07-15 12:57 catalina.out
> 0 12 * * * /usr/local/bin/scripts/call-logrotate-tomcat0-catalina
>
> /opt/tomcat1/logs/catalina.out {
>        daily
>        dateext
>        missingok
>        nocompress
>        rotate 7
>        notifempty
> }
>
> #!/bin/bash
>
> /usr/sbin/logrotate
> /usr/local/bin/scripts/logrotate-tomcat0-catalina.conf >
> /tmp/tomcat0.log 2>&1
>
> if [[ $? -ne 0 ]] ;then
> echo "Problems." | /usr/bin/mail -s "[CRON] host0095 compress tomcat0
> catalina.log - problems" kaushal at example.com
> fi
>
> Please suggest/guide.
>
> Thanks,
>
> Kaushal
>
Hi again,


/usr/sbin/logrotate -d /usr/local/bin/scripts/logrotate-tomcat0-catalina.conf
reading config file /usr/local/bin/scripts/logrotate-tomcat0-catalina.conf
reading config info for /opt/tomcat1/logs/catalina.out

Handling 1 logs

rotating pattern: /opt/tomcat1/logs/catalina.out  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /opt/tomcat1/logs/catalina.out
log does not need rotating

Is it not weird ?

Please suggest.

Thanks,

Kaushal




More information about the ubuntu-users mailing list