Be aware of the /etc/logrotate.d/httpd file:
Code:
/var/log/httpd/* {
rotate 10
size=5M
compress
delaycompress
sharedscripts
postrotate
/etc/rc.d/rc.httpd restart
endscript
}
The filter /var/log/httpd/* will end up in a recursion. This filter matches not only the logfiles like *_log, it matches the shifted archives too. After some logrotate -f you will see:
Quote:
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1.1.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.2.gz
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.2.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.3.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.2.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.2.gz.1.1
-rw-r--r-- 1 root root 33 2007-05-21 20:39 access_log.1.2.gz.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.3.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.3.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.4.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.1.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.2.gz.1.1.1
-rw-r--r-- 1 root root 33 2007-05-21 20:39 access_log.2.gz.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.2.gz
|
Funny, isn't it? My patch:
Code:
/var/log/httpd/*_log {
rotate 10
size=5M
compress
delaycompress
sharedscripts
postrotate
/etc/rc.d/rc.httpd restart
endscript
}
Important:
var/log/httpd/*_log or another suffix - depends on what you have chosen as log filenames.