磁盘权限错误导致launchd高CPU占用

本来想安静地在某弹幕网站上看看「入門⭐︎道場ルノ」,结果风扇一直以最高速转,一看活动监视器才发现launched的CPU占用达到了80%以上,还有几个进程的CPU使用也在30%到40%之间。

按直觉先kill掉几个进程试试,先拿opendirectoryd开刀。kill之后果然CPU使用率立刻降下来了。可是过了一会儿之后opendirectoryd又出现了,launchd的CPU占用又飙到80%以上。

不管三七二十一,进入/System/Library/LaunchDaemons/com.apple.opendirectoryd.plist给改名为com.apple.opendirectoryd.disable,然后重启。本以为解决问题了。结果在启动时到一半进度条不走了。这才明白杀错人了。(opendirectoryd桑,对不起!)

强制关机后,按住command ⌘+S进入单用户模式,还原com.apple.opendirectoryd.plist

mv /System/Library/LaunchDaemons/com.apple.opendirectoryd.disable /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

不过shell又提示磁盘为只读模式,果断sudo -i之后,把磁盘挂载为可写

/sbin/mount / -uaw

这才把com.apple.opendirectoryd.plist给还原了。

重新进入系统后,想到还有Console,立刻打开查看,原来是输入法的某个服务文件的权限不正确,一直在后台重试。

屏幕快照 2014-11-22 下午7.41.25
屏幕快照 2014-11-22 下午7.43.04

果断删了输入法,修复磁盘权限。

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − 6 =