[systemd-devel] Fwd: journalctl - RuntimeMaxUse attribute in journald.conf behavior is not correct

sandeep sandeep.ee.nagendra at gmail.com
Wed Jul 20 10:19:49 UTC 2016


Hi,

I was performing some tests related to below attributes in Journald.conf

RuntimeMaxUse
RuntimeMaxFileSize
RuntimeMaxFiles

I am not sure whether some of the behavior is correct or not. Please
clarify.

*1) Test1*
RuntimeMaxUse=2G
#RuntimeKeepFree=
RuntimeMaxFileSize=2G
RuntimeMaxFiles=2

With above configuration, I could see
Result : 1 backup(system at .....) and 1 active file(system.journal) with size
approximately 930MB

* 2)  Test2*
RuntimeMaxUse=1G
#RuntimeKeepFree=
RuntimeMaxFileSize=3G
RuntimeMaxFiles=3


Result: 2 backup files with approximate size 1G and 1 active file which can
grow upto 1GB

Even though I specified RuntimeMaxUse as 1G, Journal files are taking
values from RuntimeMaxFileSize. Is this correct behavior?

-rw-r-----+ 1 root root 896M Jul 19 21:08
system at 549e83ab29804ec383bd5b3ef1f7f158-00000000003f6c5c-00053800e58b0300.journal
-rw-r-----+ 1 root root 1.3G Jul 19 21:13
system at 549e83ab29804ec383bd5b3ef1f7f158-0000000000548a90-00053800f992713d.journal
-rw-r-----+ 1 root root 984M Jul 19 21:16 system.journal


*3) Test3*

RuntimeMaxUse=1G
#RuntimeKeepFree=
RuntimeMaxFileSize=500M
RuntimeMaxFiles=2

Result: 1 backup file upto 250MB and 1 active file upto 250MB


*4)  Test4*

RuntimeMaxUse=1G
#RuntimeKeepFree=
RuntimeMaxFileSize=2048M
RuntimeMaxFiles=3

Here RuntimeMaxFileSize is 2G , But in my system i can see 2 backup files
and 1 active file each of size 2G.

# ls -lrth
total 5.6G
-rw-r-----+ 1 root root 2.0G Jul 20 12:44
system at 549e83ab29804ec383bd5b3ef1f7f158-000000000c15b73c-0005380de4730a5d.journal
-rw-r-----+ 1 root root 2.0G Jul 20 12:56
system at 549e83ab29804ec383bd5b3ef1f7f158-000000000c391e1c-0005380e0d22855a.journal
-rw-r-----+ 1 root root 1.6G Jul 20 13:07 system.journal


In case 3, RuntimeMaxFileSize was divided by number of files. But in case
4, this is not the behavior.

Do we give preference to RuntimeMaxFileSize than RuntimeMaxUse if size more
than the latter one?

Please clarify.

*# journalctl --version*
systemd 229
+PAM +AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP
-GCRYPT -GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Below is the output of Journald.conf.


*# cat /etc/systemd/journald.conf *
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
Storage=volatile
Compress=no
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
RateLimitInterval=1s
RateLimitBurst=2000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
RuntimeMaxUse=1G
#RuntimeKeepFree=
RuntimeMaxFileSize=2048M
RuntimeMaxFiles=3
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

-Sandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160720/d3c6cefe/attachment.html>


More information about the systemd-devel mailing list