Subject: Re: newsyslog not sufficiently magic?
To: Peter Seebach <seebs@plethora.net>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/06/2003 02:20:12
[ On Friday, June 6, 2003 at 01:10:18 (-0500), Peter Seebach wrote: ]
> Subject: newsyslog not sufficiently magic?
>
> So, I have stuff like this in /etc/newsyslog.conf:
> 
> /var/log/httpd/access_log               640  7    *    168  ZBN
> /var/log/httpd/error_log                640  7    *    168  ZBN
> /var/log/httpd/referer_log              640  7    *    168  ZBN
> /var/log/httpd/agent_log                640  7    *    168  ZBN
> /var/log/httpd/suexec_log               640  7    *    168  ZBN /var/run/httpd.pid      SIGHUP
> 
> This isn't working.  What should I be doing differently?  I tried "HUP",
> and that didn't work either.
> 
> 'kill -HUP $(</var/run/httpd.pid)' does what I want.

If your httpd is Apache 1.x then you probably want to send it a SIGUSR1,
not a SIGHUP.

> What's newsyslog doing differently?
> 
> Is there some underlying magic I need to be aware of, perhaps, in what order
> it does things in?

That may be part of the problem.  I know with my own version of
newsyslog it is important to have the PID and signo fields specified for
all lines for something like httpd with multiple log files, even when
the other control fields are identical and specify that all the files
should be rotated at the same time like yours do.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>