Home / Systemd Ops Pack
freeSystemd Ops Pack
Stop the five slow-motion outages every Linux box eventually has
Five tested drop-ins for the quiet Linux outages
Download — freeMIT licensed
The problem
Journald fills the disk, cron jobs overlap, jobs fail silently for weeks, the OOM killer picks sshd, and logrotate drops lines. Each has a boring, well-known fix; this pack ships them as tested templates with one installer.
What it does
- journald caps: 512M cap, 1G kept free, 2-week retention, rate burst 2000
- safe-job: runs a command under
flockwith timeout, temp workdir cleaned bytrap, and start/end logging - notify-failure@: webhook, ntfy or email on unit failure with the last 30 log lines, plus an example timer with
OnFailure=andPersistent= - batch.slice + oomd: memory limits, oomd pressure kill, sshd protection
- logrotate templates: reopen-on-signal, copytruncate (lossy, documented), size-based plus an hourly timer
install.shwith--dry-run,--destdirand--uninstall
What's in the box
install.sh,bin/safe-jobjournald/,systemd/,oomd/,logrotate/tests/: shellcheck, safe-job behaviour, installer, systemd-in-Docker integration- README, CHANGELOG, MIT LICENSE
Usage
sudo ./install.sh --dry-run # see what would happen
sudo ./install.sh # journald + safe-job + notify
sudo ./install.sh oomd logrotate-timer # opt-in: changes host behaviour
# cron:
*/15 * * * * root /usr/local/bin/safe-job nightly-sync -t 1200 -- /srv/bin/sync.sh
Requirements
- A systemd distribution (Debian/Ubuntu/RHEL/Fedora)
- cgroup v2 and
systemd-oomdfor the oomd component (on Debian 12:apt install systemd-oomd) - Docker only for the integration tests
Limitations / what it is not
- The defaults are sized for mid-size hosts: edit the journald caps and the 6G/7G batch slice limits to fit your disk and RAM.
- copytruncate is lossy: lines between copy and truncate are dropped.
- The oomd component and hourly logrotate are opt-in because they change host behaviour. Test a kill on a non-production box first.
- Not a config-management solution: for fleet-scale rollout use your own tooling.
FAQ
What is the license?
MIT. Free to use, modify and share.
Is it free? Yes. No payment is involved.
How do I get support?
By email: [email protected].
Where it came from
Written up on the blog first:
- Stop letting journald eat your root filesystem
- Stop cron jobs from stepping on each other with flock and trap
- Systemd timers that tell you when they fail
- Stop letting the kernel OOM killer pick your victims: memory limits with systemd
- Logrotate without losing lines or filling the disk
Download — freeMIT licensed
Tested Lab-tested
| Product version | 0.1.0 |
|---|---|
| Last run | 2026-11-24 |
| Result (install and tests) | PASS |
| Platforms | systemd inside a privileged container |
What was tested, and how
- Static checks (ShellCheck, unit verification) plus install and uninstall in a container running systemd
How: The pack's owntests/run.sh
Not tested
- Bare-metal / VM installs; distributions other than the container image used
Method and lab setup: How we test.