systemd journald¶
Config¶
Turn on persistant storage¶
According to https://www.golinuxcloud.com/enable-persistent-logging-in-systemd-journald/, it's sufficient to only create the persistent journald stroage location with
Existing journal entries from /run/log/journal will get moved over
immediately.
journal storage location: /var/log/journal
Clean up:
Limit max size
mkdir /etc/systemd/journald.conf.d
vi /etc/systemd/journald.conf.d/size.conf
[Journal]
SystemMaxUse=500M
SystemMaxFileSize=50M
Usage¶
Verbose mode, shows the journald field names
Show errors since last boot:
Show errors of the last hour:
Flush journal¶
Retain only the past two days:
Retain only the past 500 MB: