Hi,

Thanks for your kind response. sorry for the delay.

Currently i make a logic with shell scripts is that

i run my statistics.sh by cron via every 1 minute and collect INCOMING QUERY AND CACHE HIT RATIO.

CACHE HIT RATIO = (IN COMING QUERY - RECURSION )  / INCOMING QUERY.

Let say i run first time : 10.00 AM
First i clean named_Stat file and then run rndc stats command so it will write statistics to named_stat file and then i collect incoming query numbers and cache hit ratio.

Second time run same logic : 10.01 AM
so this time i again get incoming query numbers and hit ratio value and while plotting these by rrdtool, i remove old value ( 10.00 AM ) from current value ( 10.01 AM) and get actual value.

same fashion, i run above logic for time frame.

Kindly correct me , if i am running wrong logic.

when i run rndc stats , it gives me full outpur.can i get only certain output from it by any command or something?

My concern is that to find QPS / no. of queries per RR / hit ratio.

Best Regards,
Ben
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".]



_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to