| 配置项 | /etc/systemd/journald.conf 的 Storage=persistent/volatile/auto |
|---|---|
| 落盘位置 | /var/log/journal/<machine-id>/ |
| 配额 | SystemMaxUse / MaxRetentionSec 控制保留 |
| 断档判断 | 时间戳跳变、目录清空、仅剩本次启动 |
检查落盘与启动记录
检查落盘与启动记录
grep -E '^Storage|^SystemMaxUse' /etc/systemd/journald.conf
ls -la --time-style=long-iso /var/log/journal/*/ | head
journalctl --list-boots --no-pager | tail -n 10事件后重启过的主机,若 Storage=volatile,关键日志已随内存消失——此时转向 rsyslog 落盘日志与上游采集平台。