[syslog-ng]RE: HUP'ing syslog-ng causes data loss
Tue, 18 Dec 2001 13:53:19 -0600
To rotate logs, should I be sending a HUP to syslog-ng or is there another
way to accomplish this?
From: UK [mailto:email@example.com]
Sent: Wednesday, December 12, 2001 10:40 AM
Subject: HUP'ing syslog-ng causes data loss
When syslog-ng receives a HUP signal it closes and reopens all listening
sockets. Because this takes some time, it may be responsible for the data
There was a request in private mail to add a keep-listener-alive() option,
which would avoid this close operation, which could help a bit, this is
however a todo item, and not reality.
On Wed, Dec 12, 2001 at 10:40:25AM -0600, UK wrote:
> Trying to see what happens when syslog-ng (Version 1.4.14 on Solaris 8)
> HUP'ed, as my logrotate scripts will do, while it's receiving UDP data.
> Using the stresstes.sh script on another host (which is using the
> box as a loghost), a stream of messages will be sent. The while loop was
> changed to:
> while [ "$i" -lt "1000" ]
> After the script ran, a "cat messages | wc -l" was done against the log
> the results would be approx 995 lines (probably because it's UDP). Then
> move the file and HUP syslog-ng and retested a few more times. Same
> each time.
> Next, while stresstest.sh was running, syslog-ng would be HUP'ed two or
> three times. After every test the "cat messages | wc -l" would show
> 965 - 975 lines.