No more script activity

I've previously posted on the same issue, and I don't wish to read that scripts only execute at such and such time (which does no longer apply) or that they are unnecessary or that I should verify the processes via terminal or console (which I did). Fact is, as of the latest update to the Lion OS X, my Mac has stopped auto-executing the scripts altogether. If I want to see them executed, I have to force the processes manually - that's the only way! Does anyone else experience this issue? What to think? What to do? Please, advise. Thanks!

iMac, Mac OS X (10.7), Lion

Posted on Feb 29, 2012 5:20 AM

Reply
32 replies

Mar 1, 2012 5:38 PM in response to dubwisedude

patience, we're still working through diagnostic procedures. We know that it's not launchd itself (you're system would crash if it was a serious problem with launchd), so it's just a question of working through the details.


What Apple will eventually tell you to do (after a long back and forth) is to reinstall your system from the maintenance partition. I may eventually suggest you do that myself - it's a generic cure-all for system problems - and you may prefer to do it now rather than look for a more focus solution. Reinstalling is a bit of a PITA, but it's not a horror; just make sure you have a current backup in case something goes terribly wrong, and make sure that you choose to preserve your user accounts.

Mar 1, 2012 5:40 PM in response to dubwisedude

patience, we're still working through diagnostic procedures. We know that it's not launchd itself (you're system would crash if it was a serious problem with launchd), so it's just a question of working through the details.


What Apple will eventually tell you to do (after a long back and forth) is to reinstall your system from the maintenance partition. I may eventually suggest you do that myself - it's a generic cure-all for system problems - and you may prefer to do it now rather than look for a more focus solution. Reinstalling is a bit of a PITA, but it's not a horror; just make sure you have a current backup in case something goes terribly wrong, and make sure that you choose to preserve your user accounts.

Mar 2, 2012 4:20 AM in response to twtwtw

Hi tw,

new finding: the folder I deposited in /tmp yesterday evening has disappeared when I checked this morning. However, no script activity for daily maintenance has been logged. Am I right to assume that scripts may be running normally but are no longer being logged?

In case you send feedback: I am away from home for much of the day, so I'll pick this up later.

Mar 2, 2012 7:57 PM in response to dubwisedude

That would be the most likely explanation. As to why it's not printing to the log file... dunno. I looked at the /usr/sbin/periodic script, and it seems to be writing the output to a temporary file first and then copying it to the log file. This could imply a permissions problem or file corruption in either place. try clearing out all the temp files and the log files manually (actually move the files to the trash and delete them); that should force the system to recreate them with default permissions.

Mar 3, 2012 4:31 AM in response to twtwtw

Hi tw,

do you mean I that should open /tmp and trash all of its content or is there something to be trashed elsewhere as well?

Apropos the logging: all manually forced script maintenance is logged!

And as I said, when I last ran permissions verification, no errors were listed, so I didn't prompt a repair either. Should I anyway?

Thanks for bearing with me, tw!

Frank

Mar 3, 2012 7:31 AM in response to dubwisedude

By 'manually forced' I assume you mean you ran the scripts directly (not slapping the display around or threatening to strangle the keyboard, right?). Running a script directly means it runs in a different context - different user, different shell environment - and that is probably the source of the different outcome. The scripts are apparently completing their tasks, so this looks like a problem with log-writing; different behavior from different users/environments tends to imply permissions issues, though that's not ironclad.


You might look at /etc/defaults/periodic.conf to see if the _output paths have somehow gotten modified. on my system (10.6.8) I see lines like:


daily_output="/var/log/daily.out"


it may also be a problem with environment variables. the temporary log file is created using the code mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX which (though a bit beyond my unix skillset) produces a unique path something like /var/folders/MU/MUJU0IllGUuyaCnVQMb50U+++TI/-Tmp-//periodic.U2Yktuwoks. Those files a pwned by root so they may be a bit of a pain to delete, but they ought to be deleted if you manually run the periodic tasks.


You should also check to see if there are any script files in /usr/local/etc/periodic/ - that is apparently a folder for script plug-ins, so if you have a script in that folder that's failing it might bomb the periodic tasks near the end of their execution (though one would think that would show up with a non-0 result or a console entry).


Restart your computer in the maintenance partition and run Disk Utility from that context - repair the disk and the permissions. can't hurt, might help, and doing it from maintenance mode gives you your best shot.


Honestly though, this whole process would be easier if you start from the other end. did you install any apps or utilities around the time that this problem began, or delete any files or apps or utilities? It would have been something that asked for administrative permission - none of the files we're talking about can be accidentally overwritten by a user (even an admin would be prompted for permissions). having an idea what caused the problem would make fixing it much simpler.

Mar 3, 2012 8:20 AM in response to twtwtw

This is getting too complex for me, man. Please, if possible, keep it simple as I am much less well versed in these matters as you are. I don't even know how to apply the commands you are speaking about.

Finder says: the folder /usr/local/etc/periodic/ cannot be found.

By manually executing the scripts I mean to force their execution via Maintidget (which I do usually since the issue in question appeared) or Onyx (happened only once as part of the automated maintenance tasks offered by default). I actually installed Onyx in the hope that running its automated maintenance feature would resolve the issue, but, obviously, it didn't. I did not change any of Onyx's default settings.

I am the only user accessing this computer and the only one taking care of any system maintenance if need be. There has been no other person or user operating this machine.

No, apart from the last update to Lion (after which the problem seem to have occurred), I have not downloaded any other apps or utilities.

As you suggested, I'll start the system in safe mode and run disk utility from there. I'll keep you posted.

Mar 3, 2012 9:24 AM in response to dubwisedude

first off, I didnt say safe mode. restart from the repair partition (hold down the option key when you hear the chime, and you'll see it listed). Safe mode uses the same system, just restricted; you want to start from a different system folder.

As I pointed out, the temp file is not made in /tmp, but somewhere in /var/folders/... you should be able to delete anything in a temporary folder without harm, but you'l un into some permissions troubles trying to do it. I suggest you download one of those free System Utility apps which can clear out all the caches, temp files, logs, and etc. Easier to use, and more likely to cover all the bases.

Mar 3, 2012 9:36 AM in response to twtwtw

If it happened after the Lion update, then it's likely some trivial foobar that will be fixed in the next update. I'll have to switch over to my Lion partition to look it over and see if a bug report needs to be filed. In the meantime it's of no concern: The scripts are running, they are just not being logged. even if the scripts were not running, mind you, it would be a minor issue - these maintenance tasks are mostly clean-up and fuss-about things. Your machine could run 24/7 for months or years without needing the scripts to execute. you'd lose some disk space from an accumulation of old files and might eventually trip over some error from something, but it's extremely unlikely that any noticeable problem would occur.


relax for now. I'll look into it and see if I can spot the problem, but there's nothing at all you need to worry about.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

No more script activity

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.