![]() Note that this takes at least 2 seconds to run, because 2 samples (1 second apart) must be collected to calculate CPU-usage percentages, so consider that when determining how frequently to invoke the command. Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier \ Here's a simple bash script that roughly does what you want: #!/usr/bin/env bash scheduling that script as a launchd task for periodic invocation.Īutomator and AppleScript are probably too heavy for such - presumably frequent - background activity.Įven running top itself uses quite a bit of CPU.writing a bash script that uses top to find the highest-CPU-percentage task and invokes terminal-notifier, if above the threshold.If you do need an automated solution, I suggest: You'll get a per-core display of current CPU usage - clicking on it will show the full Activity Monitor window, where you can sort by CPU usage. Select Dock Icon > Show CPU Usage - or, for a floating window, Monitors > Show CPU Usage.If this is for interactive use, let me suggest a pragmatic alternative: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |