Cpu Usage Mac App

/ Comments off

Question: Q: high cpu usage even without apps running Dear Guys and Gals, I am experiencing a strange problem, my computer was incredibly slow in the last days, after a little troubleshooting, I decided to simply format everything and proceed with a new, clean system. How to view CPU usage on Mac To check CPU usage on Mac, use the default Apple utility Activity Monitor. Activity Monitor is a Mac performance monitor that shows what programs are running and how many resources they are using. Run Activity Monitor from the launchpad or from the Applications folder.

Following the release of macOS Catalina version 10.15.7, an increasing number of users have experienced an issue with a system process named 'accountsd' showing very high CPU usage in Activity. The app works efficiently in offering a quick way to check out the key performance data of Mac. For instance, you can use this app to check out several important performance defining things like CPU, network, disk, memory, and even battery. Though this notification center widget comes at $2.99, it’s worth the price considering the notable. In other words, if you encounter high CPU usage on your Mac, the first thing on your to-do list is to look for the “culprit” app or apps. Start your research by opening the Activity Monitor from the Utilities folder. Click on the header of the CPU column to sort the processes so that the most resource-heavy ones are at the top of the list.

This problem occurred to me when I was contributing with [email protected] project of Stanford University. Their application (also known as fahclient) was using all my computers CPU and the temperature of my Mac’s graphic card was around 89 degrees centigrade. So I tried to limit the CPU usage of this application within it’s preferences menu, but it was not working at all, so I searched Internet and I found that this is a common problem an the solution was not that well-known ! So in this post I’m going to describe how to limit application CPU usage in Mac OSx. In this tutorial I’m going to use cputhrottle which is a small OS X command-line utility designed to limit the CPU usage of a process to which it attaches.

First of all I should say that I used this solution for OSX 10.8.3 and it is working perfectly.
These are the steps you should go through to get this done:

  1. Download cputhrottle application
  2. Almost setup the cputhrottle application
  3. Limit the process using cputhrottle

1. Download cputhrottle application

In this step you should download the cputhrottle from it’s website:

You have two option to download, but I prefer the binary version (cputhrottle.gz), and I’m describing the binary version in this tutorial.

>>> Update: the willnolan website is down at the moment, <<<<
>>> so you can download the application from the link below <<<<

2. Almost setup the cputhrottle application

First open the terminal and navigate to your download folder, in my case:

Cpu usage mac app store

You can follow the instructions from it’s website and I’m just copying those instruction here:

You must run “chmod +x cputhrottle” after running “gunzip cputhrottle.gz”, in order to make the program executable. Otherwise, it will not start correctly. Some folks have noted that gunzip says that the file is not in gzip format. In that case, try renaming the file to “cputhrottle” and running as-is.

In my experience, I got the gzip error:

gzip: cputhrottle.gz: not in gzip format

so I just renamed the file by the following command:

Then it is time to set the execution permission for this file:

3. Limit the process using cputhrottle

This step is the only step you should do whenever you want to limit some process CPU usage. first use the following command to get the PID of your desired process:

which will result this:

13004 top 5.4 00:01.80 1/1 0 24 31
13000 mdworker 0.0 00:00.05 3 1 55 66
12983 LKDCHelper 0.0 00:00.00 3 1 34 45
12981 com.apple.iC 0.0 00:00.08 4 2 55 67
12980 taskgated 0.0 00:00.03 3 1 31 60
12897 ocspd 0.0 00:00.11 1 0 25 45
12870 mdworker 0.0 00:03.48 4 1 57 95
12842 bash 0.0 00:00.01 1 0 21 26
12841 login 0.0 00:00.02 2 1 33 67
12837 cputhrottle 0.1 00:02.80 1 0 17 22
12789 FahCore_a4 200.3 15:15.36 5 0 26 205
12786 FAHCoreWrapp 0.0 00:01.29 2 0 23 74
12782 FAHControl 0.5 00:23.38 6 3 104 354

You can also use the following command to see the most demanding running processes in your computer:

so now finding the PID is not hard due to the massive amount of CPU usage. In this case the file named FahCore_a4 is using 200.3% of my CPU and the PID of it is 12789. So I use the following command to limit it’s CPU usage to only 25%:

So in the command above, the first number is the PID of your desired process and the second number is the percentage you want this process to use.
The only step left is typing your administrative password because you used sudo command.

4. Optional step – Keep the software running

As you can see in the comments, some users face this problem that the cputhrottle terminated out of sudden after few hours of running and their cpu usage were uncontrolled after that, so one of the folks was kind enough to write a shell script to check the status of this software and run it again if it was terminated.
The shell script can be accessed from Maui’s githup: Moore sequence detector 1101 instructions.

Just get the code and put it in the same directory as cputhrottle, then open it in you favorite text editor (I personally use nano)

Now you can configure the settings you like, then you should set the permission so that the code can get executed:

Mac Os Cpu Monitor

and now everything is good to go and you should run the shell code so it do it’s job: