dubwisedude

Q: 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 1:27 PM

Close

Q: No more script activity

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by twtwtw,Helpful

    twtwtw twtwtw Mar 1, 2012 11:14 AM in response to dubwisedude
    Level 5 (4,935 points)
    Mar 1, 2012 11:14 AM in response to dubwisedude

    well, I don't know, but /System/Library/StartupItems is a standard folder that's there by default (and impossible to remove without adminstrative permission). is it really gone?  that would mean one of two things:

    • You've got disk problems - run Disk Utility to check.
    • You or someone else has been fiddling with your /system folder - all sorts of unpleasant things can result from that.

    It would surprise me if that missing folder were the cause ot the problem itself, particularly since launchd is loading the periodic jobs anyway.  You might try repairing permissions when you're in disk utility - it might be that the jobs are running but not writing to the log file because of a permissions error.  Launchd would certainly tell you if it couldn't run the job for some reason, but it might not report a log-file failure.

     

    you could also do a quick test by putting some random file in /tmp.  if it disappears after a few days, periodic-daily is being run as expected. 

  • by dubwisedude,

    dubwisedude dubwisedude Mar 1, 2012 2:09 PM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    Mar 1, 2012 2:09 PM in response to twtwtw

    Thanks a bunch tw!  I'll try as you suggested.  But, say, where do I find /tmp?

  • by twtwtw,

    twtwtw twtwtw Mar 1, 2012 4:41 PM in response to dubwisedude
    Level 5 (4,935 points)
    Mar 1, 2012 4:41 PM in response to dubwisedude

    dubwisedude wrote:

     

    Thanks a bunch tw!  I'll try as you suggested.  But, say, where do I find /tmp?

     

    uh, it's located at (wait for it...) /tmp.   switch to the Finder, select Go to Folder... from the Go menu, type in /tmp.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 1, 2012 5:03 PM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    Mar 1, 2012 5:03 PM in response to twtwtw

    ok, I put a folder in /tmp and will observe it for three days.  Disk verification turned out fine and there're no permissions to repair.  Weird...nobody seems to know what could be going on with the scripts.  I guess I'll have to consult Apple directly...

  • by twtwtw,

    twtwtw twtwtw Mar 1, 2012 5:38 PM in response to dubwisedude
    Level 5 (4,935 points)
    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.

  • by twtwtw,

    twtwtw twtwtw Mar 1, 2012 5:40 PM in response to dubwisedude
    Level 5 (4,935 points)
    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.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 1, 2012 7:08 PM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    Mar 1, 2012 7:08 PM in response to twtwtw

    Ok, tw, I take your word for it - be my guru and guide me through this.  Whether it be a "more focus solution" or "a bit of a PITA" or now or later, you decide.  Anyway, I am at a loss with this issue and just want that it all works as it's supposed to.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 2, 2012 4:20 AM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    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.

  • by twtwtw,

    twtwtw twtwtw Mar 2, 2012 7:57 PM in response to dubwisedude
    Level 5 (4,935 points)
    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.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 3, 2012 4:31 AM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    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

  • by twtwtw,

    twtwtw twtwtw Mar 3, 2012 7:31 AM in response to dubwisedude
    Level 5 (4,935 points)
    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.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 3, 2012 8:20 AM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    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.

  • by dubwisedude,

    dubwisedude dubwisedude Mar 3, 2012 9:02 AM in response to twtwtw
    Level 1 (5 points)
    Mac OS X
    Mar 3, 2012 9:02 AM in response to twtwtw

    tw, I restarted in safe mode and run disk utility as said.  Disc appears to be ok; permission verification showed no results but when I engaged repair permissions anyway, it took a good five minutes to process.  So, this is done.

    What about deleting the content of /tmp to force a re-creation?

  • by twtwtw,

    twtwtw twtwtw Mar 3, 2012 9:24 AM in response to dubwisedude
    Level 5 (4,935 points)
    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.

  • by twtwtw,

    twtwtw twtwtw Mar 3, 2012 9:36 AM in response to twtwtw
    Level 5 (4,935 points)
    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.

Previous Page 2 of 3 last Next