systemd-journald sometimes uses up a ridiculous amount of disk space under /var/log/journal. Here are the steps to limit systemd-journald to use 16MB of disk space under /var/log/journal.
1) Edit the configuration file /etc/systemd/journald.conf and set SystemMaxUse=16M uncommenting it if necessary.
2) Stop the service and its trigger sockets:
# systemctl stop systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
# systemctl status systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
3) If /var/log/journal does not exist, create it:
# ls -l /var/log/journal/*
If not found:
# mkdir -p /var/log/journal
# systemd-tmpfiles --create --prefix /var/log/journal
4) Clear out existing transient and persistent journals.
# rm -rvf /var/log/journal/*
# rm -rvf /run/log/journal/*
5) Start the service and its trigger sockets:
# systemctl start systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
# systemctl status systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
#killall -USR1 systemd-journald # forces in-memory journal to be written to /var/log/journal/*
No comments:
Post a Comment
"SEO" link builders: move on, your spam link will not get posted.
Note: Only a member of this blog may post a comment.