Gentoo Archives: gentoo-user

From: Alexander Kapshuk <alexander.kapshuk@×××××.com>
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] portage summary logs not rotated any more
Date: Sun, 05 Apr 2015 13:19:24
Message-Id: CAJ1xhMUFVZ5JUxgKgxB+Jir-zyFYCZGey1WrstLCV53=A=Ys8w@mail.gmail.com
In Reply to: Re: [gentoo-user] portage summary logs not rotated any more by Mick
1 On Sun, Apr 5, 2015 at 10:50 AM, Mick <michaelkintzios@×××××.com> wrote:
2
3 > On Sunday 05 Apr 2015 06:39:31 Alexander Kapshuk wrote:
4 > > On Sun, Apr 5, 2015 at 1:18 AM, Mick <michaelkintzios@×××××.com> wrote:
5 > > > On Saturday 04 Apr 2015 20:35:31 Alexander Kapshuk wrote:
6 > > > > My portage summary logs don't seem to be rotated any more.
7 > > > >
8 > > > > ls -lt `pwd`/summary.log*
9 > > > > -rw-rw-r-- 1 portage portage 96581 Apr 3 19:47
10 > > > > /var/log/portage/elog/summary.log
11 > > > > -rw-rw-r-- 1 portage portage 5927 Jan 10 07:50
12 > > > > /var/log/portage/elog/summary.log-20150112
13 > > > > -rw-rw-r-- 1 portage portage 2281 Jan 4 21:14
14 > > > > /var/log/portage/elog/summary.log-20150104.gz
15 > > > > -rw-rw-r-- 1 portage portage 565 Dec 26 20:53
16 > > > > /var/log/portage/elog/summary.log-20141228.gz
17 > > > > -rw-rw-r-- 1 portage portage 1842 Dec 22 17:52
18 > > > > /var/log/portage/elog/summary.log-20141222.gz
19 > > > >
20 > > > > grep Messages summary.log | sed '1h;$!d;x;G;q'
21 > > > >
22 > > > > >>> Messages generated by process 3399 on 2015-01-13 17:47:47 EET for
23 > > > >
24 > > > > package dev-python/reportlab-3.1.8-r2:
25 > > > > >>> Messages generated by process 4080 on 2015-04-03 19:47:54 EEST
26 > for
27 > > > >
28 > > > > package net-print/hplip-3.14.1:
29 > > > >
30 > > > > grep Messages summary.log-20150112 | sed '1h;$!d;x;G;q'
31 > > > >
32 > > > > >>> Messages generated by process 2637 on 2015-01-04 22:02:00 EET for
33 > > > >
34 > > > > package app-office/libreoffice-4.2.8.2:
35 > > > > >>> Messages generated by process 3483 on 2015-01-10 07:50:04 EET for
36 > > > >
37 > > > > package dev-libs/openssl-1.0.1k:
38 > > > >
39 > > > > cat /etc/logrotate.d/elog-save-summary
40 > > > > # Copyright 1999-2011 Gentoo Foundation
41 > > > > # Distributed under the terms of the GNU General Public License v2
42 > > > > # Rotate the log created by the save_summary elog module.
43 > > > >
44 > > > > /var/log/portage/elog/summary.log {
45 > > > >
46 > > > > su portage portage
47 > > > > missingok
48 > > > > nocreate
49 > > > > delaycompress
50 > > > >
51 > > > > }
52 > > > >
53 > > > > /etc/logrotate.conf:6,8
54 > > > > # rotate log files weekly.
55 > > > > weekly
56 > > > > #daily
57 > > > >
58 > > > > What could be wrong here? Or am I misreading something?
59 > > > >
60 > > > > Thanks.
61 > > >
62 > > > Is your logrotate running regularly as expected? What do you get when
63 > > >
64 > > > from:
65 > > > grep logrotate /var/log/cron.log
66 > > >
67 > > > --
68 > > > Regards,
69 > > > Mick
70 > >
71 > > Thanks for your response.
72 > >
73 > > I'm afraid I don't have the cron logging set up. I should probably go
74 > ahead
75 > > and do it, shouldn't I?
76 > >
77 > > grep logrotate /var/log/cron.log
78 > > grep: /var/log/cron.log: No such file or directory
79 > >
80 > > The cron daemon is running though.
81 > >
82 > > ps auxwww|grep '[c]ron'
83 > > root 2418 0.0 0.1 5464 1868 ? Ss 08:33 0:00
84 > > /usr/sbin/crond
85 > >
86 > > Thanks.
87 >
88 > Ah! I must have set this up myself. In /etc/syslog-ng/syslog-ng.conf I
89 > have
90 > among other settings:
91 >
92 > destination cron { file("/var/log/cron.log"); };
93 > filter f_cron { facility(cron); };
94 > log { source(src); filter(f_cron); destination(cron); };
95 >
96 > This is not necessary though. You can search /var/log/messages for
97 > logrotate.
98 >
99 > --
100 > Regards,
101 > Mick
102 >
103
104
105 Understood. Thanks.
106
107 Messages doesn't seem to have anything out of the ordinary to say about
108 logrotate though.
109 sed '/logrotate/!d' /var/log/messages
110 Jan 13 17:50:02 localhost run-crons[7443]: (root) CMD
111 (/etc/cron.daily/logrotate)
112 Jan 14 18:00:02 localhost run-crons[4576]: (root) CMD
113 (/etc/cron.daily/logrotate)
114 Jan 15 18:10:02 localhost run-crons[1692]: (root) CMD
115 (/etc/cron.daily/logrotate)
116 Jan 16 18:20:01 localhost run-crons[4448]: (root) CMD
117 (/etc/cron.daily/logrotate)
118
119 An observation I've made, is that my log rotation seems to have effected
120 all other logs in /var/log as well. It seems to have stopped working around
121 January this year.
122
123 ls -lt /var/log/messages*
124 -rw------- 1 root root 9986127 Apr 5 16:10 /var/log/messages
125 -rw------- 1 root root 173843 Jan 12 10:20 /var/log/messages-20150112.gz
126 -rw------- 1 root root 277867 Jan 4 22:00 /var/log/messages-20150104.gz
127 -rw------- 1 root root 132157 Dec 28 20:30 /var/log/messages-20141228.gz
128 -rw------- 1 root root 142911 Dec 22 19:30 /var/log/messages-20141222.gz
129
130 sed '1h;$!d;x;G;q' /var/log/messages
131 Jan 12 10:20:02 localhost syslog-ng[2321]: Configuration reload request
132 received, reloading configuration;
133 Apr 5 16:10:01 box1 CROND[2265]: pam_unix(crond:session): session closed
134 for user root
135
136 ls -lt /var/log/|sort -k9
137 total 16064
138 drwxr-xr-x 2 root root 4096 Feb 15 00:42 ConsoleKit
139 -rw-r--r-- 1 root sasha 33914 Apr 5 08:34 Xorg.0.log
140 -rw-r--r-- 1 root sasha 34515 Apr 4 23:17 Xorg.0.log.old
141 -rw-r--r-- 1 root sasha 28290 Sep 22 2014 Xorg.1.log
142 drwxr-xr-x 2 root root 4096 Jan 12 10:20 chrony
143 drwxr-xr-x 2 root root 4096 Feb 7 12:26 cups
144 -rw-r----- 1 root root 50378 Apr 5 08:33 dmesg
145 -rw-rw---- 1 portage portage 6268 Apr 1 19:35 emerge-fetch.log
146 -rw-rw---- 1 portage portage 2687784 Apr 5 09:04 emerge.log
147 -rw-r--r-- 1 root root 292292 Apr 5 08:34 lastlog
148 -rw------- 1 root root 9986127 Apr 5 16:10 messages
149 -rw------- 1 root root 142911 Dec 22 19:30 messages-20141222.gz
150 -rw------- 1 root root 132157 Dec 28 20:30 messages-20141228.gz
151 -rw------- 1 root root 277867 Jan 4 22:00 messages-20150104.gz
152 -rw------- 1 root root 173843 Jan 12 10:20 messages-20150112.gz
153 drwxr-xr-x 2 root root 4096 Dec 22 2013 openconnect
154 -rw-r--r-- 1 root root 188788 Apr 5 08:34 pm-powersave.log
155 -rw-r--r-- 1 root root 4837 Sep 30 2014
156 pm-powersave.log-20141001.gz
157 -rw-r--r-- 1 root root 785 Oct 31 07:35
158 pm-powersave.log-20141101.gz
159 -rw-r--r-- 1 root root 848 Dec 1 17:00
160 pm-powersave.log-20141201.gz
161 -rw-r--r-- 1 root root 67852 Jan 1 18:34 pm-powersave.log-20150101
162 drwxrwsr-x 3 portage portage 4096 Oct 29 2013 portage
163 -rw-r--r-- 1 root root 660096 Apr 5 08:33 rc.log
164 -rw-r--r-- 1 root root 2705 Dec 22 17:37 rc.log-20141222.gz
165 -rw-r--r-- 1 root root 2493 Dec 28 08:33 rc.log-20141228.gz
166 -rw-r--r-- 1 root root 4003 Jan 4 19:51 rc.log-20150104.gz
167 -rw-r--r-- 1 root root 3026 Jan 12 08:57 rc.log-20150112.gz
168 drwxrwx--- 2 root portage 4096 Oct 29 2013 sandbox
169 -rw------- 1 root root 64064 Apr 5 08:34 tallylog
170 -rw-rw-r-- 1 root utmp 1792896 Apr 5 10:30 wtmp
171 -rw-rw-r-- 1 root utmp 32029 Dec 25 17:04 wtmp-20141225.gz
172
173 Any input on how to fix this would be much appreciated.

Replies

Subject Author
Re: [gentoo-user] portage summary logs not rotated any more Mick <michaelkintzios@×××××.com>