Limit persistent journal usage to 500M in journald.conf.
Which setting is appropriate?
SystemMaxUse controls the maximum size of persistent system journal data.
Detailed explanation
RuntimeMaxUse=500MIncorrect. RuntimeMaxUse limits volatile runtime journal usage.
Incorrect. RuntimeMaxUse limits volatile runtime journal usage.
SystemKeepFree=500MIncorrect. SystemKeepFree reserves free filesystem space rather than setting journal maximum size.
Incorrect. SystemKeepFree reserves free filesystem space rather than setting journal maximum size.
MaxFileSec=500MIncorrect. MaxFileSec is a time-based rotation interval.
Incorrect. MaxFileSec is a time-based rotation interval.
SystemMaxUse=500MCorrect. SystemMaxUse=500M sets the persistent journal limit.
Correct. SystemMaxUse=500M sets the persistent journal limit.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s\n' '[Journal]' 'Storage=persistent' 'SystemMaxUse=500M'Expected result
[Journal]
Storage=persistent
SystemMaxUse=500MKey points
- System is /var/log
- Runtime is /run
- KeepFree is different
Notes
- Environment: 合成journald.confの表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.