7

Since a couple of days my 2011 13" MBA (i5, 1,7Ghz) has a very strange issue which I don't know how to get rid of.

Every now and then (sometimes more times a day) a process called opendirectoryd takes up 99-101% of my CPUs. This causes the temperature to go up and after a short while the fans kick in. My MBA is logged in as part of an Active Directory Domain.

First I tried waiting a couple of minutes, but the process didn't stop. Rebooting the machine seems to always fix the problem, but that's not exactly my preferred solution for this problem.

For now I stick to force kill the process. I need to repeat this 1-2 times per iteration and then there's a undefined period of time in which I'm safe.

I'm not sure if it is related to the 10.7.2 update or to something else.

I found others having a similar problem. In that case it seems to be related to a Livescribe pen. While I have a Livescribe pen (updated to the latest version of the client software) I don't have any suspicious entries in Console.app.

Any help would be appreciated.

5 Answers 5

7

Here are the results of my investigation: https://superuser.com/a/426719/135263

--

As mentioned by @juanpablo, this may be caused by symlinks.

Apparently, if a symlink points to /home, autofs or automountd fire and take a lot of CPU to figure out that the place indeed doesn't exist.

Take a look at /etc/auto_home and /etc/autofs.conf.

To see if you're being hit by this particular problem, set

AUTOMOUNTD_VERBOSE=TRUE

option in autofs.conf, restart automountd

sudo launchctl stop com.apple.automountd

and review the syslog.log (you may use application: Console). You're affected by this problem if you see something like that:

May 20 17:53:43 xxx automountd[31709]: od_search failed

To workaround, edit the file /etc/auto_master and remove (or hash out #) the line starting with /home. Then run:

sudo automount -vc
1
  • Your diagnose seems to be correct. When I stop Dropbox, Opendirectory's activity drastically decrease. But your solution didn't work for me. Any other suggestion?
    – ndemoreau
    Commented Jul 1, 2014 at 13:45
2

First thing first, kill -9 <pid> of opendirectoryd probably won't prevent your problem from recurring at next boot up. My guess is your Mac is a managed client (MCX) that need to sync. opendirectoryd in OS X 10.7 requires a local directory node to have a "users" and a "groups" subdirectory. Try flushing your cache settings as described in http://support.apple.com/kb/HT3540

5
  • Thank you, I've tried what the link said (even though the most recent command to execute for Snow Leopard). It exited without complaining so hopefully this solves the issue.
    – mwidmann
    Commented Dec 10, 2011 at 6:28
  • 1
    If the answer solves the issue for you, please mark this question as closed. Helps keep Ask Different tidy and inform future readers if the suggestion answer works. Thanks. Commented Dec 10, 2011 at 14:00
  • 1
    Sadly it didn't fix the problem. It came back this morning. For now I decided to have the Macbook removed from the Active Directory domain in the company. Let's see if that fixes the problem.
    – mwidmann
    Commented Dec 12, 2011 at 8:00
  • mwidmann, please enable Open Directory logging (instruction is at support.apple.com/kb/HT4696) and share the log file (at /var/log/opendirectoryd.log) with your IT system admin and here. That'll help narrow us down the possibilities. Commented Dec 12, 2011 at 10:57
  • 1
    Kill should not be used with -9, only in worst case when you do not have any other way of killing a process.
    – Istvan
    Commented Feb 13, 2013 at 17:59
2

My issue to high CPU utilization of opendirectoryd was that some robot on the Internet was trying different passwords to break into my computer via ssh. At least, that's what I think this meant:

8/25/15 12:20:51.173 PM sshd[66230]: error: PAM: authentication error for root from 222.186.21.218 via 192.168.0.3
8/25/15 12:20:51.189 PM sshd[66191]: error: PAM: authentication error for root from 222.186.56.168 via 192.168.0.3
8/25/15 12:20:51.214 PM sshd[66205]: error: PAM: authentication error for root from 222.186.21.251 via 192.168.0.3

The moment I turned off SSH (by unchecking System Preferences->Sharing->Remote Login,) opendirectoryd utilization disappeared. I figure high utilization was from my computer trying to respond to those bad password requests.

We just got a new router. It obviously isn't configured to stop multiple attacks like this. Off to look at the router.

1
  • Unchecking System Preferences->Sharing->Remote Login fixed this problem for me too. Thanks Rob. The high CPU usage started after visiting the site PrimeWire.ag. Be warned.
    – user156985
    Commented Nov 11, 2015 at 19:41
1

I have the same problem but until then I have difficulty solving it.

I do not manage to understand better the solutions which you propose. Procedures are not self explanatory for new mac usersenter image description here

I will cover more details on the new OS having this same symptom on this question

3
  • 1
    Welcome to Ask Different. If you’re not on 10.7 is might be much better to start a new question detailing what information you have assembled and how that doesn’t help you might trace this. You are correct - open directory is not something that will make sense without some study and learning - it’s job is to integrate with other large directory services, so finding what triggered it may involve some setup.
    – bmike
    Commented Jun 20, 2020 at 13:32
  • 1
    The tour and How to Ask will help you greatly in making your first question one likely to be well received and point out how this isn’t a discussion forum, but a fairly focused Q&A site.
    – bmike
    Commented Jun 20, 2020 at 13:48
  • Thanks. This is perfect apple.stackexchange.com/questions/394355/…
    – bmike
    Commented Jun 20, 2020 at 18:14
0

I've also seen this problem when using MAMP, where the php code is generating warning messages, either on the screen, or the logs. After the execution of the script finishes, the service settles down again.

You must log in to answer this question.

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