From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: logrotate won't rotate portage logs
Date: Sat, 20 Jan 2007 16:46:36 +0000 [thread overview]
Message-ID: <358eca8f0701200846w24063a95yfefc7d59c2c39fbf@mail.gmail.com> (raw)
In-Reply-To: <20070120162452.3f938cea.hilse@web.de>
On 20/01/07, Hans-Werner Hilse <hilse@web.de> wrote:
> Hi,
>
> On Sat, 20 Jan 2007 00:34:24 +0000
> Mick <michaelkintzios@gmail.com> 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
next prev parent reply other threads:[~2007-01-20 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-15 19:32 [gentoo-user] logrotate won't rotate portage logs Mick
2007-01-20 0:34 ` [gentoo-user] " Mick
2007-01-20 15:24 ` Hans-Werner Hilse
2007-01-20 16:46 ` Mick [this message]
2007-01-21 14:21 ` Hans-Werner Hilse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=358eca8f0701200846w24063a95yfefc7d59c2c39fbf@mail.gmail.com \
--to=michaelkintzios@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox