RE: Questions About Logrotate

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: RE: Questions About Logrotate
On Mon, 2005-03-21 at 18:22 -0700, David Demland wrote:
> I changed the user and the group from proxy to squid. This did not seem to
> help. Here is an excerpt of the output from last night's run:
>
> 1 run-parts: executing /etc/cron.daily/bsdmainutils
> 2 run-parts: executing /etc/cron.daily/exim
> 3 /etc/cron.daily/exim:
> 4 chmod: cannot access `/var/log/exim/paniclog.new': No such file or
> directory
> 5 mv: cannot stat `/var/log/exim/paniclog.new': No such file or directory
> 6 run-parts: executing /etc/cron.daily/find
> 7 run-parts: executing /etc/cron.daily/logrotate
> 8 Starting Logrotate
> 9 Starting Logrotate
> 10 reading config file /etc/logrotate.conf
> 11 including /etc/logrotate.d
> 12 reading config file base-config
> 13 reading config info for /var/log/installer.log
> 14 reading config info for /var/log/installer.timings
> 15 reading config file dansguardian
> 16 reading config info for /var/log/dansguardian/access.log
> 17 reading config file /etc/logrotate.conf
> 18 including /etc/logrotate.d
> 19 reading config file base-config
> 20 reading config info for /var/log/installer.log
> 21 reading config info for /var/log/installer.timings
> 22 reading config file dansguardian
> 23 reading config info for /var/log/dansguardian/access.log
> 24 reading config file squid
> 25 reading config file squid
> 26 reading config info for /var/log/squid/*.log
> 27 reading config info for /var/log/wtmp
> 28 reading config info for /var/log/btmp
> 29 reading config info for /var/log/squid/*.log
> 30 reading config info for /var/log/wtmp
> 31 reading config info for /var/log/btmp
>
> I am at a lost over lines 8 and 9. These two lines seem to show that the
> logrotate script is being called two times. Yet the crontab looks like:
>
> # /etc/crontab: system-wide crontab
> # Unlike any other crontab you don't have to run the `crontab'
> # command to install the new version when you edit this file.
> # This file also has a username field, that none of the other crontabs do.
>
> SHELL=/bin/sh
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>
> # m h dom mon dow user  command
> 17 *    * * *   root    run-parts --report /etc/cron.hourly
> 25 6    * * *   root    test -x /usr/sbin/anacron || run-parts -v --report
> /etc/cron.daily  >> /home/dansguardian/LogRotateOutPut 2>&1
> 47 6    * * 7   root    test -x /usr/sbin/anacron || run-parts --report
> /etc/cron.weekly
> 52 6    1 * *   root    test -x /usr/sbin/anacron || run-parts --report
> /etc/cron.monthly
> #

>
> and the cron.daily directory looks like:
>
> -rwxr-xr-x 1 root root 86 Sep 27 2001 modutils
> -rwxr-xr-x 1 root root 495 Nov 18 2001 netkit-inetd
> -rwxr-xr-x 1 root root 502 Jul 4 2002 bsdmainutils
> -rwxr-xr-x 1 root root 2571 Jul 28 2004 standard
> -rwxr-xr-x 1 root root 1307 Nov 7 05:13 sysklogd
> -rwxr-xr-x 1 root root 419 Nov 21 03:10 find
> -rwxr-xr-x 1 root root 946 Jan 5 09:30 man-db
> -rwxr-xr-x 1 root root 527 Jan 9 05:10 exim
> -rwxr-xr-x 1 root root 197 Mar 20 19:52 logrotate
>
> and the cron.weekly looks like:
>
> -rwxr-xr-x 1 root root 1092 Nov 7 05:13 sysklogd
> -rwxr-xr-x 1 root root 520 Jan 5 09:30 man-db
>
> The logrotate looks like:
>
> #!/bin/sh
>
> test -x /usr/sbin/logrotate || exit 0
> echo Starting Logrotate >> /home/dansguardian/LogRotateOutPut
> /usr/sbin/logrotate -v /etc/logrotate.conf >>
> /home/dansguardian/LogRotateOutPut 2>&1
>
> The cron configuration does not show an overlay that would call the
> logrotate two times. Yet because of the "Starting Logrotate" appearing in
> the output two times, it would lead to the conclusion that the logrotate
> script is being called twice. Can anyone help me to understand how this
> could be happening?

----
cron.daily
cron.hourly
cron.monthly
cron.weekly

there are 4 possible instances (scripts) that could be launching

this could explain why it shows up twice

last post - you listed errors - this post, I don't see any errors, only
a user with doubts

Are you having problems still or just doing an OCE thing?

also, know that not all cron scripts go in the cron folders you listed
for us...

# ls -l /var/spool/cron/
total 12
-rw-------    1 root     root          158 Feb 21 15:07 apache
-rw-------    1 root     root          191 Apr 22  2003 craig
-rw-------    1 root     root          144 Feb 21 15:05 root


Craig

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss