← Back to Labs

systemd activation and supervision lab

Pick a trigger, readiness model, and failure case. Then watch PID 1 load units, build a transaction, create a cgroup, and decide whether the service is really up.

Socket activation · manager waits for READY=1 · Healthy run

1Unit load2Trigger3Transaction4Spawn5Ready6RecoveryjobLoaded unitsapi.service + socket/timer + targetTransactionjobs: pendingService cgroup/system.slice/athens-api.serviceREADY=1 received
Trigger and loaded units

Which unit source wakes the manager and what it already knows about the service.

Trigger unitathens-api.socket
Support unitpostgresql.service
Waiting behaviour8 client connections can queue before the worker is fully ready
Transaction and service boundary

The start request expands into jobs, then the process tree lands in one cgroup.

Jobs in transactionnone yet
Service stateinactive
Tracked byunit cgroup, not a plain PID file
Readiness and recovery

PID 1 waited for READY=1 and now sees a healthy running unit.

Manager says ready after6.0 s
Application actually ready after6.0 s
Queued requests on socket8
Restart counter0
Step 1 / 6systemd first builds live unit objects from files, drop-ins, and generated state

The manager is not running shell scripts directly. It loads service, socket, timer, and target definitions into an in-memory model before any start request happens.

athens-api.service: Starting Athens API
athens-api.service: Got notification message READY=1
athens-api.service: Started with cgroup /system.slice/athens-api.service

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →