[PLUG] Log rolling
Anthony Schlemmer
aschlemm at attbi.com
Mon Sep 30 20:30:55 UTC 2002
Have you tried running "logrotate" manually with debugging enabled? It
won't make any changes to log files but it spits about a bunch of
information:
logrotate -d /etc/logrotate.conf
Tony
On Monday 30 September 2002 06:38 am, Rich Shepard wrote:
> Since Albany no longer has its annual Timber Festival I cannot
> learn more about log rotating there so I'm asking for help right
> here. I'm missing something in understanding how the rotation of logs
> is controlled, and I'd like to fill in this blank in my knowledge.
>
> In /etc/logrotate.d/maillog I have:
>
> /var/log/maillog {
> daily
> rotate 4
> copytruncate
> compress
> size=+1024k
> notifempty
> missingok
> postrotate
> /usr/bin/killall -HUP syslogd
> endscript
> }
>
> because I want to watch the mail on a day-to-day basis rather than
> over a longer period of time. I _thought_ that putting 'daily' in the
> log would cause the log to be rotated daily and deleted after the 4th
> day (line 2).
>
> In /etc/cron.daily is the logrotate script:
>
> #!/bin/sh
>
> /usr/sbin/logrotate /etc/logrotate.conf
>
> and, in /etc/logrotate.conf I see global variables, including:
>
> # rotate log files weekly
> weekly
>
> # RPM packages drop log rotation information into this directory
> include /etc/logrotate.d
>
> My understanding is that the inclusion of logrotate.d, with the
> 'daily' command in maillog overrides the global rotation command of
> 'weekly' in the .conf file. In any case, /var/log/maillog is not
> rotated even weekly, never mind daily.
>
> If cron.daily calls logrotate and that reads logrotate.conf, is the
> daily script ignoring everything in logrotate.d except for once per
> week? I seem to be in an infinite loop here and am not sure where I
> went wrong, despite reading the man pages several time.
>
> TIA,
>
> Rich
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
--
Anthony Schlemmer
aschlemm at attbi.com
The early bird who catches the worm works for someone who comes in late
and owns the worm farm.
-- Travis McGee
More information about the PLUG
mailing list