View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Feb 08, 2014 1:18 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
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

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
PostPosted: Sun Feb 09, 2014 10:22 am 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
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!

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu