castmill-agent
castmill-agent is the Castmill OS device agent: a single Go binary with several roles. Most of them are started by systemd; status and update are useful by hand on development images.
text
castmill-agent <command> [options]Commands
| Command | Run by | Purpose |
|---|---|---|
run | castmill-agent.service (user agent) | The agent daemon: the native side of the castmillOS bridge, player supervision, updates |
health | castmill-health.service (root) | Post-boot health check: commits a trial slot or rolls it back |
health --report-only | castmill-health-report.timer | Periodic check that never changes slots or reboots |
provision | castmill-provision.service (root) | Applies castmill.conf |
update URL VERSION [--now] | you | Requests an OS update from a RAUC bundle URL. See Updates. |
session-config weston|disabled | the display session | Writes the compositor configuration |
display OUTPUT on|off | you (root) | Switches a display over HDMI-CEC or DDC/CI, to check a display model. The device schedule does this by itself |
status | you | Prints the agent state as JSON |
version | you | Prints the agent version |
Options
| Option | Effect |
|---|---|
--config FILE | Agent configuration (default /etc/castmill/agent.toml) |
-v | Debug logging |
--now | update: activate as soon as it's installed, ignoring the maintenance window |
--report-only | health: report only, never mark slots or reboot |
status
sh
castmill-agent statusPrints the runtime state and the update state. The most useful fields:
| Field | Meaning |
|---|---|
agent_version, device_name | Version and device name |
backend_url, backend_ok, backend_error | The Castmill server, when it last answered, and the last error |
time_trusted | Whether the clock has been set from NTP or HTTPS |
outputs | Each output: connected, player attached, time of the last rendered frame, and gpu: rendering (hardware or software), the GL renderer and video_decode, the formats decoded in hardware |
display | Each scheduled output: power (on/off), when it last changed, the method used (cec, ddc or none) and the last error. See Device schedule |
update.state | See update states |
update.version, update.from_version, update.last_error | The update and its outcome |
Files
| Path | Contents |
|---|---|
/etc/castmill/agent.toml | Agent configuration, part of the image |
/run/castmill-agent/player.sock | Socket between the kiosk shells and the agent (protocol) |
/run/castmill-agent/state.json | Runtime state (memory only) |
/data/castmill/state/ | Persistent state: device ID, update state, requested update, device schedule (display-schedule.json) |
/data/castmill/config/ | Provisioning results and per-device configuration |
The source is in agent/.