problems with logrotate 2005-06-01 - By Bill Tangren
Back Since installing RHEL ES4, logrotate doesn't seem to work at all. It emails me when it is invoked, and the output indicates that it worked, but it doesn't. I can't figure out what is wrong, or even how to proceed to figure it out.
This is how logrotate is invoked:
#!/bin/sh
/usr/sbin/logrotate -dvf /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0
[I added the 'f' option to see if I could force it to work. It won't.]
This is what is part of my logrotate.conf:
/home/httpd/logs/error_log /home/httpd/logs/access_log /home/httpd/logs/AsA_access_log /home/httpd/logs/AsA_error_log /var/log/httpd/*log { missingok monthly rotate 14 sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript }
(sorry about the word wrap in this email. this isn't a problem in the conf file itself).
When it is run, this is the output (abbreviated):
rotating log /home/httpd/logs/access_log, log->rotateCount is 13 renaming /home/httpd/logs/access_log.13 to /home/httpd/logs/access_log.14 (rotatecount 13, logstart 1, i 13), renaming /home/httpd/logs/access_log.12 to /home/httpd/logs/access_log.13 (rotatecount 13, logstart 1, i 12), renaming /home/httpd/logs/access_log.11 to /home/httpd/logs/access_log.12 (rotatecount 13, logstart 1, i 11), renaming /home/httpd/logs/access_log.10 to /home/httpd/logs/access_log.11 (rotatecount 13, logstart 1, i 10), renaming /home/httpd/logs/access_log.9 to /home/httpd/logs/access_log.10 (rotatecount 13, logstart 1, i 9), renaming /home/httpd/logs/access_log.8 to /home/httpd/logs/access_log.9 (rotatecount 13, logstart 1, i 8), renaming /home/httpd/logs/access_log.7 to /home/httpd/logs/access_log.8 (rotatecount 13, logstart 1, i 7), renaming /home/httpd/logs/access_log.6 to /home/httpd/logs/access_log.7 (rotatecount 13, logstart 1, i 6), renaming /home/httpd/logs/access_log.5 to /home/httpd/logs/access_log.6 (rotatecount 13, logstart 1, i 5), renaming /home/httpd/logs/access_log.4 to /home/httpd/logs/access_log.5 (rotatecount 13, logstart 1, i 4), renaming /home/httpd/logs/access_log.3 to /home/httpd/logs/access_log.4 (rotatecount 13, logstart 1, i 3), renaming /home/httpd/logs/access_log.2 to /home/httpd/logs/access_log.3 (rotatecount 13, logstart 1, i 2), renaming /home/httpd/logs/access_log.1 to /home/httpd/logs/access_log.2 (rotatecount 13, logstart 1, i 1), renaming /home/httpd/logs/access_log.0 to /home/httpd/logs/access_log.1 (rotatecount 13, logstart 1, i 0), renaming /home/httpd/logs/access_log to /home/httpd/logs/access_log.1 creating new log mode = 0775 uid = 0 gid = 500 removing old log /home/httpd/logs/access_log.14
The output indicates that the rotation took place, but it didn't:
[root@(protected) cron.daily]# ll -h /home/httpd/logs/access_log* -rwxrwxr-x 1 root AA 2.2G Jun 1 09:02 /home/httpd/logs/access_log -rwxrwxr-x 1 root AA 1.5G Apr 1 00:03 /home/httpd/logs/access_log.1 -rwxrwxr-x 1 root AA 794M Jul 1 2004 /home/httpd/logs/access_log.10 -rwxrwxr-x 1 root AA 849M Jun 1 2004 /home/httpd/logs/access_log.11 -rwxrwxr-x 1 root AA 974M May 1 2004 /home/httpd/logs/access_log.12 -rwxrwxr-x 1 root AA 1.2G Apr 1 2004 /home/httpd/logs/access_log.13 -rwxrwxr-x 1 root AA 1.3G Mar 1 00:03 /home/httpd/logs/access_log.2 -rwxrwxr-x 1 root AA 1.3G Feb 1 00:02 /home/httpd/logs/access_log.3 -rwxrwxr-x 1 root AA 1.2G Jan 1 00:02 /home/httpd/logs/access_log.4 -rwxrwxr-x 1 root AA 1.3G Dec 1 00:03 /home/httpd/logs/access_log.5 -rwxrwxr-x 1 root AA 1.3G Oct 31 2004 /home/httpd/logs/access_log.6 -rwxrwxr-x 1 root AA 1.2G Oct 1 2004 /home/httpd/logs/access_log.7 -rwxrwxr-x 1 root AA 812M Sep 1 2004 /home/httpd/logs/access_log.8 -rwxrwxr-x 1 root AA 758M Aug 1 2004 /home/httpd/logs/access_log.9
I am having the same problems with the system logs. Any ideas on what might be the problem?
TIA, Bill Tangren
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
Earn $52 per hosting referral at Lunarpages.
|
|