-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Power Services Ls
Lists the systemd service units on a machine. It is the default subcommand of
services, so ed machines services tuf runs it. Also spelled
ed machines services list.
ed machines services ls <machine> [--failed] [--json]
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
machine name, ssh alias or id | required | Which machine to list units on. |
| Name | Type / values | Default | What it does |
|---|---|---|---|
--failed |
flag | off | Only failed units, meaning those whose active or sub field is failed. Filtered on this Mac after the full list arrives. |
--json |
flag | off | Emit JSON on stdout instead of the table. |
--help, -h
|
flag | off | Print the help for this command on stdout and exit 0. |
$ ed machines services tuf
UNIT ACTIVE SUB WHAT
cron.service active running Regular background program processing daemon
docker.service active running Docker Application Container Engine
nginx.service active running A high performance web server
ollama.service failed failed Ollama Service
ssh.service active running OpenBSD Secure Shell server
systemd-timesyncd.service active running Network Time Synchronization
A top-level array, one object per unit, in the order systemctl returned them:
[
{
"active": "active",
"description": "A high performance web server",
"failed": false,
"load": "loaded",
"running": true,
"sub": "running",
"unit": "nginx.service"
},
{
"active": "failed",
"description": "Ollama Service",
"failed": true,
"load": "loaded",
"running": false,
"sub": "failed",
"unit": "ollama.service"
}
]load, active and sub are systemd's own three columns, passed through
untouched. running is sub == "running" and failed is
active == "failed" || sub == "failed", both precomputed so a script does not
have to know systemd's vocabulary. The JSON key is description; the table
column is headed WHAT.
ed machines services tuf
ed machines services ls tuf --failed
ed machines tuf services ls
ed machines services ls tuf --json | jq -r '.[] | select(.failed) | .unit'
The remote line is this, with a 30 second timeout:
systemctl list-units --type=service --all --no-pager --no-legend --plain 2>/dev/null | head -200
Three consequences worth knowing.
The list is capped at 200 units and there is no flag to raise it. A machine with more services than that loses the tail silently.
Only .service units are listed. Timers, sockets, mounts and targets are not,
because the parser drops any line whose first field does not end in .service.
A machine with no systemd at all reports nothing rather than failing. The
2>/dev/null swallows the "command not found" and head exits 0, so you get a
note on stderr and exit 0:
$ ed machines services ls box
no systemd units reported
--failed narrows the list here, on this Mac, after all 200 lines have crossed
the wire. It is not systemctl --failed, so it costs the same as the full list.
-
ed machines power, 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