How to rotate systemd-journald log under /var/log/journal/*/ or /run/log/journal/*/?
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Issue
- How to rotate systemd-journald log under /var/log/journal/*/ ?
- Is it possible to control its behavior?
Resolution
-
Journal log can be rotated without setting changes.
-
It is set in
/etc/systemd/journald.conffile. -
Useful parameters are as below:
SystemMaxUse=andRuntimeMaxUse=control how much disk space the journal may use up at maximum. Default to 10% of the respective file system size.SystemKeepFree=andRuntimeKeepFree=control how much disk space systemd-journald shall always leave free for other uses. Default to 15% of the respective file system size. Thesystemd-journaldwill respect both limits, but use the smaller value.
-
Refer to
man 5 journald.conffor more details.
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.