Skip to content
Edith

Docs

Command reference

ed health

ed health reads System Health, the local monitor for this Mac. It shows CPU per core, GPU load, memory pressure and swap, temperatures and fan speeds, power draw, battery health, the apps using the most energy, the battery levels of connected Bluetooth devices, the USB devices that are plugged in, and the state of each alert. It only reads: nothing here changes a system setting, and fan speeds are never written.

System Health has to be enabled. It samples every two seconds while its page is open, every five seconds while its menu bar readout is on, every fifteen seconds when only alerts are on, and not at all otherwise. Sampling stops while the Mac sleeps or the screen is locked. A command that needs a reading takes one on demand when the last one is more than a few seconds old.

At a glance

Command What it does
ed health status Prints the current readings. Runs when you type ed health on its own.
ed health battery Battery charge, maximum capacity against design capacity, cycle count, condition, temperature, power draw and time remaining.
ed health apps The processes with the highest energy impact, sampled for about a second. --limit takes 1 to 50, default 10.
ed health devices Connected Bluetooth devices with their battery levels, and USB devices. Reused for 30 seconds unless you pass --refresh.
ed health history <metric> Values kept since System Health started, oldest first. --limit takes 1 to 900, default 60.
ed health alerts Each alert with its limit, minimum duration, current value, whether it is over the limit or cooling down, and the alerts sent recently.

Every command accepts --json for stable JSON on stdout. History metrics are cpu, gpu, memory, pressure, swap, cpuTemperature, gpuTemperature, power, battery and cores.

Terminal
ed healthed health battery --jsoned health apps --limit 5ed health devices --refreshed health history cpu --limit 30ed health alerts

Battery health

Maximum capacity is the battery's full charge capacity divided by its design capacity, both read from the IORegistry AppleSmartBattery entry. On Apple silicon the full charge capacity is AppleRawMaxCapacity, because MaxCapacity is a percentage there; on Intel Macs MaxCapacity is already in mAh. The condition is "Service recommended" when the battery reports a permanent failure or holds less than 80% of its design capacity, and "Normal" otherwise. Time remaining comes from the battery's own averages; the value 65535 means it is still calculating.

Alerts

Each alert has a threshold and a minimum duration: a notification is sent only once the reading has stayed past the threshold for that long without a break. A reading that recovers, a missing reading, or a gap longer than a few samples (for example sleep) starts the duration again. After an alert is sent, the same alert waits for the cool-down before it can be sent again. Alerts are off until you turn them on in System Health settings; the first one you turn on asks macOS for permission to show notifications.

Alert Fires when Default
CPU load CPU load is at or above the threshold 90% for 5 minutes
Temperature The CPU, GPU or hottest sensor is at or above the threshold 95°C for 2 minutes
Memory pressure Memory pressure is at or above the threshold 80% for 5 minutes
Disk space Free space on the startup disk is at or below the threshold 10 GB for 1 minute
Battery Charge is at or below the threshold while on battery 15% for 1 minute

The cool-down defaults to 60 minutes.

Worker operations

The page uses the same operations, and you can call them directly with ed invoke. Every payload is JSON and every reply is JSON; an invalid payload is rejected with an error on stderr.

Operation Payload Reply
systemHealth.readings {"page": true} keeps the live cadence for a few seconds The reading, the sampling cadence and context, the menu bar text and every alert state
systemHealth.history {"metric": "cpu", "limit": 300}; leave out metric for all metrics by name and cores
systemHealth.battery {} present, battery, power and timeRemaining
systemHealth.apps {"limit": 10} Processes by energy impact
systemHealth.peripherals {"refresh": true} bluetooth and usb devices
systemHealth.alerts {} Cool-down, alert states and recent alerts
systemHealth.alerts.simulate {"kind": "cpu", "threshold": 90, "minutes": 5, "cooldownMinutes": 5, "samples": [{"seconds": 0, "value": 97}]} The seconds at which the alert would fire. Nothing is sent.
systemHealth.readout {} Whether the menu bar readout is on, its style, items, segments and text
Terminal
ed invoke systemHealth systemHealth.battery --json '{}'ed invoke systemHealth systemHealth.history --json '{"metric":"power","limit":30}'ed invoke systemHealth systemHealth.alerts.simulate --json '{"kind":"battery","threshold":15,"minutes":1,"samples":[{"seconds":0,"value":14},{"seconds":60,"value":12}]}'

Exit codes

Code When
0 The readings were printed.
2 --limit was out of range or the metric is unknown.
4 System Health is not running.

Where to go next