I have samba 2.0.7 on rh6.2 (the rpm version) It's configured to keep logs for each machine 'log.%m' What i have for each machine in /var/log/samba is this: log.dh68 log.dh68.1 log.dh68.1.1 log.dh68.1.1.1 log.dh68.1.1.1.1 log.dh68.1.1.1.1.1 log.dh68.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.1.3 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.1.1.3 log.dh68.1.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.1.3 log.dh68.1.1.1.1.1.1.1.1.1.1.2 log.dh68.1.1.1.1.1.1.1.1.1.1.2.1 log.dh68.1.1.1.1.1.1.1.1.1.1.2.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.2.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1 log.dh68.1.1.1.1.1.1.1.1.1.1.3 log.dh68.1.1.1.1.1.1.1.1.1.1.4 etc ... Is there any way to have a decent log ?? -- Mihai Radu, jr. sysadmin mailto:mihai.radu@mathengine.com Mathengine Canada, 465 McGill Street, #100, Montreal, QC, Canada H2Y 2H1 Tel: +1 514 287 1166 Fax: +1 514 287 3360 Cell: +1 514 813 1412
On Tue, 26 Sep 2000 12:42:20 -0400, you wrote:>I have samba 2.0.7 on rh6.2 (the rpm version) >It's configured to keep logs for each machine 'log.%m' >What i have for each machine in /var/log/samba is this: >log.dh68 >log.dh68.1 >log.dh68.1.1 >log.dh68.1.1.1 >log.dh68.1.1.1.1This is a RedHat problem, not samba's. RedHat added a custom logrotate script to handle the "log.%m" logging format it uses in the smb.conf. Look at /etc/logrotate.d/samba If the 1st line is /var/log/samba/* { try changing it to be /var/log/samba/*.log { -- giulioo@pobox.com
Thanks Giulio, you pointed me in the right direction. 1 st line was /var/log/samba/log.* { This kept rotating logs that had already been rotated ex: log.dh68.1 & log.dh68.2 I canged the smb.conf option to %m.log them canged the /etc/logrotate.d/samba to: /var/log/samba/*.log { size 100k notifempty missingok postrotate /usr/bin/killall -HUP nmbd endscript } /var/log/samba/log.smb { notifempty missingok postrotate /usr/bin/killall -HUP nmbd endscript } /var/log/samba/log.nmb { notifempty missingok postrotate /usr/bin/killall -HUP nmbd endscript } This seems to do the trick; another option is to put /var/log/samba/^log.[a-b]*[0-9]*$ { but I wasn't sure if regular expressions work in logrotate, this way I have separate formats for machine logs %m.log & the daemon logs smb.log nmb.log> From: Giulio Orsero <giulioo@pobox.com> > To: samba list <samba@us4.samba.org> > Subject: Re: Multiple Log Files for each machine > Date: Tue, 26 Sep 2000 20:04:05 +0200 > Organization: nowhere > > On Tue, 26 Sep 2000 12:42:20 -0400, you wrote: > > >I have samba 2.0.7 on rh6.2 (the rpm version) > >It's configured to keep logs for each machine 'log.%m' > >What i have for each machine in /var/log/samba is this: > >log.dh68 > >log.dh68.1 > >log.dh68.1.1 > >log.dh68.1.1.1 > >log.dh68.1.1.1.1 > > This is a RedHat problem, not samba's. > RedHat added a custom logrotate script to handle the "log.%m" logging > format it uses in the smb.conf. > > Look at /etc/logrotate.d/samba > > If the 1st line is=20 > /var/log/samba/* { > > try changing it to be=20 > /var/log/samba/*.log { > > --=20 > giulioo@pobox.com >-- Mihai Radu, jr. sysadmin mailto:mihai.radu@mathengine.com Mathengine Canada, 465 McGill Street, #100, Montreal, QC, Canada H2Y 2H1 Tel: +1 514 287 1166 Fax: +1 514 287 3360 Cell: +1 514 813 1412