问题:总觉得mac发热厉害,应该是跟cpu的使用有关,在Activity Monitor中看了一下,发现ReportCrash循环往复的出现,直接kill还会再出来,占用的cpu还比较高。我的系统是macos 10.13.1
查了一下,当有进程crash的时候,ReportCrash就会出现,由于进程处于这样一个循环:运行、崩溃、再运行,ReportCrash就会一致出现。
要怎么定位是哪个进程crash了呢?
办法是查看system.log,它的位置:/var/log/system.log
,我看了一下我的(可以用console这个应用打开):
May 27 17:08:24 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:08:24 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:08:34 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:08:34 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:08:44 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:08:44 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:08:54 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:08:54 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:09:04 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:09:04 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:09:14 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:09:14 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:09:25 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:09:25 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:09:35 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:09:35 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
May 27 17:09:45 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 27 17:09:45 itscs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.dt.XCSBuilderService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
看样子有两个进程在不停的循环启动,IMRemoteURLConnectionAgent和XCSBuilderService,后面一个看起来像xcode的,在Activity Monitor中强制退出后,就没有reportcrash了。
参考:
ReportCrash High CPU & How to Disable reportcrash in Mac OSX