佐藤@Spo.toネットです。
Vine Linux 2.6r4 を使用しております。
同様の現象が2日前に起きました。
/var/log/httpd/cal_access.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
/var/log/httpd/pc_access.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
としております(同様のスクリプトが14個並び最後がpc_access.log)。
cal_access.log 他12個は新しいログに記録してくれますが、
pc_access.log だけは古いログに記録し続けます。
# /etc/rc.d/init.d/httpd restart
としてやって、新しいログに記録しはじめました。
違いは、pc_access.logの秒あたりの記録が、
他に比較して膨大に多いこと、ぐらいです。
$ grep PidFile /etc/httpd/conf/httpd.conf
# PidFile: The file in which the server should record its process
PidFile /var/run/httpd.pid
$ ls /var/run
atd.pid crond.pid httpd.mm.18843.sem identd.pid klogd.pid proftpd/ sshd.pid syslogd.pid xfs.pid
console/ dhcpcd-eth0.pid httpd.pid inetd.pid netreport/ snort_eth1.pid sudo/ utmp
pidファイルのパスは、合っております。
$ more /etc/rc.d/init.d/httpd
#!/bin/bash
snip
# Path to the httpd binary.
httpd=/usr/sbin/httpd
prog=httpd
RETVAL=0
snip
start() {
echo -n $"Starting $prog: "
daemon $httpd `moduleargs` $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
return $RETVAL
}
これをみると直接起動しているので、HUPシグナルを送る代わりに、
/etc/rc.d/init.d/httpd restart
したほうがいいのかと考えておりました。
スクリプトも、
/var/log/httpd/*.log {
snip
}
とまとめた方がいいのかとも(まだ試していない)。
# 頻繁にHUPを送られるので、Apacheのプロセスも私同様、夏ばてかと。。。
# 途中経過の報告でした。
---
佐藤@Spo.toネット
pc@xxxxxx
http://pc.spo.to/