[CentOS] Logrotate in CentOS 5.4 more brutal (to httpd at least) than in 5.3?
centos at linuxpowered.net
Wed Feb 3 18:59:50 UTC 2010
Matthew Miller wrote:
> That said, *both* of them are too brutal, in that they'll kill any open
> connections. Signal USR1 (or service httpd graceful) is much nicer, since it
> lets any open connections complete. The downside is that these old
> connections might get written to the _rotated_ log instead of the new one,
> but to me that's a small price to pay.
I've always used copytruncate for httpd logs and logrotate, never
bothered to send signals to apache at all...
sample config -
DATE=`date --date=Yesterday +%y%m%d`
for FOO in `ls *.1`
mv $FOO `echo $FOO | cut -f1 -d.`.$DATE.log
gzip -9 *.$DATE.log
logger "[LOGROTATE] Rotated these logs: `echo
More information about the CentOS