On Mon, 6 Oct 2008, Rainer Gerhards wrote: > Hi List, > > I again have a backwards compatibility question. > > HUP, in sysklogd, means a full restart of the syslogd. This is done > because the configuration may have been changed and to apply the new > one, the previous one must be shut down. This is even more so the case > in rsyslog, which has multiple dynamically loadable plugins and all > that... > > rsyslog has implemented HUP processing to be compatible to sysklogd. > > However, in practice (as far as I know) HUP is almost always being used > to close the output files after log rotation. An automatted config > reaload indication usually does not happen (but operators use HUP after > doing a config change). > > HUP, as it currently is, is an extremely expensive operation. Keep in > mind that it is a full daemon restart, so, among other things, it > unloads modules and tears down (TCP, RELP, TLS, ...) connections. In > most cases, though, this would not be needed. > > I now consider changing the way HUP works. I would like to model it in a > way that closes files and clears caches (where useful), but not do a > full restart. > > Initially, I thought to use a special signal (e.g. USR2) for this > purpose. But still logrotate, as a well-known example, would cause a > daemon restart where none is needed. So I now think it would be best to > change HUP in the way described above. Those that need to apply a config > change would then need to do a regular daemon restart - the same thing > that is done with other daemons. In order to keep compatible, I would > add an $HUPisRestart option, by default off, which could be used to > re-enable previous behavior. > > I would appreciate feedback on this plan. Are there any concerns? Is > this a good idea or a bad one? Does it break something I have not yet > mentioned?
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. David Lang _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

