Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Installation - Getting started with Red Hat Linux
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
problems with logrotate

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.