LinHES Forums http://forums.linhes.org/ |
|
/var/log/syslog file stopped auto-rotating??? http://forums.linhes.org/viewtopic.php?f=5&t=23949 |
Page 1 of 1 |
Author: | neutron68 [ Sat Feb 08, 2014 1:18 pm ] |
Post subject: | /var/log/syslog file stopped auto-rotating??? |
On my KM R5.5 machine, sometime in the fall (Oct. or Nov.2013) my /var/log/syslog file stopped getting auto-rotated. In looking into how it's done in a Debian system I found this: http://www.ducea.com/2006/06/06/rotating-linux-log-files-part-1-syslog/ It says that the /etc/cron.daily/sysklogd and /etc/cron.weekly/sysklogd scripts rotate the system log files. I found if I log in as root and manually run the /etc/cron.daily/sysklogd script, the syslog rotates. If I leave the system on it's own, it will not auto-rotate. I can't see what's wrong and why it won't run inside the cron.daily folder? All the permissions look right and the sysklogd is set as an executable (chmod 755)? Code: root@mythtv:/etc/cron.daily# ls -l total 76 -rwxr-xr-x 1 root root 6822 Feb 7 2009 apt -rwxr-xr-x 1 root root 314 Oct 26 2006 aptitude -rwxr-xr-x 1 root root 502 Aug 15 2006 bsdmainutils -rwxrwxr-x 1 root root 37 Jan 4 2010 clearddp -rwxr-xr-x 1 root root 314 Aug 31 2006 dlocate -rwxr-xr-x 1 root root 419 Aug 6 2006 find -rwxr-xr-x 1 root root 89 Apr 8 2006 logrotate -rwxr-xr-x 1 root root 946 Oct 10 2006 man-db -rwxr-xr-x 1 root root 86 Jun 3 2006 modutils -rwxr-xr-x 1 root root 1154 Mar 4 2007 ntp -rwxr-xr-x 1 root root 383 Oct 21 2006 samba -rwxr-xr-x 1 root root 3283 Oct 12 2006 standard -rwxr-xr-x 1 root root 567 Nov 21 21:57 sync -rwxr-xr-x 1 root root 1181 Sep 28 2006 sysklogd -rwxr-xr-x 1 root root 469 Aug 27 2006 sysstat -rwxr-xr-x 1 root root 35 Jan 4 2010 timesync -rwxrwxrwx 1 root root 42 Jan 10 22:12 touchdaily -rwxr-xr-x 1 root root 114 Feb 22 2008 trailers The crontab file is set to run the /etc/cron.daily files, so I'm not sure why /etc/cron.daily/sysklogd won't run on it's own any more? Code: # m h dom mon dow user command 9 * * * * root cd / && run-parts --report /etc/cron.hourly 15 0 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # The syslog on my friend's KM machine rotates fine, and the only difference is when the cron.daily scrips run. On his KM machine they are set for a 6:25am run time. I have mine set to run at 12:15am. Any clues? Eric |
Author: | neutron68 [ Sun Feb 09, 2014 10:22 am ] |
Post subject: | Re: /var/log/syslog file stopped auto-rotating??? |
Last weekend, I made a script to force a weekly autorotate of syslog and put it in the /etc/logrotate.d directory. Code: /var/log/syslog { weekly missingok rotate 8 compress delaycompress notifempty create 640 root adm } It seems to have worked. /etc/cron.weekly activated at 6:47am this morning, and /var/log/syslog rotated at 6:47am. It would still be nice to know why the system can't autorotate syslog by itself any more! |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |