Skip to content

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 ​

CommandRun byPurpose
runcastmill-agent.service (user agent)The agent daemon: the native side of the castmillOS bridge, player supervision, updates
healthcastmill-health.service (root)Post-boot health check: commits a trial slot or rolls it back
health --report-onlycastmill-health-report.timerPeriodic check that never changes slots or reboots
provisioncastmill-provision.service (root)Applies castmill.conf
update URL VERSION [--now]youRequests an OS update from a RAUC bundle URL. See Updates.
session-config weston|disabledthe display sessionWrites the compositor configuration
display OUTPUT on|offyou (root)Switches a display over HDMI-CEC or DDC/CI, to check a display model. The device schedule does this by itself
statusyouPrints the agent state as JSON
versionyouPrints the agent version

Options ​

OptionEffect
--config FILEAgent configuration (default /etc/castmill/agent.toml)
-vDebug logging
--nowupdate: activate as soon as it's installed, ignoring the maintenance window
--report-onlyhealth: report only, never mark slots or reboot

status ​

sh
castmill-agent status

Prints the runtime state and the update state. The most useful fields:

FieldMeaning
agent_version, device_nameVersion and device name
backend_url, backend_ok, backend_errorThe Castmill server, when it last answered, and the last error
time_trustedWhether the clock has been set from NTP or HTTPS
outputsEach 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
displayEach scheduled output: power (on/off), when it last changed, the method used (cec, ddc or none) and the last error. See Device schedule
update.stateSee update states
update.version, update.from_version, update.last_errorThe update and its outcome

Files ​

PathContents
/etc/castmill/agent.tomlAgent configuration, part of the image
/run/castmill-agent/player.sockSocket between the kiosk shells and the agent (protocol)
/run/castmill-agent/state.jsonRuntime 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/.

Documentation licensed under CC BY 4.0. Code under MIT and Apache-2.0.