Cpuz macos12/18/2023 # Pass -kill as argument to kill all running cputhrottlesĮcho "Looking for running cputhrottles."Įcho "Run this script passing '-kill' as argument to remove all cputhrottles."Īlthough not a direct answer to the OP's question, if you're having an issue with a particular process taking up too much of your CPU time, and making your computer unusable, and you don't mind how long that process takes to finish the task it's working on, you can use the renice to alter the priority of that process, making it behave nicely (hence the name).įirst, you need to find the PID of the process that's using up the CPU resources. #!/bin/bashĮcho "Please run this script as root/sudo" The script assumes that both cputhrottle and pidof are installed before running it. I've also added the option for killing all cputhrottle processes. The main difference is that you can add cpu limit per application, and it will run only once per application. This new script also allows you to specify a list containing the application name and the CPU limit for it. I've added a different version for this script (a bash script), which might be useful for people looking for limiting the CPU for multiple applications. Run it as a script, in an Automator workflow, whatever: # Get the Process/App names from Activity Monitor and put them here I'm not quite sure how to turn this into a login item since cputhrottle requires superuser permissions. You can monitor a series of processes by name by running the Bash script below.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |