Declaring dependencies so the init system can schedule them

systemd dependencies separate activation, ordering, and readiness

A dependency graph needs to express more than “start the database first.” One relationship decides whether another unit is pulled into the transaction; another orders the jobs; the service type defines when startup has finished. Application readiness is a further promise that the program must actually fulfill. Confusing these layers produces a boot sequence that looks ordered while the dependent service still starts too early. ...

February 18, 2028 · 5 min · XB Field Notes
A listen-on-demand hook that spawns the service on first connect.

Socket activation starts a service only when needed

The port is always ready while the process only starts when someone knocks, a neat trick for rare but heavy services. Every idle daemon costs something: resident memory, periodic wakeups, patch surface, log noise. Multiplied across dozens of seldom-used services on one host, the tax funds nothing. Socket activation inverts the deal — the kernel holds the listening socket, systemd owns it before any daemon exists, and the service process is born only when the first connection arrives carrying real work. ...

February 1, 2028 · 4 min · XB Field Notes
A cleanup rule removes eligible directory entries while preserving recent and excluded data.

systemd-tmpfiles applies creation and age policies

systemd-tmpfiles describes filesystem objects and housekeeping rules in configuration files. A rule can create a directory with a chosen mode, while an age rule can make old entries eligible for cleanup. The command must actually run the relevant operation for either effect to occur. This is useful lifecycle policy, but it is not a continuous watcher or a hard storage quota. ...

December 10, 2027 · 5 min · XB Field Notes
One activation runs ordered commands and records completion or failure.

A systemd oneshot completes one activation

A Type=oneshot service represents finite work whose startup completes when its start commands finish successfully. That makes it useful for setup steps and scheduled jobs whose completion matters to a dependent unit. The word oneshot describes one activation’s process model. It does not create a permanent record that prevents the task from running again after a restart, another activation, or a reboot. ...

November 28, 2027 · 5 min · XB Field Notes
The manager retains a listening socket while compatible worker processes come and go.

Socket activation passes a listener to a compatible service

Socket activation lets systemd open a listening endpoint before the application process starts. Activity on that endpoint can then trigger a compatible service, which receives descriptors for sockets the manager already owns. The useful boundary is listener ownership versus application lifetime. An open endpoint is not yet proof that the application has initialized, accepted a request, or produced a correct response. ...

November 8, 2027 · 5 min · XB Field Notes
Restart decisions depend on exit classification, delay, and start-rate limits.

systemd restart policies need explicit failure and rate rules

A restart policy decides whether a service manager should try another process after the current one ends. It can recover from a transient failure, but it cannot correct a missing configuration or a deterministic bug. The useful contract has three parts: which endings qualify, how long to wait, and how many starts are permitted within a time window. Those settings answer different questions. ...

November 7, 2027 · 4 min · XB Field Notes
An active journal file and archived files with different removal rules.

The systemd journal needs an explicit retention contract

The systemd journal stores messages with structured metadata in journal files. That makes service output searchable without first inventing a parser for every application’s text format. Keeping those messages for a useful period is a separate requirement. Storage location, size policy, rotation, and forwarding determine which evidence remains available when an incident is investigated later. ...

October 26, 2027 · 4 min · XB Field Notes
Journal fields narrow two service invocations into an exact result set.

Query the journal with explicit field and priority rules

A useful journal query selects the records that answer a specific incident question. Unit identity, invocation, time, priority, and application fields provide different dimensions. Combining them correctly matters more than finding a familiar word somewhere in the machine’s history. journald can attach process metadata, but it does not automatically collect every file an application writes or infer the business meaning of each message. ...

July 30, 2027 · 5 min · XB Field Notes