services/list
List loaded systemd service units with load, active, and sub states. Filter by exact state or name pattern, and use JSON output for structured results.
Instructions
Lists systemd .service units that systemd currently has loaded, with load, active and sub state (D-Bus ListUnits). Read-only. An installed but never-loaded unit file may be missing, and timers, sockets and other unit types are not included. pattern supports only a leading and/or trailing * (kube*, *ssh*); without * it is an exact unit name including .service. The state filters are exact strings: active_state active/failed/inactive, sub_state running/exited/dead, load_state loaded/not-found. Text output is a block per unit plus a hint line, or No services found matching the criteria.; output_format: json returns an array of objects (name, description, load_state, active_state, sub_state), [] when empty. To change a service use services/manage, for one unit's details the service://<name>/status resource, for its logs logs/journal-control.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No | Only a leading and/or trailing * is supported ('kube*', '*ssh*'); without * an exact unit name including '.service' | |
| sub_state | No | Exact state: 'running', 'exited' or 'dead' | |
| load_state | No | Exact state: 'loaded' or 'not-found' | |
| privileged | No | Run as root (may be required depending on policies) | |
| active_state | No | Exact state: 'active', 'failed' or 'inactive' | |
| output_format | No | Use json for structured output (yaml, table and wide return the same JSON); default is text |