httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Prohorenko <>
Subject [users@httpd] problem with piped logs
Date Mon, 29 Dec 2003 08:49:21 GMT

I've got a problem with working with piped logs on Apache.  I have got
a  program  written  in  C  to  parse  the  logs and I've modified the
httpd.conf the following way:

LogFormat "%{Referer}i /%U ?%q %B" trafcountlog
CustomLog "|/var/nwlynx/traffer/traffer" trafcountlog

Program has been tested for getting fscanf () from stdin until EOF and
parses  the logs.  Sometimes it works, but for a short period of time.
After  this  the  logs  just stopping to be recieved by a program, and
after I do:

killall -SIGUSR1 httpd


/usr/local/apache/bin/apachectl graceful

I see the following warining the the error_log file.

[Sun Dec 28 04:54:42 2003] [warn] long lost child came home! (pid 25664)

I can see the program in processes list, as well:

25716  ??  Ss     0:00.31 /usr/local/apache/bin/httpd -DSSL
25731  ??  I      0:00.00 /bin/sh -c /var/nwlynx/traffer/traffer
25732  ??  I      0:00.00 /var/nwlynx/traffer/traffer
25733  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL
25734  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL
25735  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL
25736  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL
25737  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL
25739  ??  I      0:00.00 /usr/local/apache/bin/httpd -DSSL

Sometimes it helps to start receiving logs by 'traffer' after doing:

killall traffer

It always helps to start recieving logs again by sending:

killall -SIGHUP httpd

Although,  I just could not understand what is going wrong and why I'm
not able to parse the log through the piping.

I don't think that restarting Apache periodically is a good thing.

I'd be very thankfull for any help.

Thanks in advance.

Alexander Prohorenko
View raw message