Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Allow the system.log file to be rotated daily' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Allow the system.log file to be rotated daily
Authored by: ghay on Dec 19, '07 08:24:47AM

I may have got this wrong, and I'm not at my Mac just now, but I'm fairly sure launchd in 10.4 was designed to compensate for Macs not on overnight when the /etc/*.local and cron jobs usually take place on *nix boxes.

I can't see them having removed this functionality in 10.5 and would imagine launchd still invokes these scripts when a suitable amount of idle time allows.



[ Reply to This | # ]
10.5: Allow the system.log file to be rotated daily
Authored by: sysherm on Dec 19, '07 10:14:12AM

Well, I appreciate the hint. My system.log hadn't been rotated since Nov 17 and had almost 45,000 lines. My MacBook Pro is usually asleep at midnight. Maybe Apple will fix this eventually.



[ Reply to This | # ]
10.5: Allow the system.log file to be rotated daily
Authored by: chris_on_hints on Dec 19, '07 10:41:55AM
launchd is smart enough to run the daily, weekly and monthly scripts even if it was asleep at the normal time (ie middle of the night). However, the rotation of system logs (which used to be in the daily script) are now handled by newsyslog - and the default setup for this deamon is to only rotate the system.log at midnight (with a 30min leeway either side).

if your machine sleeps before 11.30pm and wakes after 12.30am, the log will NEVER be rotated.

My suggestion was to change the newsyslog configuration file to either rotate the log once it reaches a certain size (as robg has done) or to instruct it to rotate every 24 hours (as i have done).

Note - if you want to see what newsyslog is thinking, running the following command will give you a reason for rotation or skipping of each log:

sudo /usr/sbin/newsyslog -v

[ Reply to This | # ]

launchd does not compensate skipped jobs
Authored by: wallybear on Dec 19, '07 01:17:44PM
No, launchd in 10.4 could be designed to compensate for Macs not on overnight when the /etc/*.local and cron jobs usually take place on *nix boxes, but I verified this is not the case.
I use PseudoAnacron (donationware) to automatically perform skipped daily/weekly/monthly cron jobs, and when I read about this 10.4 feature I removed the utility, only to discover that the task are not performed (like happened in Panther) if your Mac is asleep overnight. One month without PseudoAnacron resulted in one month of skipped daily, weekly and monthly cron jobs (and no, PseudoAnacron does not modify anything in the system that could prevent 10.4 to do the jobs). This still happens with 10.4.11.


[ Reply to This | # ]