我的系统日志告诉我事件监视器不断重新启动,但我不知道实际问题是什么。
系统日志:
Oct 19 21:03:44 funkymachinename emond[51201]: SetUpLogs: uid = 0 gid = 0
Oct 19 21:03:44 funkymachinename emond[51201]: SetUpLogs: opening /Library/Logs/EventMonitor/EventMonitor.error.log
Oct 19 21:03:44 funkymachinename com.apple.xpc.launchd[1] (com.apple.emond): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
/库/日志/EventMonitor/EventMonitor.error.log:
Event Monitor Started 2014-10-19 20:52:02 +0200
No rules found in /private/etc/emond.d/rules/, quitting....
Event Monitor Shutdown at 2014-10-19 20:52:02 +0200
检查提到的文件夹:
~ $ ll /private/etc/emond.d/rules/
total 0
drwxr-xr-x 3 root wheel 102 Aug 30 04:55 .
drwxr-xr-x 4 root wheel 136 Aug 30 04:55 ..
-rw-r--r-- 1 root wheel 822 Aug 30 04:55 SampleRules.plist
我已将其与不会频繁退出的 OSX 安装进行了比较,看来这样做很好。
这可能是什么问题?
答案1
卸载 Server.app 后,我看到了同样的行为。我相信我已经通过执行以下操作修复了此问题:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.emond.plist
# remove the Server.app paths from the additionalRulesPaths array
sudo vi /etc/emond.d/emond.plist
sudo rm /var/db/emondClients/com.apple.server
sudo launchctl load /System/Library/LaunchDaemons/com.apple.emond.plist
答案2
打开 /private/etc/emond.d/rules/Sample.plist
改变
<key>name</key>
<string>sample rule</string>
<key>enabled</key>
<false/>
到
<key>name</key>
<string>sample rule</string>
<key>enabled</key>
<true/>
示例规则仅记录事件监控守护进程的启动时间,但给它一些任务去做就会停止守护进程的不断重启。