Log rotation in Samba using newsyslog

Darshan Purandare darshan.purandare at isilon.com
Fri Jun 27 22:18:33 GMT 2008



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

* 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.






More information about the samba-technical mailing list