Manjaro Difference between revisions of "Limit the size of .log files & the journal"

Difference between revisions of "Limit the size of .log files & the journal"

From Manjaro
imported>Handy
imported>Handy
Line 29: Line 29:
== How to set a maximum size limit for the journal ==
== How to set a maximum size limit for the journal ==


You need to use your text editor with root priviliges, starting it with '''sudo''' will do the job.
There is usually no need to interfere with the maximum size of the journal, as it has been built to monitor the amount of free space on the partition where it exists & will shrink itself by deleting the oldest entries when a shortage of space demands it.


With a simple edit of the '''/etc/systemd/journald.conf''' you can set the maximum size limit of the '''/var/log/journal''' .
Use your favourite text editor with root priviliges, (starting it with '''sudo''' will do the job).


* Uncomment the following line & add the size limit that you want. I set mine to 50MB like this:
A simple edit of the '''/etc/systemd/journald.conf''' allows you to set the maximum size limit of the '''/var/log/journal''' .
 
* Uncomment (remove the # from the beginning of the line) the following line & add the size limit that you want. I set mine to 50MB like this:


  SystemMaxUse=50M
  SystemMaxUse=50M
After a reboot, you should find that your journal is now somewhat less than 50MB (or whatever limit you set), as it needs to have some working space. Mine went to 38M from 391M.


<br clear="all"/>
<br clear="all"/>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.