Archive for April, 2021

App Tamer 2.6.2: Quick UI Fixes and an Experimental Assassin for Runaway Processes

Tuesday, April 6th, 2021

Version 2.6.2 of App Tamer is available, fixing a couple of user interface bugs that could trip up new users. When newly installed, the size of App Tamer’s window was much smaller than it was supposed to be, making it hard to see the list of tamed processes. Compounding this was a change in version 2.6.1 that resulted in the mouse cursor not turning into a little arrow when you hovered over the edges of the window, so you couldn’t tell it’s resizable.

Another glitch, a result of changes that Apple made in Big Sur, could result in the names of processes being truncated in the process list. That’s been fixed as well.

You can find the full release notes and download links to App Tamer 2.6.2 on the App Tamer Release Page.

An experimental feature for a very specific system problem:

And now for the geeky, experimental feature: It’s come to my attention that some people are living with bugs in macOS that can result in essential background processes (like lsd and pkd) suddenly consuming tons of CPU time and bringing their Mac to a standstill. Despite chasing around to try and find the culprit, they often can’t resolve the problem without completely reinstalling the system. And apparently, App Tamer’s process throttling can’t limit the CPU usage without effectively disabling whatever function those processes are supposed to be performing.

So I’ve added a “runaway process assassin” to App Tamer. You specify which processes to watch, and if the CPU usage of any of them stays above a specified limit for a certain amount of time, App Tamer just kills the process. This certainly isn’t ideal, but works fine for system daemons that macOS will automatically relaunch whenever they’re needed. This feature is probably only useful to a few people, but because it isn’t something that’s easy to code up with an AppleScript or shell script, I figured I’d just add it. App Tamer is already collecting the CPU statistics anyway.

To configure this, you have to use Terminal. Paste in these commands, hitting the Return key after each one:

defaults write com.stclairsoft.AppTamer killRunawayProcesses 1
defaults write com.stclairsoft.AppTamer runawayProcessCPULimit 50
defaults write com.stclairsoft.AppTamer runawayProcessTimeLimit 20
defaults write com.stclairsoft.AppTamer runawayProcessList "lsd pkd"

Here’s what’s going on with the commands:

  • The first command turns on the killRunawayProcesses feature. 
  • The second sets runawayProcessCPULimit to 50. You can set that to whatever CPU percentage you want.
  • The third sets runawayProcessTimeLimit to 20. This is how long (in seconds) the process has to be above its limit before App Tamer kills it.
  • The fourth sets runawayProcessList to watch lsd and pkd. You can add as many processes as you want here, separated by spaces. For full-fledged applications, use the app’s bundle identifier.

When App Tamer kills a process, it will put up a notification to let you know. You’ll probably want to make sure you’ve allowed App Tamer to display notifications in System Preferences > Notifications.

To turn the whole thing back off, just use:

defaults write com.stclairsoft.AppTamer killRunawayProcesses 0

WARNING: Don’t turn this on unless you have a real need for it! You could potentially kill a service that’s necessary for your Mac to operate correctly. However, if you do need and make use of this feature, I’d appreciate hearing from you in the comments or at support@stclairsoft.com.