-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Metrics
Samples a machine, once or continuously. It is the same collector the app's Machines view drives, fed to the machine on stdin, so nothing is installed there and nothing is left behind.
ed machines metrics <machine> [--json] [--follow] [--interval <seconds>]
[--processes <n>]
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
string, required | none | Machine name, ssh alias, id or unambiguous prefix. |
| Name | Type / values | Default | What it does |
|---|---|---|---|
--json |
flag | off | Emit JSON on stdout instead of the human lines. |
--follow, -f
|
flag | off | Keep streaming until interrupted. Also switches --json from one pretty document to one compact document per line. |
--interval |
integer seconds, greater than 0 | 2 |
Seconds between samples when following. Ignored without --follow. |
--processes |
integer, 0 or more | 0 |
Include this many of the processes each sample carries, out of the thirty at most that the collector sends. |
--help, -h
|
flag | off | Print the help for this command on stdout and exit 0. |
The first line is the collector's greeting, carrying the machine's own host name, its OS string and its core count. Each later line is a sample:
$ ed machines metrics studio
studio-mac macOS 26.6.1 20 cores
cpu 1.0% mem 5% of 67.0 GB load 0.12 0.14 0.30 net down 132 B/s up 1.6 KB/s
Without --follow it prints exactly one sample and exits. With --follow the
greeting prints once and a sample line is added every --interval seconds until
you interrupt it.
One object with a host half that never changes and a sample half that does.
This is a real document with the core list, the device list and the process list
trimmed:
{
"host": {
"arch": "x86_64",
"cores": 20,
"cpuModel": "Apple M4 Pro",
"host": "studio-mac",
"kernel": "7.0.0-28-generic",
"memTotalKB": 65452140,
"os": "macOS 26.6.1",
"osID": "macos",
"virtual": false
},
"sample": {
"at": "2026-08-08T16:48:25Z",
"cpu": {
"corePercent": [0, 0, 1.8, 0, 2.7],
"stealPercent": 0,
"totalPercent": 0.9
},
"disk": {
"devices": [
{
"busyPercent": 0,
"name": "disk3",
"readBps": 0,
"writeBps": 24576
}
],
"readBps": 0,
"writeBps": 24576
},
"intervalSeconds": 1,
"load": [0.12, 0.14, 0.3],
"memory": {
"availableKB": 62045152,
"buffCacheKB": 56620508,
"swapTotalKB": 8388604,
"swapUsedKB": 376,
"totalKB": 65452140,
"usedKB": 3406988,
"usedPercent": 5.205311850766072
},
"network": {
"interfaces": [
{
"name": "wlo1",
"rxBps": 316,
"txBps": 1550,
"virtual": false
},
{
"name": "docker0",
"rxBps": 0,
"txBps": 0,
"virtual": true
}
],
"rxBps": 316,
"txBps": 1550
},
"processes": [
{
"command": "node /opt/unduck/node_modules/.bin/vite preview",
"cpuPercent": 0,
"memPercent": 0.1,
"name": "MainThread",
"pid": 1857,
"rssKB": 91788,
"user": "pulkit"
}
],
"tasks": {
"runnable": 2,
"total": 1117
},
"uptimeSeconds": 33029
}
}What the fields mean:
-
host.osis what the machine calls itself, fromsw_vers, andhost.osIDis its short id such asmacos.host.virtualis the collector's judgement about whether it is a VM. -
sample.atis the sample time, andsample.intervalSecondsis how long the window behind this sample actually was. -
cpu.totalPercentis 0 to 100 across the whole machine,cpu.corePercenthas one entry per logical core in core order, andcpu.stealPercentis time the hypervisor took, which is 0 on bare metal. - 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. -
disk.devicesis per block device with abusyPercent, andnetwork.interfacesis per interface with avirtualflag that labels bridges and container interfaces. The flag is a label only: therxBpsandtxBpstotals add up every interface the machine reports except loopback, virtual ones included. -
processesis present even when it is empty, so the key never disappears between runs. With the default--processes 0it is always[]. The collector sends at most thirty processes, the busiest by CPU plus the largest by memory, in no particular order, so--processestrims that list rather than ranking it.
ed machines metrics studio
ed machines metrics studio --json
ed machines metrics studio --processes 20
ed machines metrics studio --follow --interval 5 --json | jq -c '{cpu: .sample.cpu.totalPercent}'
Nothing is written locally and nothing is installed remotely. ed opens the
shared connection, runs sh -s -- --once or sh -s -- --stream -i <interval>
there, and pipes the collector script into that shell's stdin. The script needs
a POSIX shell and awk and nothing else.
The collector's own stderr is discarded, so a warning on the machine never pollutes the report.
Failures, with their codes:
- an unknown or ambiguous machine name exits 3
- a machine that cannot be reached exits 4
- a machine that connects but never emits a sample exits 4 with
<name> did not report metricsand the hint that the collector needs a POSIX shell and awk -
--interval 0or a negative interval exits 2 with--interval must be greater than zero, and--processes=-1exits 2 with--processes cannot be negative; both are checked before the machine is dialled - a build with the collector script missing exits 1
Write a negative process count as --processes=-1. Spelled --processes -1 the
parser reads it as a missing value and exits 2 for that reason instead.
--json --follow writes one compact document per line, forever, repeating the
whole host object on every line so each line stands alone for jq -c, head
or a pipe. Without --follow you get a single pretty document.
The collector also emits a slower filesystem record. ed machines metrics
decodes and discards it because filesystem data has its own Machines view.
ed system stats is the same report for the Mac you are typing on, in the same
shape, so a script can treat local and remote the same way.
-
ed machines, the rest of this group - All
edcommands
Auto-generated from docs/, edit the docs in the repo, not the wiki.
CLI reference
Companion
- Deploy
- Concepts
- Concepts Memory
- Concepts Ingestion
- Concepts Search
- Concepts Chat
- Concepts Learning
- Concepts Brain
- Concepts Friend
- Hosts
- Stack
- Status
- Doctor
- Search
- Index
- Ingest
- Episodes
- Sync
- Observations
- Reflect
- Beliefs
- Ask
- Extract
- Claims
- Corroborate
- Runs
- Chat
- Conversations
- Forget
- Export
- Import
- Erase
- Wipe
- Episode
- Nightly
- Reason
- Personas
- Council
- Lenses
- Core
- Why
- Hypotheses
- Predictions
- Commitments
- Discrepancies
- Calibration
- Inquire
- Entities
- Eval
- Standup
- Machines
- Baselines
- Connectors
- Facts
- Correct
- Weekly
- Db
Guides