On 20/01/07, Hans-Werner Hilse <[EMAIL PROTECTED]> wrote:
Hi,

On Sat, 20 Jan 2007 00:34:24 +0000
Mick <[EMAIL PROTECTED]> wrote:

> > I do not understand why the log files within /var/log/portage/ will
> > not rotate on my PC, while they rotate fine on my laptop.  The
> > /etc/logrotate.conf is the same on both boxen:
> [...]
> Anyone? Anything I could look into?

Hm, "logrotate -d"? How's logrotate being called? E.g. if it's cron,
what cron daemon are you using? E.g. fcron and dcron don't support a
system wide crontab in /etc/crontab, so things in /etc/cron.* won't
ever be called.

Thanks HW, this is what logrotate -d shows re. portage logs:
================================
# logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
[snip...]

reading config info for /var/log/portage/*.log
olddir is now /var/log/portage/old
[snip...]

rotating pattern: /var/log/portage/*.log
weekly (1 rotations)
olddir is /var/log/portage/old, empty log files are rotated, old logs
are removed
considering log /var/log/portage/4052-ati-drivers-8.14.13-r3.log
 log does not need rotating
considering log /var/log/portage/4053-ati-drivers-8.14.13-r3.log
 log does not need rotating
considering log /var/log/portage/4053-xorg-x11-6.8.2-r6.log
 log does not need rotating
[snip...]
================================

However, the three files shown above as an example are more than 1 week old:

# ls -la /var/log/portage/
total 231058
drwxrws--- 3 portage portage    76632 Jan 20 09:48 .
drwxr-xr-x 7 root    root        1208 Jan 20 09:07 ..
-rw-r--r-- 1 root    portage     6301 Dec 25  2005
4052-ati-drivers-8.14.13-r3.log
-rw-r--r-- 1 root    portage      395 Dec 25  2005
4053-ati-drivers-8.14.13-r3.log
-rw-r--r-- 1 root    portage  9137458 Dec 25  2005 4053-xorg-x11-6.8.2-r6.log

I am not sure if it is cron related at all because it won't rotate
these files, even when I try it manually.  Anyway, both machines are
using vixie-cron-4.1-r9 which I have not modified whatsoever from its
default:
================================
# cat /etc/cron.daily/logrotate.cron
#! /bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
================================

I thought of forcing it through and therefore I have now used the -f
option.  It seems to have moved all logs into the old dir.
================================
rotating pattern: /var/log/portage/*.log
forced from command line (1 rotations)
olddir is /var/log/portage/old, empty log files are rotated, old logs
are removed
considering log /var/log/portage/4052-ati-drivers-8.14.13-r3.log
 log needs rotating
considering log /var/log/portage/4053-ati-drivers-8.14.13-r3.log
 log needs rotating
considering log /var/log/portage/4053-xorg-x11-6.8.2-r6.log
 log needs rotating
================================
Because it was forced it shows above that "log needs rotating".

Then it rotated them happily (I think):
================================
rotating log /var/log/portage/4052-ati-drivers-8.14.13-r3.log,
log->rotateCount is 1
renaming /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 to
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.2 (rotatecount 1,
logstart 1, i 1),
old log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 does not exist
renaming /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.0 to
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 (rotatecount 1,
logstart 1, i 0),
old log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.0 does not exist
log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.2 doesn't
exist -- won't try to dispose of it
renaming /var/log/portage/4052-ati-drivers-8.14.13-r3.log to
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1
running postrotate script
rotating log /var/log/portage/4053-ati-drivers-8.14.13-r3.log,
log->rotateCount is 1
renaming /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 to
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.2 (rotatecount 1,
logstart 1, i 1),
old log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 does not exist
renaming /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.0 to
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 (rotatecount 1,
logstart 1, i 0),
old log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.0 does not exist
log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.2 doesn't
exist -- won't try to dispose of it
renaming /var/log/portage/4053-ati-drivers-8.14.13-r3.log to
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1
running postrotate script
rotating log /var/log/portage/4053-xorg-x11-6.8.2-r6.log, log->rotateCount is 1
renaming /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 to
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.2 (rotatecount 1,
logstart 1, i 1),
old log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 does not exist
renaming /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.0 to
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 (rotatecount 1,
logstart 1, i 0),
old log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.0 does not exist
log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.2 doesn't exist --
won't try to dispose of it
renaming /var/log/portage/4053-xorg-x11-6.8.2-r6.log to
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1
running postrotate script
================================

I don't know if you can see something amiss above.  I guess I can wait
for a week and see if this problem recurs.

Thanks again.
--
Regards,
Mick
--
gentoo-user@gentoo.org mailing list

Reply via email to