8

I'm running Yosemite, a clean install.

launchd continuously runs at 100% CPU. Since the Yosemite upgrade I can't change the log level with 'sudo launchctl log level debug'

Checking top or Activity Monitor I can see that launchd itself is using the CPU heavily, not a process which it's spawning off. It has the highest cpu time on the box, 3 times that of kernel task, and vastly higher than Plex which is genuinely CPU heavy - video transcoding, and it supports a lot of clients in the house running frequently.

Nothing significant in the logs that I can see: the most frequent message:

11/6/14 10:06:38.748 PM com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.

That's only about 3-6 times per hour.

I did a quick check through all the launchd daemons to find any error codes.

alex@smiley:~|⇒  launchctl list | grep -v "\t0\t"
PID Status  Label
28122   -15 com.apple.Finder
alex@smiley:~|⇒  sudo launchctl list | grep -v "\t0\t"
PID Status  Label
219 -43 com.apple.watchdogd
21134   -15 com.apple.security.syspolicy

Interestingly the -43 code on Watchdogd doesn't match the output of launchctl list:

alex@smiley:~|⇒  sudo launchctl list com.apple.watchdogd
{
    "StandardOutPath" = "/var/log/watchdogd/log";
    "LimitLoadToSessionType" = "System";
    "StandardErrorPath" = "/var/log/watchdogd/log";
    "Label" = "com.apple.watchdogd";
    "TimeOut" = 30;
    "OnDemand" = false;
    "LastExitStatus" = 171;
    "PID" = 219;
    "Program" = "/usr/libexec/watchdogd";
    "ProgramArguments" = (
        "/usr/libexec/watchdogd";
    );
};

In any case, I'm not sure if they're symptomatic, or just a red-herring.

How can I find out what's making launchd DOS my computer?

3

There is an app called LaunchControl which provides a very nice interface for creating/checking/modifying/disabling launch daemons and agents. It's much easier than looking in 5 different folders for startup items. (I'm not affiliated with them in any way.)

I would go through and disable each one at a time until your problem disappears.

http://www.soma-zone.com/LaunchControl/

  • 2
    I endorse LaunchControl. It was free (I then contributed my $10 for it) and saved me hours of my time identifying the problem with a script. After nearly three weeks pretending to know something about coding, this little program had my daemon running in minutes. Geoff – GeoffatMM Aug 11 '16 at 9:22
  • LaunchControl was very help. – orangepips Feb 5 '17 at 0:58
1

Worth trying:

mkdir ~/Desktop/MyLaunchAgents ~/Desktop/LaunchAgents/ ~/Desktop/LaunchDaemons/

mv -vn ~/Library/LaunchAgents/* ~/Desktop/MyLaunchAgents/

sudo mv -vn /Library/LaunchAgents/* ~/Desktop/LaunchAgents/

sudo mv -vn /Library/LaunchDaemons/* ~/Desktop/LaunchDaemons/

Then reboot your computer, and see if it is still happening.

Note that moving the various files from those directories may cause some 3rd party apps to not work as expected after the reboot. If it doesn't help, you can put them back by reversing the mv commands

mv -vn ~/Desktop/MyLaunchAgents/* ~/Library/LaunchAgents/

sudo mv -vn ~/Desktop/LaunchAgents/* /Library/LaunchAgents/

sudo mv -vn ~/Desktop/LaunchDaemons/* /Library/LaunchDaemons/

and reboot again.

If it does help, then you'll need to restore the various files carefully, preferably one at a time, to see which one of them is causing the problem.

1

Go to /var/log/system.log and see if there are any errors. Fixing those errors will solve the problem.

Reference: https://discussions.apple.com/thread/6616343?tstart=0

In my case, it was spotlight which was causing the issue. I disabled it and then launchd started taking more CPU. Enabling it back fixed the issue for me.

0

In my case it was the Skype extender that was causing the launchd to run non stop. using console ap. i was able to see what is running high and once i deleted the Skype extender the lunched was not on top cpu user anymore.
Hope it helps you.

You must log in to answer this question.

protected by bmike Aug 11 '16 at 10:37

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .