rndc stats command

Chris Thompson cet1 at cam.ac.uk
Wed Jul 18 19:23:59 UTC 2012


On Jul 18 2012, Ben wrote:

>Hi,
>
>As per man page and my understanding rndc stats writes a current named 
>statistics into defined file in named.conf
>
>so suppose, if i run rndc stats command and then i take required 
>information from named statistics file.
>
>And after some time, ( after 5 minutes or approx.) when i do again rndc 
>stats , so that times it provides new statistics.?
>
>My understanding is that while running rndc stats , it writes current 
>named statistics to defined file and internally it flush named 
>statistics ( which wrote into file as per named.conf )
>
>And while second time run same command , again it append fresh/new named 
>statistics to defined fiel, is it so?
>
>Or is there any interval for rndc / named to generate fresh/new statistics.?
>
>Kindly correct me if I am missing something...

I think you are missing at least the following:

"rndc stats" *appends* to the statistics file. It doesn't overwrite
any previous contents.

"rndc stats" does not reset the internal statistics counters (I take
it that was what you meant by "flush"). They are always accumulative
from when named was last started.

>From two successive set of ststistics written by "rndc stats", you
can deduce what happened during the interval by taking the difference
in the values of corresponding counters, and to deduce rates you
divide by the length of the interval which you can deduce from
the difference in their timestamps

 +++ Statistics Dump +++ (1342566900)
 ...
 --- Statistics Dump --- (1342566900)
                          ^^^^^^^^^^
which are in time_t format (seconds since the Unix epoch).

[What's annoyingly missing, by the way, is the time when named was
in fact started. That's present in the XML on the statistics channel,
but not in the file written by "rndc stats".]

-- 
Chris Thompson
Email: cet1 at cam.ac.uk



More information about the bind-users mailing list