Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a MacBook Pro with Lion 10.7.2, 2.26 GHz CPU and 2GB DDR3 RAM.

If I call

top -o cpu

the /usr/libexec/opendirectoryd process consumes more than 40% of CPU.

$ ps aux | grep opend                                                                       
root 27834 40,4 0,3 2472048 5780 ?? Rs 6:36PM 167:19.66 /usr/libexec/opendirectoryd

enter image description here

share|improve this question
    
@slhck /usr/libexec/opendirectoryd –  juanpablo Oct 26 '11 at 20:55

2 Answers 2

up vote 6 down vote accepted

The problem is related to the dead symlinks in Dropbox. Find them using:

find ~/Dropbox -type l -printf "%Y %p\n" | grep "^N"

The solution is: Remove the dead symlinks. If find doesn't have the printf option, use:

find -L ~/Dropbox -type l

References

To find dead symlinks

share|improve this answer
    
Wonder how you got the first solution to work with the BSD find in OS X. You have to at least install GNU findutils for getting the printf option. –  slhck Mar 11 '12 at 12:35
    
I have installed findutils find --version 13:17 find (GNU findutils) 4.4.2 –  juanpablo Mar 11 '12 at 17:21
    
Okay, well it doesn't ship with OS X so that command you used wouldn't have worked. –  slhck Mar 11 '12 at 17:43

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
share|improve this answer
    
This solved my problem, thanks. –  Shisoft Feb 25 '13 at 16:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.