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 23:32, 17 February 2017
, 7 years ago→How to set a maximum size limit for 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 | 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 | 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] |