<div dir="ltr">Hi,<br><div class="gmail_quote"><div dir="ltr"><div><div><br></div><div>I was performing some tests related to below attributes in Journald.conf<br></div><br>RuntimeMaxUse<br>RuntimeMaxFileSize<br>RuntimeMaxFiles<br><br></div>I am not sure whether some of the behavior is correct or not. Please clarify.<br><div><div><div><div><div><br></div><div><b>1) Test1</b><br></div><div>
RuntimeMaxUse=2G<br>
#RuntimeKeepFree=<br>
RuntimeMaxFileSize=2G<br>
RuntimeMaxFiles=2<br>
<br></div><div>
With above configuration, I could see <br></div><div>
Result : 1 backup(system@.....) and 1 active file(system.journal) with size approximately 930MB<br>
<b><br></b></div><div><b>
2)  Test2</b><br></div><div>
RuntimeMaxUse=1G<br>
#RuntimeKeepFree=<br>
RuntimeMaxFileSize=3G<br>
RuntimeMaxFiles=3<br>
<br>
<br>
Result: 2 backup files with approximate size 1G and 1 active file which can grow upto 1GB<br>
<br></div><div>Even though I specified RuntimeMaxUse as 1G, Journal files are taking values from RuntimeMaxFileSize. Is this correct behavior?<br><br>
-rw-r-----+ 1 root root 896M Jul 19 21:08 <a href="mailto:system@549e83ab29804ec383bd5b3ef1f7f158-00000000003f6c5c-00053800e58b0300.journal" target="_blank">
system@549e83ab29804ec383bd5b3ef1f7f158-00000000003f6c5c-00053800e58b0300.journal</a><br>
-rw-r-----+ 1 root root 1.3G Jul 19 21:13 <a href="mailto:system@549e83ab29804ec383bd5b3ef1f7f158-0000000000548a90-00053800f992713d.journal" target="_blank">
system@549e83ab29804ec383bd5b3ef1f7f158-0000000000548a90-00053800f992713d.journal</a><br>
-rw-r-----+ 1 root root 984M Jul 19 21:16 system.journal<br>
<br>
<br>
</div><div><b>3) Test3</b><br></div><div>
<br>
RuntimeMaxUse=1G<br>
#RuntimeKeepFree=<br>
RuntimeMaxFileSize=500M<br>
RuntimeMaxFiles=2<br>
<br>
Result: 1 backup file upto 250MB and 1 active file upto 250MB<br><br><br></div><div><b>4)  Test4</b><br></div><div><br>RuntimeMaxUse=1G<br>#RuntimeKeepFree=<br>RuntimeMaxFileSize=2048M<br>RuntimeMaxFiles=3<br><br></div><div>Here RuntimeMaxFileSize is 2G , But in my system i can see 2 backup files and 1 active file each of size 2G. <br><br></div><div># ls -lrth<br>total 5.6G<br>-rw-r-----+ 1 root root 2.0G Jul 20 12:44 system@549e83ab29804ec383bd5b3ef1f7f158-000000000c15b73c-0005380de4730a5d.journal<br>-rw-r-----+ 1 root root 2.0G Jul 20 12:56 system@549e83ab29804ec383bd5b3ef1f7f158-000000000c391e1c-0005380e0d22855a.journal<br>-rw-r-----+ 1 root root 1.6G Jul 20 13:07 system.journal<br><br><br></div><div>In case 3, RuntimeMaxFileSize was divided by number of files. But in case 4, this is not the behavior.<br><br></div><div>Do we give preference to RuntimeMaxFileSize than RuntimeMaxUse if size more than the latter one?<br></div><div><br> Please clarify.<br><br><b># journalctl --version</b><br>systemd 229<br>+PAM +AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN<br><br>Below is the output of Journald.conf.<br><br><br><b># cat /etc/systemd/journald.conf </b><br>#  This file is part of systemd.<br>#<br>#  systemd is free software; you can redistribute it and/or modify it<br>#  under the terms of the GNU Lesser General Public License as published by<br>#  the Free Software Foundation; either version 2.1 of the License, or<br>#  (at your option) any later version.<br>#<br># Entries in this file show the compile time defaults.<br># You can change settings by editing this file.<br># Defaults can be restored by simply deleting this file.<br>#<br># See journald.conf(5) for details.<br><br>[Journal]<br>Storage=volatile<br>Compress=no<br>#Seal=yes<br>#SplitMode=uid<br>#SyncIntervalSec=5m<br>RateLimitInterval=1s<br>RateLimitBurst=2000<br>#SystemMaxUse=<br>#SystemKeepFree=<br>#SystemMaxFileSize=<br>#SystemMaxFiles=100<br>RuntimeMaxUse=1G<br>#RuntimeKeepFree=<br>RuntimeMaxFileSize=2048M<br>RuntimeMaxFiles=3<br>#MaxRetentionSec=<br>#MaxFileSec=1month<br>#ForwardToSyslog=no<br>#ForwardToKMsg=no<br>#ForwardToConsole=no<br>#ForwardToWall=yes<br>#TTYPath=/dev/console<br>#MaxLevelStore=debug<br>#MaxLevelSyslog=debug<br>#MaxLevelKMsg=notice<br>#MaxLevelConsole=info<br>#MaxLevelWall=emerg<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-Sandeep<br></div></font></span></div></div></div></div></div>
</div><br></div>