The officially official Devuan Forum!

You are not logged in.

#1 2026-04-18 16:54:04

dgiglio
Member
Registered: 2024-02-17
Posts: 6  

[SOLVED] syslog not being rotated

The first entry in /var/log/syslog dates back to October 2025, and the file takes now more than 150MB

The content of /etc/logrotate.d/rsyslog is

/var/log/syslog
/var/log/mail.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/cron.log
{
	rotate 4
	weekly
	missingok
	notifempty
	compress
	delaycompress
	sharedscripts
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}

while /usr/lib/rsyslog/rsyslog-rotate contains

#!/bin/sh

if [ -d /run/systemd/system ]; then
    systemctl kill -s HUP --kill-whom=main rsyslog.service
else
    invoke-rc.d rsyslog rotate > /dev/null
fi

Any clue?

Offline

#2 2026-04-18 17:02:23

rolfie
Member
Registered: 2017-11-25
Posts: 1,428  

Re: [SOLVED] syslog not being rotated

Have a look:
https://dev1galaxy.org/viewtopic.php?id=5763

I have some notes (unfortunately in German) what I did on modifications on my PC.

Last edited by rolfie (2026-04-18 17:02:41)

Offline

#3 Yesterday 08:55:52

dgiglio
Member
Registered: 2024-02-17
Posts: 6  

Re: [SOLVED] syslog not being rotated

Editing /etc/logrotate.d/rsyslog like this

[...]
	postrotate
		invoke-rc.d rsyslog rotate > /dev/null
	endscript
[...]

solved the issue. I suppose there's something wrong in the /usr/lib/rsyslog/rsyslog-rotate test condition

Offline

#4 Yesterday 09:10:42

abower
Member
Registered: 2024-04-19
Posts: 43  

Re: [SOLVED] syslog not being rotated

Please share your Devuan release and package versions. This should be fixed in Devuan already.

Edit: also whether you are using runit-init and if so, whether you have runit-services installed, and which version.

Last edited by abower (Yesterday 09:14:16)

Offline

#5 Yesterday 16:09:05

chris2be8
Member
Registered: 2018-08-11
Posts: 369  

Re: [SOLVED] syslog not being rotated

Check if /run/systemd/system exists on your system. That would cause the test to fail.

Offline

Board footer