skip to content

Service & job management

The init systems and supervisors that decide what starts at boot, what restarts after a crash, and what runs on a schedule. Interviewers ask because every incident eventually reaches the question of who was supposed to start this process, and why it never came back.

on this pageshow

explore

questions

page 2 of 2

In systemd, what is a template unit such as [email protected], how do you start and enable one instance of it, and what do the %i and %I specifiers expand to inside the unit file?

level: middleimportance: nice to knowfreq 30%

basics

~20 s

A template unit has an @ before its suffix and is never run directly; you run instances of it, such as [email protected]. Inside the file, %i expands to the instance name as written and %I to its unescaped form.

open as a page

On a slow-booting systemd host, systemd-analyze blame reports that a unit took 25 seconds, but disabling it does not shorten the boot at all. Why can blame mislead, and which systemd-analyze subcommand answers "what is actually delaying the boot"?

level: seniorimportance: nice to knowfreq 40%

basics

~20 s

blame ranks units by how long each took to initialise, ignoring the dependency graph, so a slow unit nothing waits for costs nothing. systemd-analyze critical-chain walks the ordering chain into the boot target and shows which delays actually accumulated.

open as a page

A busy service's log lines go missing from the systemd journal during traffic spikes, and the journal itself contains a line saying messages from that unit were suppressed. What is systemd-journald doing, and which settings control it?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

journald rate-limits each service separately: past roughly 10000 messages in 30 seconds it drops the remainder and logs a suppression notice. Tune RateLimitIntervalSec= and RateLimitBurst= in journald.conf, or LogRateLimitIntervalSec= and LogRateLimitBurst= on the unit itself.

open as a page

Four hundred servers each run the same systemd timer with OnCalendar=*-*-* 03:00:00, and every night they hit the same internal package mirror at once. Which [Timer] directives spread that load, and which one does not do what people expect?

level: seniorimportance: nice to knowfreq 38%

basics

~20 s

RandomizedDelaySec= is the spreader: it delays each trigger by a random amount between zero and the given span. AccuracySec= does not spread load across a fleet — it only widens the window in which systemd may fire a timer so it can batch wakeups on that one host.

open as a page

You are asked to make in-house Linux services restart without refusing connections, and someone proposes putting every service behind a systemd socket unit. How would you decide where socket activation is the right tool and where it is not?

level: principalimportance: nice to knowfreq 20%

basics

~20 s

Socket activation is a single-host tool with a source-code prerequisite: the daemon must accept passed descriptors. It suits on-demand and local services, but it does not do version skew, health gating or cross-host traffic shifting — which is what most restart requirements really need.

open as a page

showing 31–35 of 35