Web lists-archives.com

Re: [Samba] Log rotation issue




On Sat, 2017-12-02 at 11:58 +0530, Anantha Raghava wrote:
> Hello Andrew,
> 
> Thanks for proper explanation. 
> 
> To overcome this,  also as we need to store logs for long,  now we
> have written a shell script,  executed as a crop every three minutes
> that checks the file size.  If the file size is 1 GB or above,  it
> moves the log file to <logfile>.timestamp.log.old and clears the main
> log file. 
> 
> We have commented out the max log size in sub.conf.
> 
> If need be I can share the script here

I'm not sure that will help, that is pretty much what was happening
before.  The key is to send a -HUP to the whole process tree to make
them re-open the logs, otherwise the other child samba processes will
still just write to the .old 

I know this sucks.  I think the solution is to have a new reopen-logs
message created so this can be used in logroate, and to have it used
internally as I mentioned. 

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba