State
Runtime files systemg uses to track services.Location
~/.local/share/systemg/ (user mode)
/var/lib/systemg/ (system mode with --sys)
Structure
Supervisor-wide files live at the root. Everything a project persists — its PID map, service state, and cron history — is nested under its own directory, keyed byproject.id:
Each project owns its directory. A project’s monitor, PID map, and state file
only ever touch
projects/{project.id}/ — so two projects that both declare a
service named worker keep entirely separate records, and one project’s
status can never leak into another’s. Isolation is structural, not a
convention we remember to honour.projects/__loose__/. See Projects for how
loose services and named projects coexist in one supervisor.
Key files
pid.xml
Maps a project’s services to process IDs:config_hint
Stores the last config path for commands that need a config-backed project context.sysg status does not require this hint when a supervisor is running;
it asks the supervisor for the aggregate status view.
state.xml
Tracks service status, restart counts, and exit codes — keyed by service configuration hash, scoped to the project directory.cron_state.xml
Per-project cron run history. Each project’s scheduled jobs persist here; a shared scheduler loop routes every run to its own project’s file.Persistence
State survives supervisor restarts. A supervisor crash may leave service processes alive, but they are unsupervised until systemg recovers ownership; they cannot restart or enforce dependencies while no supervisor is running. Clean shutdown removessysg.pid, control.sock, and config_hint. Stale files after crash? Run sysg purge.
See also
purge- Clear all state- Projects - How one supervisor hosts many projects
- How It Works - Architecture overview

