Back to commands

Linux Survival Basics

Read-only, can be slow

Check systemd Journal Disk Usage

Disk alerts often lead people to delete the wrong files without checking whether the systemd journal is the real consumer.

Command

journalctl --disk-usage

Before you run this

System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.

When not to use it: Do not use it to find application log directories outside journald.

Expected output

A total size for archived and active systemd journal files. The number is measured usage, not a promise that all of it is safe to reclaim.

System impact

Read-only, can be slow. Nothing changes. journalctl reports the total disk used by archived and active journal files.

Scope this to the smallest useful path or service on busy systems.

Recovery / rollback: no state is changed.

When to use it

Use during disk-space triage before deciding whether journal retention needs adjustment.

When not to use it

Do not use it to find application log directories outside journald.

What the number means

Use this number to decide whether journal storage is material compared with the full filesystem. It does not identify which service is noisy.

  1. journalctl --disk-usage
  2. du -sh /var/log/journal 2>/dev/null

Retention warning

Vacuuming journals deletes log history. Capture incident evidence and retention requirements before running a vacuum command.

  1. journalctl --disk-usage
  2. journalctl -p err..alert --since "2 hours ago" --no-pager

next steps

Related commands

Linux Survival Basics Can be slow

Spot OOM Kills in the Kernel Journal

Exit code 137 often means the kernel has something to say.

journalctl -k --since "2 hours ago" --no-pager -o short-iso | grep -Ei 'out of memory|oom|killed process'
Linux Survival Basics Can be slow

Read Mount and fstab Warnings

The boot journal often names the mount or dependency that failed.

journalctl -b -p warning --no-pager | grep -iE 'mount|fstab|dependency'
Linux Survival Basics Can be slow

Read Recent systemd Timer Logs

Timer logs show whether systemd attempted to trigger the task.

journalctl -u backup.timer --since "24 hours ago" --no-pager
Linux Survival Basics Can be slow

Read Recent Logrotate Journal

The journal can show why rotation skipped.

journalctl -u logrotate --since '7 days ago' --no-pager

next diagnostic step

Where to go from this command

Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.