How to see the size of the systemd journal
How to see the size of the systemd journal?
Run the journalctl command and use the --disk-usage option to see the file size of the journal logs.
journalctl --disk-usageThe journalctl command can be used to show the journal. By using the --disk-usage option, the size of the journal is displayed. This includes the archived and active journal files. When the journal is using too much disk space, consider performing a vacuum task.
Usage
Showing the disk usage is quick and easy.
# journalctl --disk-usage
Archived and active journals take up 56.0M in the file system.
Does the journal take up too much space?
# journalctl --vacuum-size=50M
Deleted archived journal /var/log/journal/d8bd6473290d43a9942eaba0a506a454/system@ca889eb2eae24e41b37a50d33bad131c-0000000000000001-00060ed90326924f.journal (8.0M).
Deleted archived journal /var/log/journal/d8bd6473290d43a9942eaba0a506a454/user-1000@aeb5e2f412954ecfaa870c245338cb93-00000000000004e2-00060ed9041f690a.journal (8.0M).
Deleted archived journal /var/log/journal/d8bd6473290d43a9942eaba0a506a454/system@ca889eb2eae24e41b37a50d33bad131c-0000000000000f7b-000615baadbd8a6a.journal (24.0M).
Vacuuming done, freed 40.0M of archived journals from /var/log/journal/d8bd6473290d43a9942eaba0a506a454.
Vacuuming done, freed 0B of archived journals from /run/log/journal.
Vacuuming done, freed 0B of archived journals from /var/log/journal.
Note: even when defining a specific value, the usage may be a little bit higher than the defined threshold. This is most likely due to overhead on the binary database structure and reserving blocks for performance.