[systemd-devel] Fwd: journalctl - RuntimeMaxUse attribute in journald.conf behavior is not correct
Lennart Poettering
lennart at poettering.net
Thu Jul 21 12:06:06 UTC 2016
On Wed, 20.07.16 15:49, sandeep (sandeep.ee.nagendra at gmail.com) wrote:
> 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
So, the actual logic works that disk space used could grow up to
MaxUse+x*MaxFileSize where x is the number of files journald writes to
concurrently. x is at least 1 for the system journal file, plus one
for each user journal if splitting out user journals is enabled.
> 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?
Yes, RuntimeMaxUse= applies on the sum of all files, and
RuntimeMaxFileSize= on the size of individual files.
Also note that disk usage of a file != file size on UNIX. Use "du" to
get the actual usage on disk.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list