---
title: "Logrotate Configuration"
space: "Wiki"
url: "https://www.sapconinstruments.com/wiki/logrotate-configuration"
updated: "2026-10-18"
---

* To save the card from getting full, due to logs, we need to configure the logrotate utility.
* It is been pre-configured on git repository for elec\_test.
* If we need to change log size then we can do it by changing file :


```
/etc/logrotate.d/rsyslog
```
currently 400M is mentioned like below:

![](/private/files/qCpQWMN.png)  


we can increase in terms of G also i.e. if we write


```
size 1G
```
then log size will be of 1GB before it gets rotated.
* Also we can control how often it needs to check via


```
/lib/systemd/system/logrotate.timer
```
![](/private/files/4yXci1u.png)
* Here "Hourly" is set so that if system generates too much fast logs those can be rotated before the SD card reaches to trouble
