FAQ_MA35D1_Clean Systemd Cache and Log

Post Reply
ytliu6
Posts: 80
Joined: 08 Nov 2022, 10:28

07 Apr 2023, 17:19

Running certain applications may result in a large amount of cache and logs being stored in the /run/log/journal and /var/run/journal directories, which can consume a significant amount of disk space and potentially cause system errors. To address this issue, you can limit the size of the systemd logs or clean up older logs using the journalctl command.

To clean up the systemd runtime log created before 10 seconds, you can use the following command:

Code: Select all

journalctl --vacuum-time=10s
To limit the systemd log size to 16 MB, you can modify the /etc/systemd/journald.conf file as follows:

Code: Select all

vi /etc/systemd/journald.conf SystemMaxUse=16M
After modifying the configuration file, you should restart the systemd journal service using the following command:

Code: Select all

systemctl restart systemd-journald
This will ensure that the changes to the systemd journal's configuration take effect immediately.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests