Difference between revisions of "Limit the size of .log files & the journal"
Views
Actions
Namespaces
Variants
Tools
Limit the size of .log files & the journal (view source)
Revision as of 00:55, 12 February 2014
, 10 years ago→How to set a maximum size limit for the journal
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 == | ||
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. | |||
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 | ||
<br clear="all"/> | <br clear="all"/> |