I'm using systemd-journald on poky hardknott
journalctl --version
systemd 247 (247.6+)
-PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -ZSTD -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid
with the following configuration in /etc/systemd/journald.conf :
[Journal]
Storage=volatile
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=10000
SystemMaxUse=30M
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
RuntimeMaxUse=30M
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K
#ReadKMsg=yes
#Audit=yes
But this configuration does not seem to be applied. I get the following entry when I restart journald :
systemd-journald[295]: Runtime Journal (/run/log/journal/d02c017c32014587812cf2ee0daaebf9) is 24.0M, max 42.0M, 18.0M free.
Then /run hit always 100% and logs are truncated and not updated.
Journal file /run/log/journal/d02c017c32014587812cf2ee0daaebf9/system.journal is truncated, ignoring file.
The file that is used to configure the rotation of the logs in this yocto distribution is /lib/systemd/journald.conf.d/00-systemd-conf.conf
You have to patch the systemd-conf
recipe with your configuration.
It looks like /etc/systemd/journald.conf
is not used, it may be a bug.