I thought my Mac was getting old since the fan was creating a really loud noise, you could start hearing the fan since about five minutes after turning on my computer. So I did a little bit of digging and found the reason.

First of all, In order to identify the process that is eating all of your CPU usage, to do this, we will use Activity Monitor, which comes installed in all Mac OSX. To open the program, go to your Applications folder -> Utilities folder, and it should be at the top, or do a simple Spotlight search (Command + space bar) and search for "Activity Monitor"
Opening Activity Monitor, we should get a window like the one below, from here we can easily identify which is the process that is consuming the most of our resources and we can see if there is something we can do or not.
In this example, we can see that the processes that are consuming the most CPU power are "fseventsd" and "launchhd" doing some quick internet research, I found the following about launchd:
DESCRIPTIONlaunchd manages processes, both for the system as a whole and for individual users. The primary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to load and unload jobs.source
This means that there is a process that is trying to do some job, and researching for "fseventsd" gave us the following info:
The FSEvents API in Mac OS X allows applications to register for notifications of changes to a given directory tree.[1] Whenever the filesystem is changed, the kernel passes notifications via the special device filesource/dev/fsevents
to a userspace process calledfseventsd
.

Now that we have that knowledge, we can take a look into the Console, which is also a program loaded in all Mac OSX, and the path is the same as the one to access Activity Monitor (incase you forgot: Applications -> Utilities).
Once we open our Console, we can see all the log messages the system is receiving, they are used for debugging and to alert when certain types of messages are logged. In the image below, we can see that the problem is being originated by "com.apple.xpc.launchd", aha! launchd, but Citrix, hmm im not using Citrix right now, why is it trying to open those packages? Well since we dont need those packages right now, we might as well stop that.

After identifying the error messages from launchd, we can go ahead and open "Terminal", another program preloaded in Mac OSX, here we will write commands in order to stop those processes. (If you work with any terminal replacement like iTerm, you can do this step there too).
Now simply copy the code below and paste it into terminal replacing the parts in red.
sudo launchctl remove com.annoying.Service
Terminal will prompt you fro your password, note that it wont echo your input and you will always se only one black dot.
And just to be sure, you can type the following code which does not have sudo permissions but it might work:
launchctl remove com.annoying.Service
In mi case, one of the inputs should look like the following:
sudo launchtl remove com.citrix.ServiceRecords
Finally, we can return to the Activity Monitor and, look what happened! Our CPU use has lowered by % 70.42 and it will continue decreasing! And thats not all, the usage from fseventsd disappeared too.
Note that there are some very heavy programs and processes, for example some video editing programs and games (even Minecraft) take a lot of CPU usage and is totally normal for your computer to start making noises and following the above process might cause some of your applications to crash and you most likely loose all your work or progress.
If you want me to do tutorials on anything else just leave your question in the comments!
Comments
Post a Comment