The logging stack in practice: journald is volatile by default!, rsyslog persistence, and severity queries (measured)
What you will learn
Section titled “What you will learn”The measured truth of the OL 10 logging stack: not persistent by default, the config file has moved, which files rsyslog owns — and the baseline that puts the logging system in a “there will be something to check after an incident” state.
Truth one: a minimal install’s journal is volatile
Section titled “Truth one: a minimal install’s journal is volatile”ls /var/log/journal/ 2>/dev/null || echo volatile# volatile ← lost at reboot!journalctl --disk-usage# Archived and active journals take up 4.9MThose 4.9M of logs live entirely in memory (/run/log/journal). This means one reboot evaporates every prior log — including the critical pre-crash scene (except kdump’s vmcore-dmesg, see the kdump page). This is the minimal install’s default behavior, not a malfunction.
Three steps to persist:
mkdir -p /var/log/journalsystemd-tmpfiles --create --prefix /var/log/journalsystemctl restart systemd-journaldTruth two: journald.conf has moved
Section titled “Truth two: journald.conf has moved”ls /etc/systemd/journald.conf # measured: absentOL10’s (systemd 257) defaults live at /usr/lib/systemd/journald.conf; customization goes through drop-ins:
cat > /etc/systemd/journald.conf.d/90-keep.conf <<'EOF'[Journal]Storage=persistentSystemMaxUse=1GEOFsystemctl restart systemd-journaldOlder tutorials saying “edit /etc/systemd/journald.conf” miss on OL10 — this is systemd upstream’s config layering (/usr/lib defaults → /etc drop-in overrides).
rsyslog: the traditional text layer’s role
Section titled “rsyslog: the traditional text layer’s role”Measured: rsyslog in place with /var/log/messages active (provided with the minimal install/Server environment). The division:
| Stack | Form | Query | What it captures |
|---|---|---|---|
| journald | binary/structured | journalctl | everything (kernel + services + stdout) |
| rsyslog | text | grep/collectors | rewritten from the journal → messages and friends |
They do not conflict. Persisting journald while keeping rsyslog is the steady baseline: text for humans and legacy tools, structured for grep -j/scripts.
journalctl quick reference
Section titled “journalctl quick reference”journalctl -u sshd -n 20 # by servicejournalctl -p err --no-pager # err and above (measured: hit the md/raid1 disk-failure record)journalctl --since "1 hour ago" # a time windowjournalctl -k | grep -i oom # kernel messages (OOM troubleshooting)journalctl -o json-pretty -n 1 # structured output (the collector format)journalctl --disk-usage # usagejournalctl --vacuum-size=500M # cleanupA measured bonus: -p err directly hit the raid1 disk-failure record this site’s mdadm drill manufactured — the logging system and the fault drill closed the loop on the same machine.
Evidence and limits on this page
Section titled “Evidence and limits on this page”- Measured: the volatile default, the config-path change, the rsyslog dual stack, severity queries and disk-usage (E3);
- Not measured: remote log forwarding (rsyslog → a central server; covered in the collector page) and journald’s compression/rate-limit parameters;
- Sources: OL10 system logging documentation,
journald.conf(5),journalctl(1).