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

imported>Handy
imported>Handy
Line 49: Line 49:
Use your favourite text editor with root priviliges, (starting it with '''sudo''' will do the job).
Use your favourite text editor with root priviliges, (starting it with '''sudo''' will do the job).


A simple edit of the '''/etc/systemd/journald.conf''' allows you to set the maximum size limit of the '''/var/log/journal''' .
A simple edit of the '''/etc/systemd/journald.conf/size.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:
* 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
[Journal]
  SystemMaxUse=250M
SystemMaxFileSize=50M


<br clear="all"/>
<br clear="all"/>
Anonymous user