Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
When "com.apple.IconServicesAgent" exhausts CPU resources on Mac OSX mavericks (10.9), you can try following workaround.
#!/bin/sh
mkdir ${TMPDIR}/com.apple.IconServices
@henrik242

This comment has been minimized.

Copy link

commented Jan 8, 2014

This was it! When I arrived at work today IconServicesAgent was consuming 226% CPU. After creating that folder, it dropped to 0.2% after a couple of seconds. Thank you!

@jinuem

This comment has been minimized.

Copy link

commented Jan 15, 2014

Is this a permanent solution or temporary fix?

@sgr

This comment has been minimized.

Copy link
Owner Author

commented Feb 16, 2014

This is just a workaround :-(

@devlaam

This comment has been minimized.

Copy link

commented Feb 23, 2014

After several weeks of testing i found that sometimes this produces an incorrect path and does not kill the iconizer effectively. It is not clear to me why this is, but i advise to add the -p option here which solves these rare cases and does not harm otherwise, thus:
mkdir -p ${TMPDIR}/com.apple.IconServices

@sgr

This comment has been minimized.

Copy link
Owner Author

commented Feb 28, 2014

Maybe $TMPDIR was overwritten in your environment. If $TMPDIR indicates an wrong path, it should not be created.

@devlaam

This comment has been minimized.

Copy link

commented Mar 4, 2014

What should happen and what really happens are two different things. I noticed three (and verified two) occasions where the last dir of the TMPDIR path contains an incorrect name (some capital letter). After manually creating that last directory and applying your fix, the problem was solved. So i figured that there may be others that are in the same situation but do not detect why your workaround does not work for them. Hence my tip. Thank you btw for this "solution".

@voronianski

This comment has been minimized.

Copy link

commented Jul 16, 2014

it throws me

MacBook-Pro-Dmitri:~ dmitri$ mkdir ${TMPDIR}/com.apple.IconServices
mkdir: /var/folders/5z/pgm_8b253pq6nf3rg2kjlfxw0000gn/T//com.apple.IconServices: File exists
@wolframteetz

This comment has been minimized.

Copy link

commented Aug 18, 2014

I found a fix that seems to work, see http://blog.hsoi.com/2014/02/25/my-slow-mac-mavericks-coreservicesd-iconservices agent-and-how-fs_usage-saved-me/comment-page-1/

If you have the same problem and the solutions given in this thread don't work, please run sudo fs_usage -f pathname -w com.apple.IconServicesAgent | grep open in the Terminal and post your output here.

For me, XCode seemed to be the problem.

Uninstalled XCode by sudo -r /Applications/XCode.app. Cleared all caches by sudo rm -r /Library/Caches and ~/Library/Caches, then mkdir of the same (don’t know and think that this step is necessary). Reinstalled XCode.

Problem gone.

@torgeir

This comment has been minimized.

Copy link

commented Sep 23, 2014

mkdir ${TMPDIR}/com.apple.IconServices worked for me. Dunno if it's just temporary, though

@smugsnug

This comment has been minimized.

Copy link

commented Nov 27, 2014

this what i got - after 12 hours of

sudo fs_usage -f pathname -w com.apple.IconServicesAgent | grep open

[0x211] flags: 0x8 binding: FileInfoBinding [0x647] - extension: jpg, UTI: public.jpeg, fileType: ????.

@kopurando

This comment has been minimized.

Copy link

commented Dec 17, 2014

In my particular case, following did NOT help:

killall -KILL com.apple.IconServicesAgent

mkdir -p ${TMPDIR}/com.apple.IconServices

However, I was watching its behaviour via

sudo fs_usage -f pathname -w com.apple.IconServicesAgent | grep open

and saw extensive activity in various dirs (including VLC dir, and inside some system services dirs, like /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources). I could reinstall VLC, but IOStorageFamily is sort of built in...

Anyway, after a bit deeper research, the culprit turned out to be XtraFinder! I restarted and updated XtraFinder, and so far IconServicesAgent has been quiet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.