With heavy system logging which goes by default into `/var/log/messages` log file which is usually placed in tmpfs/RAM one can trigger OOM killer fairly easily, thus killing random processes and in some cases making system unusable. This is likely happening due to the fact, that Linux by default uses 1/2 of available RAM for tmpfs, which might be for example an issue on low RAM devices with ath10k wireless. So let's fix it by adding logrotate functionality which should limit the size of `/var/log/messages` log file to 1M by default, but could be tweaked by config knob if needed be. Signed-off-by: Petr Štetiar <ynezz@true.cz>
12 lines
188 B
Text
12 lines
188 B
Text
/var/log/messages {
|
|
compress
|
|
copytruncate
|
|
delaycompress
|
|
notifempty
|
|
maxsize @MAXSIZE@
|
|
missingok
|
|
postrotate
|
|
/usr/sbin/syslog-ng-ctl reload > /dev/null
|
|
endscript
|
|
rotate @ROTATE@
|
|
}
|