Command reference
ed menu-bar-stats stats
Takes one sample of this Mac and prints it, or keeps sampling with --follow.
It is the default subcommand, so ed menu-bar-stats on its own runs it.
ed menu-bar-stats stats [--json] [--follow] [--interval <seconds>] [--processes <n>]Options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--json |
flag | off | Emit JSON on stdout instead of the human lines. Long form only, there is no -j. |
--follow, -f |
flag | off | Keep sampling until interrupted. Also switches --json from one pretty document to one compact document per line. |
--interval |
seconds, greater than 0 | 2 |
Seconds between samples when following. Ignored without --follow, and clamped up to a floor of 0.5. |
--processes |
integer, 0 or more | 0 |
Include this many top processes by CPU in each sample. |
--help, -h |
flag | off | Print the help for this command on stdout and exit 0. |
Without --follow the command prints one sample and exits. The first line is a
header carrying the host name, the OS string and the core count; the second is
the sample itself:
$ ed menu-bar-stats statsStudio MacBook Pro macOS Version 26.5.2 (Build 25F84) 14 corescpu 53.3% mem 73% of 25.8 GB load 16.54 19.29 17.56 net down 36.6 KB/s up 9.1 KB/s--processes n appends a table of the top n processes by CPU under the
sample, the same rows the app's Processes tab shows for this Mac:
$ ed menu-bar-stats stats --processes 5Studio MacBook Pro macOS Version 26.5.2 (Build 25F84) 14 corescpu 45.3% mem 72% of 25.8 GB load 16.54 19.29 17.56 net down 26.0 KB/s up 4.9 KB/sPID USER CPU MEM NAME20520 you 195.1 0.0 turbo405 _windowserver 32.3 0.3 WindowServer36852 you 21.6 1.7 Browser Helper (Renderer)25053 you 20.8 2.0 2.1.22654438 you 19.6 7.7 com.apple.Virtualization.VirtualMachineWith --follow the header prints once and each later sample adds one line. The
process table, if you asked for one, is reprinted under every sample rather than
once:
$ ed menu-bar-stats stats --follow --interval 0.5Studio MacBook Pro macOS Version 26.5.2 (Build 25F84) 14 corescpu 61.5% mem 74% of 25.8 GB load 17.81 19.27 17.67 net down 39.2 KB/s up 85.0 KB/scpu 60.9% mem 74% of 25.8 GB load 17.81 19.27 17.67 net down 43.8 KB/s up 24.8 KB/scpu 65.0% mem 74% of 25.8 GB load 17.81 19.27 17.67 net down 49.4 KB/s up 20.9 KB/s--json shape
One object with a host half that never changes and a sample half that does.
This is a real document, trimmed to one process, one network interface and
three of the fourteen corePercent entries:
{ "host": { "arch": "arm64", "cores": 14, "cpuModel": "Apple M4 Pro", "host": "Studio MacBook Pro", "kernel": "25.5.0", "memTotalKB": 25165824, "os": "macOS Version 26.5.2 (Build 25F84)", "osID": "macos", "virtual": false }, "sample": { "at": "2026-08-08T16:37:59Z", "cpu": { "corePercent": [ 46.42857142857143, 39.285714285714285, 29.09090909090909 ], "stealPercent": 0, "totalPercent": 52.78934221482098 }, "disk": { "devices": [], "readBps": 0, "writeBps": 0 }, "intervalSeconds": 0.5604119300842285, "load": [ 15.4755859375, 18.97265625, 17.46337890625 ], "memory": { "availableKB": 6707072, "buffCacheKB": 5027472, "swapTotalKB": 5242880, "swapUsedKB": 3656192, "totalKB": 25165824, "usedKB": 18458752, "usedPercent": 73.34849039713541 }, "network": { "interfaces": [ { "name": "en0", "rxBps": 58471.274862180486, "txBps": 436707.33412691054, "virtual": false } ], "rxBps": 58471.274862180486, "txBps": 436707.33412691054 }, "processes": [ { "command": "/opt/homebrew/bin/turbo", "cpuPercent": 196.5, "memPercent": 0, "name": "turbo", "pid": 20520, "rssKB": 7312, "user": "you" } ], "tasks": { "runnable": 0, "total": 566 }, "uptimeSeconds": 97895.422400625 }}What the fields mean:
host.osis built as the wordmacOSfollowed by the version string macOS itself reports, which is why it readsmacOS Version 26.5.2 (Build 25F84).host.osIDis alwaysmacoshere, andhost.virtualis alwaysfalse.host.hostis the computer's Sharing name, falling back tokern.hostname.host.kerneliskern.osrelease,host.archishw.machine, andhost.cpuModelismachdep.cpu.brand_string.sample.atis the sample time as2026-08-08T16:37:59Z, andsample.intervalSecondsis how long the window behind this sample actually was, which is close to but not exactly--interval.cpu.totalPercentis 0 to 100 across the whole machine, andcpu.corePercenthas one entry per logical core in core order.- Every
*KBnumber is kilobytes and every*Bpsnumber is bytes per second.memory.usedPercentisusedKBovertotalKB. loadis the one, five and fifteen minute load averages, in that order.processesis present even when it is empty, so the key never disappears between runs.
Examples
ed menu-bar-stats statsed menu-bar-stats stats --jsoned menu-bar-stats stats --processes 10ed menu-bar-stats stats --follow --interval 5 --json | jq -c '{at: .sample.at, cpu: .sample.cpu.totalPercent}'Behaviour notes
Nothing is mutated and nothing is written: the command samples and prints. The Edith app does not have to be running, and no macOS permission is involved, so this never exits 4.
The first sample costs about half a second. ed takes a throwaway sample,
sleeps 500 ms, then takes the one it prints, because CPU and network figures are
deltas between two readings and the first reading has nothing to compare
against. That is also why intervalSeconds on the first line of a --follow
run reads around 0.56 rather than your --interval.
--interval is validated as greater than zero and finite, so --interval 0,
a negative value and --interval nan all exit 2 before any sampling happens.
--processes is validated as zero or more and exits 2 when negative, though
you have to write --processes=-1 to get there: --processes -1 is read as a
missing value by the parser and exits 2 for that reason instead.
$ ed menu-bar-stats stats --interval 0error: --interval must be greater than zero$ ed menu-bar-stats stats --processes=-1error: --processes cannot be negativehint: pass 0 or moreInterrupting a --follow run with Ctrl-C is the normal way to stop it. There is
no sample count option and no timeout.
Where to go next
ed menu-bar-stats, the rest of this group- All
edcommands