Either in Linux-Mandrake 7.1 and 7.2b1 there is a big problem with
Apache's logs files.
According to [CHRPM] informations (apache-1.3.12-26mdk), it seems that
Apache's log files are buffered now (and may be Apache in 7.1 was also
?).
1. -- This is not working well.
Here is an exerpt of the log file, look at the date/time :
172.18.254.159 - - [29/Aug/2000:15:21:07 +0200]
172.18.254.159 - - [29/Aug/2000:15:21:07 +0200]
172.18.254.138 - - [28/Aug/2000:17:20:23 +0200]
172.20.18.198 - - [28/Aug/2000:17:26:04 +0200]
172.18.254.194 - - [28/Aug/2000:18:28:57 +0200]
172.18.254.142 - - [28/Aug/2000:18:51:19 +0200]
172.20.18.198 - - [28/Aug/2000:18:52:11 +0200]
172.18.254.145 - - [29/Aug/2000:14:24:48 +0200]
172.20.18.198 - - [29/Aug/2000:14:51:09 +0200]
2. -- Is there's a way to remove the buffer ?
Jean-Michel Dault added some documentation in httpd.conf about the
buffered logs (apache-1.3.12-26mdk) and proposed a method to refresh
Apache's logs files every 60 seconds "for debugging purpose" :
while true;do killall -USR1 httpd;sleep 60;done&
Is this method affect the performances ? Can we use it with "sleep 0" or
"sleep 1" ?
What can we do if we want to view the log-file in real-time ? For
example we use to run *analog* with a php script to analyse the log file
in real time : so the user can view the stats of a web server in real
time.
Thanks a lot,
Charles N�pote.
(Levallois, France).