On Sunday 05 Apr 2015 14:19:16 Alexander Kapshuk wrote: > On Sun, Apr 5, 2015 at 10:50 AM, Mick <michaelkintz...@gmail.com> wrote: > > On Sunday 05 Apr 2015 06:39:31 Alexander Kapshuk wrote: > > > On Sun, Apr 5, 2015 at 1:18 AM, Mick <michaelkintz...@gmail.com> wrote: > > > > On Saturday 04 Apr 2015 20:35:31 Alexander Kapshuk wrote: > > > > > My portage summary logs don't seem to be rotated any more. > > > > > > > > > > ls -lt `pwd`/summary.log* > > > > > -rw-rw-r-- 1 portage portage 96581 Apr 3 19:47 > > > > > /var/log/portage/elog/summary.log > > > > > -rw-rw-r-- 1 portage portage 5927 Jan 10 07:50 > > > > > /var/log/portage/elog/summary.log-20150112 > > > > > -rw-rw-r-- 1 portage portage 2281 Jan 4 21:14 > > > > > /var/log/portage/elog/summary.log-20150104.gz > > > > > -rw-rw-r-- 1 portage portage 565 Dec 26 20:53 > > > > > /var/log/portage/elog/summary.log-20141228.gz > > > > > -rw-rw-r-- 1 portage portage 1842 Dec 22 17:52 > > > > > /var/log/portage/elog/summary.log-20141222.gz > > > > > > > > > > grep Messages summary.log | sed '1h;$!d;x;G;q' > > > > > > > > > > >>> Messages generated by process 3399 on 2015-01-13 17:47:47 EET > > > > > >>> for > > > > > > > > > > package dev-python/reportlab-3.1.8-r2: > > > > > >>> Messages generated by process 4080 on 2015-04-03 19:47:54 EEST > > > > for > > > > > > > package net-print/hplip-3.14.1: > > > > > > > > > > grep Messages summary.log-20150112 | sed '1h;$!d;x;G;q' > > > > > > > > > > >>> Messages generated by process 2637 on 2015-01-04 22:02:00 EET > > > > > >>> for > > > > > > > > > > package app-office/libreoffice-4.2.8.2: > > > > > >>> Messages generated by process 3483 on 2015-01-10 07:50:04 EET > > > > > >>> for > > > > > > > > > > package dev-libs/openssl-1.0.1k: > > > > > > > > > > cat /etc/logrotate.d/elog-save-summary > > > > > # Copyright 1999-2011 Gentoo Foundation > > > > > # Distributed under the terms of the GNU General Public License v2 > > > > > # Rotate the log created by the save_summary elog module. > > > > > > > > > > /var/log/portage/elog/summary.log { > > > > > > > > > > su portage portage > > > > > missingok > > > > > nocreate > > > > > delaycompress > > > > > > > > > > } > > > > > > > > > > /etc/logrotate.conf:6,8 > > > > > # rotate log files weekly. > > > > > weekly > > > > > #daily > > > > > > > > > > What could be wrong here? Or am I misreading something? > > > > > > > > > > Thanks. > > > > > > > > Is your logrotate running regularly as expected? What do you get > > > > when > > > > > > > > from: > > > > grep logrotate /var/log/cron.log > > > > > > > > -- > > > > Regards, > > > > Mick > > > > > > Thanks for your response. > > > > > > I'm afraid I don't have the cron logging set up. I should probably go > > > > ahead > > > > > and do it, shouldn't I? > > > > > > grep logrotate /var/log/cron.log > > > grep: /var/log/cron.log: No such file or directory > > > > > > The cron daemon is running though. > > > > > > ps auxwww|grep '[c]ron' > > > root 2418 0.0 0.1 5464 1868 ? Ss 08:33 0:00 > > > /usr/sbin/crond > > > > > > Thanks. > > > > Ah! I must have set this up myself. In /etc/syslog-ng/syslog-ng.conf I > > have > > among other settings: > > > > destination cron { file("/var/log/cron.log"); }; > > filter f_cron { facility(cron); }; > > log { source(src); filter(f_cron); destination(cron); }; > > > > This is not necessary though. You can search /var/log/messages for > > logrotate. > > > > -- > > Regards, > > Mick > > Understood. Thanks. > > Messages doesn't seem to have anything out of the ordinary to say about > logrotate though. > sed '/logrotate/!d' /var/log/messages > Jan 13 17:50:02 localhost run-crons[7443]: (root) CMD > (/etc/cron.daily/logrotate) > Jan 14 18:00:02 localhost run-crons[4576]: (root) CMD > (/etc/cron.daily/logrotate) > Jan 15 18:10:02 localhost run-crons[1692]: (root) CMD > (/etc/cron.daily/logrotate) > Jan 16 18:20:01 localhost run-crons[4448]: (root) CMD > (/etc/cron.daily/logrotate) > > An observation I've made, is that my log rotation seems to have effected > all other logs in /var/log as well. It seems to have stopped working around > January this year. > > ls -lt /var/log/messages* > -rw------- 1 root root 9986127 Apr 5 16:10 /var/log/messages > -rw------- 1 root root 173843 Jan 12 10:20 /var/log/messages-20150112.gz > -rw------- 1 root root 277867 Jan 4 22:00 /var/log/messages-20150104.gz > -rw------- 1 root root 132157 Dec 28 20:30 /var/log/messages-20141228.gz > -rw------- 1 root root 142911 Dec 22 19:30 /var/log/messages-20141222.gz > > sed '1h;$!d;x;G;q' /var/log/messages > Jan 12 10:20:02 localhost syslog-ng[2321]: Configuration reload request > received, reloading configuration; > Apr 5 16:10:01 box1 CROND[2265]: pam_unix(crond:session): session closed > for user root > > ls -lt /var/log/|sort -k9 > total 16064 > drwxr-xr-x 2 root root 4096 Feb 15 00:42 ConsoleKit > -rw-r--r-- 1 root sasha 33914 Apr 5 08:34 Xorg.0.log > -rw-r--r-- 1 root sasha 34515 Apr 4 23:17 Xorg.0.log.old > -rw-r--r-- 1 root sasha 28290 Sep 22 2014 Xorg.1.log > drwxr-xr-x 2 root root 4096 Jan 12 10:20 chrony > drwxr-xr-x 2 root root 4096 Feb 7 12:26 cups > -rw-r----- 1 root root 50378 Apr 5 08:33 dmesg > -rw-rw---- 1 portage portage 6268 Apr 1 19:35 emerge-fetch.log > -rw-rw---- 1 portage portage 2687784 Apr 5 09:04 emerge.log > -rw-r--r-- 1 root root 292292 Apr 5 08:34 lastlog > -rw------- 1 root root 9986127 Apr 5 16:10 messages > -rw------- 1 root root 142911 Dec 22 19:30 messages-20141222.gz > -rw------- 1 root root 132157 Dec 28 20:30 messages-20141228.gz > -rw------- 1 root root 277867 Jan 4 22:00 messages-20150104.gz > -rw------- 1 root root 173843 Jan 12 10:20 messages-20150112.gz > drwxr-xr-x 2 root root 4096 Dec 22 2013 openconnect > -rw-r--r-- 1 root root 188788 Apr 5 08:34 pm-powersave.log > -rw-r--r-- 1 root root 4837 Sep 30 2014 > pm-powersave.log-20141001.gz > -rw-r--r-- 1 root root 785 Oct 31 07:35 > pm-powersave.log-20141101.gz > -rw-r--r-- 1 root root 848 Dec 1 17:00 > pm-powersave.log-20141201.gz > -rw-r--r-- 1 root root 67852 Jan 1 18:34 pm-powersave.log-20150101 > drwxrwsr-x 3 portage portage 4096 Oct 29 2013 portage > -rw-r--r-- 1 root root 660096 Apr 5 08:33 rc.log > -rw-r--r-- 1 root root 2705 Dec 22 17:37 rc.log-20141222.gz > -rw-r--r-- 1 root root 2493 Dec 28 08:33 rc.log-20141228.gz > -rw-r--r-- 1 root root 4003 Jan 4 19:51 rc.log-20150104.gz > -rw-r--r-- 1 root root 3026 Jan 12 08:57 rc.log-20150112.gz > drwxrwx--- 2 root portage 4096 Oct 29 2013 sandbox > -rw------- 1 root root 64064 Apr 5 08:34 tallylog > -rw-rw-r-- 1 root utmp 1792896 Apr 5 10:30 wtmp > -rw-rw-r-- 1 root utmp 32029 Dec 25 17:04 wtmp-20141225.gz > > Any input on how to fix this would be much appreciated.
It seems to me that logrotate stopped rotating your logs back in Jan. Did you change something in its configuration back then? This is what I have in /etc/cron.daily/logrotate: ================================================ #!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0 ================================================= PS. I leave previous message content untrimmed in case someone else spots something of significance on what you have posted to date and can chime in with a solution. -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.