Docs / Reference

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:

ResourceUnitWarningCritical
CPU% of one core80%200%
Memoryphysical footprint2 GiBmin(8 GiB, 20% of RAM)
Diskbytes/s20 MiB/s100 MiB/s
Networkbytes/s10 MiB/s50 MiB/s
EnergyW2 W8 W
Idle wake-upsper second10005000

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.

ComponentWeight
CPU40%
I/O20%
Energy15%
Memory10%
GPU10%
Network5%

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:

ValueMeaning
pidThe process ID.
start_timeMach 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 sessionkern.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

ActivityInterval
Process, battery and system-state sample5 s
Network connection scan10 s, while a client is subscribed
Write of the accumulated interval to SQLite30 s
Downsampling into 5-minute buckets, and the per-host traffic write5 min
Retention cleanup and incremental vacuum1 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:

StatusMeaning
measuredRead from the OS and differenced against a successful earlier reading.
baselineFirst successful reading after the process appeared or after a failed read. The deltas are 0 by construction.
unavailableThe read failed. The zeros are placeholders and the interval is a gap, not idle time.
unsupportedNot collected for this process or on this machine.
estimatedDerived 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

MeasurementRead it as
CPU by QoS classCPU 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 coresAn 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-upsInterrupt and package-idle wake-ups. Waking the CPU often to do nothing drains the battery more than a short burst of work.
Reaped childrenResource 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 timeFrom the IO registry, per Metal or OpenGL client. 1.0 of the GPU component means the GPU was busy for the whole interval.
Context switchesHigh at low CPU: the process is waiting, not working (lock contention, thread ping-pong).
Page faults, page-insClimbing while CPU stays flat is memory pressure.
Unix system callsMillions per second is a busy-poll loop.
Mach messagesXPC chatter: one message per call.
Logical vs physical writesLogical writes far above disk writes: a process that rewrites a file that never reaches the disk.
Interval max footprintThe highest footprint in the kernel's accounting interval: catches an allocation spike the current footprint already missed.
PriorityMach base priority, higher is more urgent: 47 user-interactive, 37 user-initiated, 31 default, 20 utility, 4 background.

System readings

ReadingNotes
Memory pressure levelRead live from kern.memorystatus_vm_pressure_level.
Pressure %(active + wired + compressed) / total × 100.
Thermal stateNominal, Fair, Serious, Critical or Unknown. Unknown means the kernel did not answer; it is not "cool".
CPU temperature, GPU utilizationShown in the History header and the menu bar.
BatteryCharge, charging state, cycle count, amperage.

Evidence and its limits