Focus: Learning to observe, not yet to summon.
-
Teachings:
- Understand what a daemon is: background processes, terminal detachment, PID files.
- Learn to identify running daemons (
ps
,top
,htop
) and read logs (journalctl
,/var/log/
). - Perform safe restarts with
systemctl
or init scripts — observe cause/effect. - Begin learning signals (
kill -HUP
,kill -TERM
) and their meanings.
-
Trial: Identify three rogue processes and correctly stop them without rebooting the host.
-
Symbolic Rite: Granted the Watcher’s Key: permission to read logs and monitor process tables.
Focus: Basic conjuration and safe containment.
-
Teachings:
- Manually daemonise a simple script (double fork, redirect I/O).
- Create and manage PID files properly.
- Configure basic logging (syslog vs. direct file).
- Understand privileges:
setuid
,chroot
,umask
.
-
Trial: Bind a trivial daemon (e.g., “heartbeat logger”) to a port and prove it survives logout.
-
Symbolic Rite: Receives Vestments of Non‑Root — no longer trusted with
root
always, must learn humility.
Focus: Mastery of lifecycle and graceful service behaviour.
-
Teachings:
- Implement signal handlers (SIGHUP reload, SIGTERM shutdown).
- Rotate logs gracefully without downtime.
- Employ
ulimit
and resource constraints. - Integrate with
systemd
orsupervisord
as the modern invocation circles.
-
Trial: Build a small daemon that handles reloads and exits cleanly under signal test.
-
Symbolic Rite: Engraved with the Sigil of the PID — entrusted to write and lock PID files without summoning duplicate spirits.
Focus: Discipline, service hardening, and secret knowledge.
-
Teachings:
- Employ
cgroups
, namespaces, or containers as binding circles. - Harden configuration (drop privileges, sandboxing).
- Audit daemon behaviour with
strace
,lsof
, andprocfs
. - Design failover rituals (watchdogs, health checks, auto‑resurrection).
- Employ
-
Trial: Survive the Chaos Monkey Night: daemon must restart automatically under simulated crashes, log flooding, and resource starvation.
-
Symbolic Rite: Sworn on the Man Page Codex; granted the right to run
kill -9
without seeking counsel.
(Optional final tier)
- Writes their own init systems or supervisord alternatives.
- Creates frameworks for others to daemonise services with ceremony and safety.
- Teaches new neophytes, continuing the lineage.
-
Oaths and Silence: Oath-taking is symbolic: “I shall serve unseen; I shall log all things, yet speak none.”
-
Relics:
- Watcher’s Key → access to
/var/log/
- Vestments of Non-Root → service account ownership
- Sigil of the PID → right to
/run
- Watcher’s Key → access to
-
Ritual Days:
- Celebrate uptime anniversaries (e.g.,
365d+
processes) with offerings of coffee and pizza. - Daemon’s Eve (traditionally a release night) is spent in vigil, watching logs in
tail -f
.
- Celebrate uptime anniversaries (e.g.,