Bugzilla – Bug 587
statistics option does not default to 3600
Last modified: 2014-06-17 09:47:20 CEST
The statistics option does not default to 3600 as the sample configuration states, it actually defaults to 0.
The value 0 now disables statistics reporting.
It appears that my nsd instances have only ever been reporting statistics when they get reloaded for a zone update, and with the change to check st.period != 0 they no longer report any statistics at all.
Having a stats period of 0 has the side effect that the stats are never cumulative (unless SIGUSR1 is used), which makes the zone stats much easier to process.
Shouldn't the zone stats be reset after they're written?
There's no boot time in the zone stats file so I'd need to find the corresponding NSTATS line from syslog to determine when the statistics started.
Thanks for your report. I fixed the default value for the statistics period in svn.
About your second question: I wouldn't know: it is an old Bind feature we copied, and I assume they behave the same.
I couldn't find a zone stats feature in Bind 8, and the NSTATS code isn't in Bind 9 at all.
I've had to patch nsd to reset the zone data after writing it, otherwise it's not possible to use the stats output files on their own because you can't get an accurate value over time for any of the data.
actually the man page for nsd.conf says the default is 0. I undid my fix and adjusted the sampe configuration file to say explicit the default is 0.
About the cumulative statistics, Wouter explained to me the reason why we don't reset the statistics. Because the statistics are not dumped atomically, it could be that when resetting you have missed some increments of the counters. By providing cumulative statistics, the number at least adds up and is correct.