* [gentoo-user] logrotate won't rotate portage logs
@ 2007-01-15 19:32 Mick
2007-01-20 0:34 ` [gentoo-user] " Mick
0 siblings, 1 reply; 5+ messages in thread
From: Mick @ 2007-01-15 19:32 UTC (permalink / raw
To: gentoo-user
Hi All,
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:
==========================================
# rotate log files weekly
weekly
#daily
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# packages can drop log rotation information into this directory
include /etc/logrotate.d
notifempty
nomail
noolddir
[snip . . . ]
# when /var/log/portage gets big
/var/log/portage/*.log
{
rotate 1
weekly
nocreate
ifempty
olddir /var/log/portage/old
postrotate
find /var/log/portage/old -maxdepth 1 -mtime +30 -exec /bin/rm -f {} \;
endscript
nocompress
}
==========================================
The only difference I noticed (other than the fact that I have two
year old portage log files in /var/log/portage) between the two boxen
is that the access rights of the 'old' directory on the PC were:
drwxr-sr-x 2 root root 48 Dec 23 2005 old
while on the laptop which rotates without problems are:
drwx------ 2 root root 4256 Jan 13 11:20 old
This may be a bit of a red herring because even though I changed the
access rights as per the laptop, the PC still refuses to rotate the
portage log files.
Any ideas? How do I troubleshoot this one?
--
Regards,
Mick
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-user] Re: logrotate won't rotate portage logs
2007-01-15 19:32 [gentoo-user] logrotate won't rotate portage logs Mick
@ 2007-01-20 0:34 ` Mick
2007-01-20 15:24 ` Hans-Werner Hilse
0 siblings, 1 reply; 5+ messages in thread
From: Mick @ 2007-01-20 0:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]
On Monday 15 January 2007 19:32, Mick wrote:
> Hi All,
>
> 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:
> ==========================================
> # rotate log files weekly
> weekly
> #daily
>
> # keep 4 weeks worth of backlogs
> rotate 4
>
> # create new (empty) log files after rotating old ones
> create
>
> # uncomment this if you want your log files compressed
> compress
>
> # packages can drop log rotation information into this directory
> include /etc/logrotate.d
>
> notifempty
> nomail
> noolddir
>
> [snip . . . ]
>
> # when /var/log/portage gets big
> /var/log/portage/*.log
> {
> rotate 1
> weekly
> nocreate
> ifempty
> olddir /var/log/portage/old
> postrotate
> find /var/log/portage/old -maxdepth 1 -mtime +30 -exec /bin/rm -f {} \;
> endscript
> nocompress
> }
> ==========================================
>
> The only difference I noticed (other than the fact that I have two
> year old portage log files in /var/log/portage) between the two boxen
> is that the access rights of the 'old' directory on the PC were:
>
> drwxr-sr-x 2 root root 48 Dec 23 2005 old
>
> while on the laptop which rotates without problems are:
>
> drwx------ 2 root root 4256 Jan 13 11:20 old
>
> This may be a bit of a red herring because even though I changed the
> access rights as per the laptop, the PC still refuses to rotate the
> portage log files.
>
> Any ideas? How do I troubleshoot this one?
Anyone? Anything I could look into?
--
Regards,
Mick
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Re: logrotate won't rotate portage logs
2007-01-20 0:34 ` [gentoo-user] " Mick
@ 2007-01-20 15:24 ` Hans-Werner Hilse
2007-01-20 16:46 ` Mick
0 siblings, 1 reply; 5+ messages in thread
From: Hans-Werner Hilse @ 2007-01-20 15:24 UTC (permalink / raw
To: gentoo-user
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.
-hwh
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Re: logrotate won't rotate portage logs
2007-01-20 15:24 ` Hans-Werner Hilse
@ 2007-01-20 16:46 ` Mick
2007-01-21 14:21 ` Hans-Werner Hilse
0 siblings, 1 reply; 5+ messages in thread
From: Mick @ 2007-01-20 16:46 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Re: logrotate won't rotate portage logs
2007-01-20 16:46 ` Mick
@ 2007-01-21 14:21 ` Hans-Werner Hilse
0 siblings, 0 replies; 5+ messages in thread
From: Hans-Werner Hilse @ 2007-01-21 14:21 UTC (permalink / raw
To: gentoo-user
Hi,
On Sat, 20 Jan 2007 16:46:36 +0000
Mick <michaelkintzios@gmail.com> wrote:
> Thanks HW, this is what logrotate -d shows re. portage logs:
> ================================
> # logrotate -d /etc/logrotate.conf
> [snip...]
> rotating pattern: /var/log/portage/*.log
> weekly (1 rotations)
> [snip...]
> considering log /var/log/portage/4053-xorg-x11-6.8.2-r6.log
> log does not need rotating
> [snip...]
> ================================
Hm, I've never fiddled with logrotate around so much, but if I'm not
misinterpreting the man page, you can rotate based on the age of a file
using the directive "maxage <days>". The "weekly" rotation seems to
have some state saving and checking on which rotation is based on.
> 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.
You could cheat and use "hwclock" ;-) (if you do, don't forget
"--noadjtime" or your clock will skip drastically on each next reboot)
-hwh
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-21 14:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-01-21 14:21 ` Hans-Werner Hilse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox