Discussion:
[Samba] log rotation in samba
Melanie Pfefer
2007-01-05 16:17:21 UTC
Permalink
how to enable log rotation in samba?
max log size in the conf file allows only 1 log file.

Send instant messages to your online friends http://uk.messenger.yahoo.com
Mogens Kjaer
2007-01-05 17:32:33 UTC
Permalink
Post by Melanie Pfefer
how to enable log rotation in samba?
You don't. The log rotation is normally done
by other programs.

In some Linuxdistributions this is done by the logrotate program.

Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: ***@crc.dk Homepage: http://www.crc.dk
Melanie Pfefer
2007-09-21 18:39:07 UTC
Permalink
Could you please share how you used logadm/logrotate
to rotate samba logs?

many thanks for your assistance.
Post by Mogens Kjaer
Post by Melanie Pfefer
how to enable log rotation in samba?
You don't. The log rotation is normally done
by other programs.
In some Linuxdistributions this is done by the
logrotate program.
Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
--
To unsubscribe from this list go to the following
URL and read the
https://lists.samba.org/mailman/listinfo/samba
___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
Tomasz Chmielewski
2007-09-21 19:10:37 UTC
Permalink
Post by Melanie Pfefer
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
--
Tomasz Chmielewski
http://blog.wpkg.org
Felipe Augusto van de Wiel
2007-09-21 20:46:48 UTC
Permalink
Post by Tomasz Chmielewski
Post by Melanie Pfefer
Could you please share how you used logadm/logrotate
to rotate samba logs?
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.

Kind regards,
- --
Felipe Augusto van de Wiel <***@paranacidade.org.br>
Coordenadoria de Tecnologia da Informa??o (CTI) - SEDU/PARANACIDADE
http://www.paranacidade.org.br/ Phone: (+55 41 3350 3300)
Tomasz Chmielewski
2007-09-21 20:55:35 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Post by Tomasz Chmielewski
Post by Melanie Pfefer
Could you please share how you used logadm/logrotate
to rotate samba logs?
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
Ryan Novosielski
2007-09-21 21:24:57 UTC
Permalink
Post by Felipe Augusto van de Wiel
Post by Tomasz Chmielewski
Post by Melanie Pfefer
Could you please share how you used logadm/logrotate
to rotate samba logs?
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.
It keeps one old revision, marked .old or something like that.

- --
---- _ _ _ _ ___ _ _ _
|Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II
|$&| |__| | | |__/ | \| _| |***@umdnj.edu - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
Loading...