[Samba] log rotation in samba
Tomasz Chmielewski
mangoo at wpkg.org
Fri Sep 21 15:55:12 GMT 2007
Felipe Augusto van de Wiel schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Tomasz Chmielewski wrote, On 21-09-2007 11:10:
>> Melanie Pfefer schrieb:
>>> Could you please share how you used logadm/logrotate
>>> to rotate samba logs?
>> Hmm, doesn't Samba rotate the logs by itself? I.e.:
>>
>> log level = 3
>> syslog = 0
>> log file = /var/log/samba/log.%m
>> max log size = 5000
>
> AFAIK, no. This only tells samba how much information to
> keep in each file and how detailed they are. If you want to have
> history, you need to rotate it using something like logrotate.
Yes and no.
With the above setting, Samba keeps two logs per machine:
/var/log/samba/log.%m and /var/log/samba/log.%m.old. Each of them having
5000 kB.
If you want to use just logrotate for that, you'd have to set "max log
size = 0", so that Samba doesn't rotate the files on its own.
However, to keep some "reasonable history" with "log level = 3", one
would have to reserve gigabytes for each machine... Also, it wouldn't be
that great for performance.
--
Tomasz Chmielewski
http://wpkg.org
More information about the samba
mailing list