Pcornel
Automation · Linux Automation

systemd

Cheat sheet · https://pcornel.dk/topic.php?topic=5655

Back to the Topic

Answer

systemd Automation manages Linux units, enablement, daemon configuration and service lifecycle while separating unit-file persistence, manager reload, active state and application readiness.

Remember

  • Unit file written ≠ systemd manager loaded it.
  • enabled ≠ active.
  • active ≠ application ready.
  • restart command success ≠ dependency or workload health.

First checks

  • systemctl is-active <svc> — state
  • systemctl is-enabled <svc> — boot enablement
  • systemd-analyze verify <unit> — unit file check

Verify in this order

unit file → daemon-reload → service state

Where it usually breaks

systemd state proves service-manager observations, not full application correctness or dependency health.

systemd automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation summary substitutes for actual runtime behavior

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5655

Confirmation

Confirm action

Continue?