From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1H8JRm-0007hN-Fy for garchives@archives.gentoo.org; Sat, 20 Jan 2007 16:52:07 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id l0KGowww015892; Sat, 20 Jan 2007 16:50:58 GMT Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id l0KGkckb010655 for ; Sat, 20 Jan 2007 16:46:38 GMT Received: by wr-out-0506.google.com with SMTP id 57so635934wri for ; Sat, 20 Jan 2007 08:46:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NKUf2TBgKoHPg0FGcUE2P/7K8lM1+j6hsfkLMMjNpqN7JVrxJm9lDoQ3Kj99GENBLF1RENjB6rojcrSBzFI2+get5HOeCfXrfqlsTpe5Wwux/3SQSxSR1UbTKImY2XOZGml12rf4EiWD9M6VTztYyFmGgPzXXdD7OOCCFyCpCCM= Received: by 10.90.68.15 with SMTP id q15mr4383296aga.1169311596982; Sat, 20 Jan 2007 08:46:36 -0800 (PST) Received: by 10.90.31.3 with HTTP; Sat, 20 Jan 2007 08:46:36 -0800 (PST) Message-ID: <358eca8f0701200846w24063a95yfefc7d59c2c39fbf@mail.gmail.com> Date: Sat, 20 Jan 2007 16:46:36 +0000 From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: logrotate won't rotate portage logs In-Reply-To: <20070120162452.3f938cea.hilse@web.de> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <358eca8f0701151132v6ef24209paa43700aa6d47f8f@mail.gmail.com> <200701200034.26955.michaelkintzios@gmail.com> <20070120162452.3f938cea.hilse@web.de> X-Archives-Salt: 5548fcd2-a1f8-4715-bfbb-8ec1907c4a97 X-Archives-Hash: 0e4cc7a73b6a15d79b5d54e55ba28504 On 20/01/07, Hans-Werner Hilse wrote: > Hi, > > On Sat, 20 Jan 2007 00:34:24 +0000 > Mick 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