[rtg] Losing data on a restart after adding an interface

bill fumerola billf at mu.org
Wed Aug 1 19:32:59 EDT 2007


On Wed, Aug 01, 2007 at 04:03:28PM -0700, Landon Stewart wrote:
> Are there any plans (or already a way) to make rtgpoll work with the HUP
> signal to simply read new interfaces and start the normalization and polling
> for those instead of losing a whole polling period's worth of data?  We have
> a 15 minute polling interval and a restart loses quite a bit of data.  Even
> a 5 minute polling period would have a loss of data.

it's supposed to process a SIGHUP right now. there's a thread created
as a signal handler. signal handler threads are tricky and can only call
certain functions and do certain operations. i found that it didn't work
as of a couple years ago. as part of other work, i rewrote the internal
structures that are used to hash/add/remove/change the targets and as a
result, it does work.

<broken record>
the trouble is, the patch is relative to code from two years ago.

http://www.mu.org/~billf/yrtg/
http://www.mu.org/~billf/yrtg/yrtg.patch
</>

i did this for $oldemployer and now $currentemployer has expressed an
interest in me bringing this work up to date (and adding more features).

so at best, you may get working sighup support from an updated release
of my version of rtg in a few months. at worse, i can at least confirm
that SIGHUP support in rtg is magical and has a lot to do with what's
changed (new targets, changed targets, removed targets) and when the
signal is sent relative to where in the codepath it's running at.

IIRC, your best bet is to run it while rtg is sleeping between polls.

hope that sorta helps.

-- 
- bill fumerola / billf at FreeBSD.org




More information about the RTG mailing list