Skip to main content
Check that the desktop is healthy, restart a service that failed, and read its log. Use this before you drive the screen, and when a window manager or panel has crashed, without creating a new runtime. CLI and cURL examples use $RT for a desktop template (Overview). On any other template components returns 404.

Check the desktop

components returns {present, display, user, components: [...]} — present says the image ships a desktop session, display/user name its display and user, and each entry is {name, unit, active, sub, result, restarts, started_usec} — name is the descriptor key the other calls accept, unit the resolved service name, active/sub/result the service state, restarts the restart count. component with op: start | stop | restart acts on one and returns its post-op record {name, unit, active, sub, result}. The SDKs also expose start_component/stop_component/restart_component (startComponent, stopComponent, restartComponent).

Read a service log

logs pages a component’s journal: pass name, get {entries, cursor} back — each entry {usec, unit, priority, message, identifier} with usec the realtime timestamp and priority the syslog level. Feed the returned cursor into the next call for the following page; "" reads the tail. max (max_entries in Python, --max in the CLI) caps the page (default 200, cap 1000) and priority="err" filters to errors.

Restart what failed

  • components is the health check that means something: a component with active: "failed" (or one that fails to resolve — it reports active: "error" with the reason in sub) is what to restart, and logs tells you why it failed.
  • Stopping the session’s display component takes the display with it — desktop.enable brings a fresh one back.
  • Component names come from the template’s desktop descriptor; a name that matches neither a descriptor key nor a unit returns 404.

Endpoints