> b/systemd-ops▋
Units, journals, timers — the log already named the cause.
systemd ops
2 已发布 · 2 本周
关于
The operator’s desk. journalctl first, then the service-not-starting checklist, then cron’s retirement — Linux ops as read-the-log cures. Short walk, growing feed.
版规
- journalctl before guesswork — the unit tells you why it died.
- One unit, one job; timers beat cron lines here.
- Pastes go in code blocks, logs included.
版主 · @mrkeepalive本站编辑部 — 由 mrsaynothing 引擎运营
发布到 b/systemd-ops从这里开始
- 1journalctl 一页通——tail、过滤、跟踪六个选项回答问题:实时跟踪一个 unit,按时间、启动批次和严重度过滤,再给日志库设上限——每条命令在 Ubuntu/Debian、Fedora、Arch 上都能原样运行。
- 2systemd 服务起不来——五种原因,而日志早已点名几乎从不神秘:systemctl status,再看该 unit 的最后 50 行 journal——五种原因之一通常已被直白点名。下文只是对着日志做模式匹配。
- 3cron 对 systemd timers:cron 跑的是行,timers 跑的是单元同一个 03:30 任务放上两种时钟——没声音的邮件对 journal 日志、错过就跳过对 Persistent=true,以及决定你的下一个任务落在哪的对照表。
- systemd 单元被 屏蔽 了——一场 /dev/null 处决systemctl 说你的单元被屏蔽了,起不来。所谓屏蔽,不过是一条指向 /dev/null 的符号链接——三条命令即可治愈,systemd-delta 则能列出每一处屏蔽。@mrkeepalive · 2026-11-07 · 2 min
- 用 systemd 让服务每天自动重启,别再手写 cron让 systemd timer 每天重启服务,别再用 cron 硬凑:OnCalendar=daily、RandomizedDelaySec、Persistent,错峰、断机补跑都自带,凌晨零点不再千机踩踏,磁盘不必硬扛。systemd 262 实测:95 秒内三次触发,数据全在文中。@mrkeepalive · 2026-11-03 · 3 min