1 |
On 20/01/07, Hans-Werner Hilse <hilse@×××.de> wrote: |
2 |
> Hi, |
3 |
> |
4 |
> On Sat, 20 Jan 2007 00:34:24 +0000 |
5 |
> Mick <michaelkintzios@×××××.com> wrote: |
6 |
> |
7 |
> > > I do not understand why the log files within /var/log/portage/ will |
8 |
> > > not rotate on my PC, while they rotate fine on my laptop. The |
9 |
> > > /etc/logrotate.conf is the same on both boxen: |
10 |
> > [...] |
11 |
> > Anyone? Anything I could look into? |
12 |
> |
13 |
> Hm, "logrotate -d"? How's logrotate being called? E.g. if it's cron, |
14 |
> what cron daemon are you using? E.g. fcron and dcron don't support a |
15 |
> system wide crontab in /etc/crontab, so things in /etc/cron.* won't |
16 |
> ever be called. |
17 |
|
18 |
Thanks HW, this is what logrotate -d shows re. portage logs: |
19 |
================================ |
20 |
# logrotate -d /etc/logrotate.conf |
21 |
reading config file /etc/logrotate.conf |
22 |
including /etc/logrotate.d |
23 |
[snip...] |
24 |
|
25 |
reading config info for /var/log/portage/*.log |
26 |
olddir is now /var/log/portage/old |
27 |
[snip...] |
28 |
|
29 |
rotating pattern: /var/log/portage/*.log |
30 |
weekly (1 rotations) |
31 |
olddir is /var/log/portage/old, empty log files are rotated, old logs |
32 |
are removed |
33 |
considering log /var/log/portage/4052-ati-drivers-8.14.13-r3.log |
34 |
log does not need rotating |
35 |
considering log /var/log/portage/4053-ati-drivers-8.14.13-r3.log |
36 |
log does not need rotating |
37 |
considering log /var/log/portage/4053-xorg-x11-6.8.2-r6.log |
38 |
log does not need rotating |
39 |
[snip...] |
40 |
================================ |
41 |
|
42 |
However, the three files shown above as an example are more than 1 week old: |
43 |
|
44 |
# ls -la /var/log/portage/ |
45 |
total 231058 |
46 |
drwxrws--- 3 portage portage 76632 Jan 20 09:48 . |
47 |
drwxr-xr-x 7 root root 1208 Jan 20 09:07 .. |
48 |
-rw-r--r-- 1 root portage 6301 Dec 25 2005 |
49 |
4052-ati-drivers-8.14.13-r3.log |
50 |
-rw-r--r-- 1 root portage 395 Dec 25 2005 |
51 |
4053-ati-drivers-8.14.13-r3.log |
52 |
-rw-r--r-- 1 root portage 9137458 Dec 25 2005 4053-xorg-x11-6.8.2-r6.log |
53 |
|
54 |
I am not sure if it is cron related at all because it won't rotate |
55 |
these files, even when I try it manually. Anyway, both machines are |
56 |
using vixie-cron-4.1-r9 which I have not modified whatsoever from its |
57 |
default: |
58 |
================================ |
59 |
# cat /etc/cron.daily/logrotate.cron |
60 |
#! /bin/sh |
61 |
|
62 |
/usr/sbin/logrotate /etc/logrotate.conf |
63 |
================================ |
64 |
|
65 |
I thought of forcing it through and therefore I have now used the -f |
66 |
option. It seems to have moved all logs into the old dir. |
67 |
================================ |
68 |
rotating pattern: /var/log/portage/*.log |
69 |
forced from command line (1 rotations) |
70 |
olddir is /var/log/portage/old, empty log files are rotated, old logs |
71 |
are removed |
72 |
considering log /var/log/portage/4052-ati-drivers-8.14.13-r3.log |
73 |
log needs rotating |
74 |
considering log /var/log/portage/4053-ati-drivers-8.14.13-r3.log |
75 |
log needs rotating |
76 |
considering log /var/log/portage/4053-xorg-x11-6.8.2-r6.log |
77 |
log needs rotating |
78 |
================================ |
79 |
Because it was forced it shows above that "log needs rotating". |
80 |
|
81 |
Then it rotated them happily (I think): |
82 |
================================ |
83 |
rotating log /var/log/portage/4052-ati-drivers-8.14.13-r3.log, |
84 |
log->rotateCount is 1 |
85 |
renaming /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 to |
86 |
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.2 (rotatecount 1, |
87 |
logstart 1, i 1), |
88 |
old log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 does not exist |
89 |
renaming /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.0 to |
90 |
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 (rotatecount 1, |
91 |
logstart 1, i 0), |
92 |
old log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.0 does not exist |
93 |
log /var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.2 doesn't |
94 |
exist -- won't try to dispose of it |
95 |
renaming /var/log/portage/4052-ati-drivers-8.14.13-r3.log to |
96 |
/var/log/portage/old/4052-ati-drivers-8.14.13-r3.log.1 |
97 |
running postrotate script |
98 |
rotating log /var/log/portage/4053-ati-drivers-8.14.13-r3.log, |
99 |
log->rotateCount is 1 |
100 |
renaming /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 to |
101 |
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.2 (rotatecount 1, |
102 |
logstart 1, i 1), |
103 |
old log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 does not exist |
104 |
renaming /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.0 to |
105 |
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 (rotatecount 1, |
106 |
logstart 1, i 0), |
107 |
old log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.0 does not exist |
108 |
log /var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.2 doesn't |
109 |
exist -- won't try to dispose of it |
110 |
renaming /var/log/portage/4053-ati-drivers-8.14.13-r3.log to |
111 |
/var/log/portage/old/4053-ati-drivers-8.14.13-r3.log.1 |
112 |
running postrotate script |
113 |
rotating log /var/log/portage/4053-xorg-x11-6.8.2-r6.log, log->rotateCount is 1 |
114 |
renaming /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 to |
115 |
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.2 (rotatecount 1, |
116 |
logstart 1, i 1), |
117 |
old log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 does not exist |
118 |
renaming /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.0 to |
119 |
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 (rotatecount 1, |
120 |
logstart 1, i 0), |
121 |
old log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.0 does not exist |
122 |
log /var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.2 doesn't exist -- |
123 |
won't try to dispose of it |
124 |
renaming /var/log/portage/4053-xorg-x11-6.8.2-r6.log to |
125 |
/var/log/portage/old/4053-xorg-x11-6.8.2-r6.log.1 |
126 |
running postrotate script |
127 |
================================ |
128 |
|
129 |
I don't know if you can see something amiss above. I guess I can wait |
130 |
for a week and see if this problem recurs. |
131 |
|
132 |
Thanks again. |
133 |
-- |
134 |
Regards, |
135 |
Mick |
136 |
-- |
137 |
gentoo-user@g.o mailing list |