Busy Processes
The eight busiest processes on this Mac by CPU, with memory, updated every 10 seconds while the card is open. Quit one of yours in a click. Mac only.
by TailApps · Version 1 · Updated 20 hours ago
- Price
- Free
- Works on
- Mac
- Permissions
- 2
What it does
-
Lives where you glance
Menu bar, TailApps Dock, Dashboard and a floating window on your Mac.
-
Stays up to date
Runs its script procs.sh on your Mac every 10 seconds
What it may do
TailApps shows this list before installing and asks you once. The card can do nothing else.
-
Run its script procs.sh
script:procs.sh
-
Run its script quit.sh
script:quit.sh
Scripts
Everything it runs is here to read before you install.
procs.sh
#!/bin/sh
# The busiest processes on this Mac by CPU, as JSON: [{ "pid", "name", "cpu" (1 = one core), "memory" (bytes), "mine" }].
# TailApps' own process ($TAILAPPS_PID) is left out: apps can't stop TailApps.
me=$(/usr/bin/id -u)
/bin/ps -Aco pid=,uid=,pcpu=,rss=,comm= -r | awk -v self="$TAILAPPS_PID" -v me="$me" '
$1 != self && n < 8 {
pid = $1; uid = $2; cpu = $3; rss = $4
$1 = ""; $2 = ""; $3 = ""; $4 = ""
name = $0; sub(/^ +/, "", name); gsub(/["\\]/, "", name)
printf "%s{\"pid\":%s,\"name\":\"%s\",\"cpu\":%s,\"memory\":%d,\"mine\":%s}", (n++ ? "," : "["), pid, name, cpu / 100, rss * 1024, (uid == me ? "true" : "false")
}
END { print (n ? "]" : "[]") }'
quit.sh
#!/bin/sh
# Ask process $1 to quit (SIGTERM). Only your own processes; never TailApps itself.
case "$1" in ''|*[!0-9]*) echo "Not a process id: $1" >&2; exit 1 ;; esac
[ "$1" = "$TAILAPPS_PID" ] && { echo "TailApps can't be stopped from a card" >&2; exit 1; }
kill -TERM "$1"
More in System
See all →Battery
Your battery in the menu bar with its health, cycles and temperature, your AirPods, mouse and keyboard, and alerts when it's low, charged enough or the charger goes in or out.
Device Status
This device's battery, connection and basics at a glance, on the Mac and iPhone alike, with no script.
Keep Awake
Keep this Mac (or the iPhone's screen) awake for a while or until you stop, with no script. The Mac lets go by itself when the time is up, and picks it up again if TailApps restarts.