RE: [syslog-ng] HUP does not work
The problem is: A central syslog server logs huge number of maillog messages from a server. HUP signal is sent to the syslog-ng in postrotate instructions when logrotate runs. All log files are rotated properly except maillog. The old maillog messages are in the proper file, but no new file is created and thus nothing is logged for the facility . When I stop/start syslog-ng daemon it's working good. Yes, you are right. No start time of syslog-ng process gets changed when HUP is sent. Sorry my bad idea. Thanks for your help Lumir Unzeitig -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Sandor Geller Sent: Wednesday, April 19, 2006 3:31 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] HUP does not work Lumir Unzeitig (DHL CZ) wrote:
Hi,
I use syslog-ng-1.6.9-1. When the server should be killed by HUP signal (logrotate ) nothing happens (no time change in process table)
The HUP signal doesn't kill syslog-ng, it's effect is to reopen the destinations.
I attached list of HUP action and strace of the action.
You straced the kill command, not syslog-ng, so the output isn't useful.
The daemon uses pipes() and udp() as the sources.
Do you have any idea?
What problem do you want to solve? -- Sandor Geller wildy@balabit.hu _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Thu, 2006-04-20 at 13:47 +0200, Lumir Unzeitig (DHL CZ) wrote:
The problem is: A central syslog server logs huge number of maillog messages from a server. HUP signal is sent to the syslog-ng in postrotate instructions when logrotate runs. All log files are rotated properly except maillog. The old maillog messages are in the proper file, but no new file is created and thus nothing is logged for the facility . When I stop/start syslog-ng daemon it's working good.
We would need some more information about syslog-ng when in this bad state. Please attach to the syslog-ng process with strace right before sending a HUP signal and wait till some mail log is generated. Use the following strace command: strace -s 256 -o /tmp/output-file -p <syslog-ng pid> And an idea, isn't it postfix that stops logging? -- Bazsi
On 4/20/06, Lumir Unzeitig (DHL CZ) <lumir.unzeitig@dhl.com> wrote:
The problem is: A central syslog server logs huge number of maillog messages from a server. HUP signal is sent to the syslog-ng in postrotate instructions when logrotate runs. All log files are rotated properly except maillog. The old maillog messages are in the proper file, but no new file is created and thus nothing is logged for the facility . When I stop/start syslog-ng daemon it's working good.
Personally, instead of using 'logrotate' I configure syslog-ng to name the 'destination' file as the hour of day and day of week, and let it automatically create new files on the hour. For example: file("/var/log/mail/$WEEKDAY/$HOUR" remove_if_older(172800) ); If you only need today's log messages on hand, you could do: file("/var/log/mail/$HOUR" remove_if_older(7200) ); Kevin
participants (3)
-
Balazs Scheidler
-
Kevin
-
Lumir Unzeitig (DHL CZ)