Log rotation in Samba using newsyslog

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Jun 28 06:50:00 GMT 2008


On Fri, Jun 27, 2008 at 03:18:33PM -0700, Darshan Purandare wrote:
> Hi,
> 
>  
> 
> We @ Isilon use newsyslog to rotate the logs in Samba (after every 100
> MBs samba.log is gzipped and a new log is created in /var/log/samba/).
> 
> There was a bug associated with using newsyslog, namely, during log
> rotation a CIFS client would see a pause of approximately 10 seconds. I
> wrote a patch to fix this issue. This patch attempts to accomplish the
> following things:
> 
> * Send a SIGUSR1 signal to Samba instead of sending SIGHUP during the
> log rotation time.
> 
> * smbd doesn't wait for newsyslog to return. Previously, smbd waited for
> newsyslog to return which indeed increased the delay during the log
> rotation.
> 
> * Now, newsyslog is not called multiple times while the log rotation is
> on. Previously, multiple instances of newsyslog were forked even if log
> rotation was in progress.
> 
>  
> 
>  
> 
> I was wondering if we could send this patch to samba 3-2 so that anybody
> else using newsyslog to rotate the logs could also be benefitted with
> this patch ? Let me know your thoughts on it.

Hmmm. I don't see where smbd would use newsyslog, so this
would be an Isilon patch as well :-)

You might want to send both...

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080628/78d6dbd8/attachment.bin


More information about the samba-technical mailing list