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/size.conf''' allows you to set the maximum size limit of the '''/var/log/journal''' .
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:
* 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:
Line 57: Line 57:
  SystemMaxFileSize=50M
  SystemMaxFileSize=50M


You can also help to limit the size of the journal by specifying the level of the data to be added to the journal. This is done by editing '''/etc/systemd/journald.conf.d/level.conf'''
You can also help to limit the size of the journal by specifying the level of the data to be added to the journal. This is done by editing '''/etc/systemd/journald.conf'''


  [Journal]
  [Journal]
Anonymous user