Creates a notification if load (CPU usage) is above a maximum (for Mac OS X)
My computer was churning and used up my battery, so I wanted a notification if 5-min load is above a threshold. If so, I can check activity monitor and see what's eating my battery.
In the future, I may make it battery-only (no notification if running on AC).
- Put the two files somewhere permanent.
- Change the
max_loadvalue incpu_alert.rbto your desired level. My normal load is around 1.2 so I used 3. - Update the location of the script in the plist file.
- Copy the plist to ~/Library/LaunchAgents