Concepts and measurements
What ProcessGuard measures, how it judges it, and what a number does and does not mean.
Severity
Severity answers "does this process need a look?". Each process gets a level per resource, each against its own warning and critical threshold, smoothed over about a minute:
| Resource | Unit | Warning | Critical |
|---|---|---|---|
| CPU | % of one core | 80% | 200% |
| Memory | physical footprint | 2 GiB | min(8 GiB, 20% of RAM) |
| Disk | bytes/s | 20 MiB/s | 100 MiB/s |
| Network | bytes/s | 10 MiB/s | 50 MiB/s |
| Energy | W | 2 W | 8 W |
| Idle wake-ups | per second | 1000 | 5000 |
The worst resource sets the process level (Normal, Warning or Critical) and is named as the dominant resource. The process table sorts by worst severity first, then by impact score.
A busy machine does not turn every row red
When more than 8 processes cross a warning threshold, that threshold rises by ×1.25 per tick, never past critical, and falls back once fewer than 4 processes are near it. Critical never rises. GetStatus reports the current factors, and the app shows a note while they are raised.
Impact score
The impact score (0 to 100) is a separate ranking of how much of the Mac a process uses. It sorts processes; it does not judge them.
| Component | Weight |
|---|---|
| CPU | 40% |
| I/O | 20% |
| Energy | 15% |
| Memory | 10% |
| GPU | 10% |
| Network | 5% |
Each component is measured against the whole machine. A score is an estimate, not a measured energy value, and a high score explains nothing by itself.
Process classes
Each process gets a class: Foreground, Visible, Background, System or Developer. Energy by Class in History and Usage sums power per class.
Process identity
A name is not an identity: two node servers are two things, and the node that runs now is not the one that exited an hour ago. A PID is not an identity either, because macOS reuses PIDs.
ProcessGuard identifies one run of one program with three values:
| Value | Meaning |
|---|---|
pid | The process ID. |
start_time | Mach absolute time since boot when the process started. It separates a reused PID. It is not a wall-clock time and not a ps start date: compare it, never display it. |
| boot session | kern.bootsessionuuid. It separates boots, because start_time restarts at every boot. |
Wherever you give a PID with a start time, ProcessGuard checks it: a PID that now belongs to another run is refused (-32005, CLI exit 3), never answered with the other process's data. Where a name matches several running processes, it asks you to choose (-32004, CLI exit 2) and lists the candidates.
Sampling cadence
| Activity | Interval |
|---|---|
| Process, battery and system-state sample | 5 s |
| Network connection scan | 10 s, while a client is subscribed |
| Write of the accumulated interval to SQLite | 30 s |
| Downsampling into 5-minute buckets, and the per-host traffic write | 5 min |
| Retention cleanup and incremental vacuum | 1 h |
| Menu bar values (in the app) | 2 s |
The daemon also exits by itself when its executable is replaced on disk (checked every 300 s), and launchd starts the new binary.
Counters and gauges
Every counter in a sample is what happened during the interval, not a running total: CPU time, disk bytes, instructions, cycles, energy, wake-ups, page-ins, context switches and more. A first sighting reports zero for all of them, so nothing is charged for what a process did before the daemon saw it.
Gauges describe the process at the instant it was read and are never summed: resident memory, virtual memory, footprint, peak footprint, thread count, running threads, open file descriptors and priority.
All _ns fields are true nanoseconds. The kernel reports CPU time in mach ticks (on Apple silicon a tick is 125/3 ns); the daemon converts at the source.
Measurement status
A zero is a measurement only when its status says so. Each group of values carries one of these:
| Status | Meaning |
|---|---|
measured | Read from the OS and differenced against a successful earlier reading. |
baseline | First successful reading after the process appeared or after a failed read. The deltas are 0 by construction. |
unavailable | The read failed. The zeros are placeholders and the interval is a gap, not idle time. |
unsupported | Not collected for this process or on this machine. |
estimated | Derived from other measurements by a documented rule, not read from hardware. |
Gap rule: a delta is computed only between two successful readings of the same group. Work done during a gap is not recovered, so one failed read never shows a lifetime counter as one interval's work.
What each measurement tells you
| Measurement | Read it as |
|---|---|
| CPU by QoS class | CPU time split by macOS quality of service. Background and maintenance work is throttled and runs on efficiency cores; user-interactive work competes with the UI. A second at utility costs far less than a second at user interactive. |
| Performance vs efficiency cores | An approximation from QoS (no public per-cluster API exists): "how much of this process wanted a fast core". Not available on Macs with one kind of core. |
| Idle wake-ups | Interrupt and package-idle wake-ups. Waking the CPU often to do nothing drains the battery more than a short burst of work. |
| Reaped children | Resource use of children the process has waited for. This is what makes cargo, clang and node legible. Do not sum it over a tree: the cost of a subtree is the root's children counters plus the own counters of the descendants still alive. |
| GPU time | From the IO registry, per Metal or OpenGL client. 1.0 of the GPU component means the GPU was busy for the whole interval. |
| Context switches | High at low CPU: the process is waiting, not working (lock contention, thread ping-pong). |
| Page faults, page-ins | Climbing while CPU stays flat is memory pressure. |
| Unix system calls | Millions per second is a busy-poll loop. |
| Mach messages | XPC chatter: one message per call. |
| Logical vs physical writes | Logical writes far above disk writes: a process that rewrites a file that never reaches the disk. |
| Interval max footprint | The highest footprint in the kernel's accounting interval: catches an allocation spike the current footprint already missed. |
| Priority | Mach base priority, higher is more urgent: 47 user-interactive, 37 user-initiated, 31 default, 20 utility, 4 background. |
System readings
| Reading | Notes |
|---|---|
| Memory pressure level | Read live from kern.memorystatus_vm_pressure_level. |
| Pressure % | (active + wired + compressed) / total × 100. |
| Thermal state | Nominal, Fair, Serious, Critical or Unknown. Unknown means the kernel did not answer; it is not "cool". |
| CPU temperature, GPU utilization | Shown in the History header and the menu bar. |
| Battery | Charge, charging state, cycle count, amperage. |
Evidence and its limits
- A cause (
diagnose) is a reading past its threshold, or a growth that coincides with swap growth: evidence, not proof. - A correlation (
why, the scanner card) is a co-occurrence in the same bucket, labelledcausal: false. - An empty history is reported as empty with its likely reasons, never as "nothing happened". A quiet process leaves no rows unless a watch covers it.
- Limited mode cannot see system processes; every answer says so.