[rsyslog] HUP action
Rainer Gerhards
rgerhards at hq.adiscon.com
Mon Oct 6 17:19:23 CEST 2008
This sounds very reasonable. Thanks for the good suggestion!
Rainer
> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of david at lang.hm
> Sent: Monday, October 06, 2008 5:16 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] HUP action
>
> On Mon, 6 Oct 2008, Rainer Gerhards wrote:
>
> >> could you do something along the lines of checking to see if the
> > config
> >> file changed, and if so do a full restart, otherwise just the
> >> flush/close?
> >>
> >> if you know when you started you may be able to just check the
> >> last-modified time of the config file and do a restart if it's been
> >> modified after you started.
> >
> > That's a very interesting idea. Do you think this criterion is
> > sufficient?
>
> I was thinking of other possible items (doing a checksum of the file,
> doing a syntactic check to see if the new is equivalent to the old,
> etc)
> and I think that they don't end up adding noticable value
>
> the only way the last-modified check would fail is if your clock goes
> backwards (and goes backwards far enough that the 'new' file is
> modified
> before you last started). two ways to deal with that
>
> 1. store the last-modified time of the file when you start up and re-
> read
> it if it has changed (still vunerable if the clock moved back to that
> exact second, but a very small windows)
>
> 2. document the issue and tell people that if their clock goes
> backwards
> and the HUP doesn't re-read the config file do a 'touch' of the file
> and
> try again.
>
> David Lang
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
More information about the rsyslog
mailing list