Extracting stats from BIND XML stats file : issues

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Extracting stats from BIND XML stats file : issues

blrmaani
Hi,
  I am trying to get Ipv4 query rate for our DNS server. I am taking 2 snapshots with a delay of 60 seconds between these snapshots.

curl <dns-server>:<port>   > /tmp/snapshot1.xml
sleep 60
curl <dns-server>:<port>   > /tmp/snapshot2.xml


I am calculating queryrate as below

query_rate = (Queryv4_value2 - Queryv4_value1) / (current_time2 - current_time1)

where Queryv4 values are the values extracted from XML file and current_time are the values from XML files ( and I am converting this to epoch to get number of seconds between these snapshots which is typically 60 seconds)

        <current-time>2012-08-07T21:47:36Z</current-time>

Here is the issue:
I am sending approx 200 'A' queries to the DNS server and my above calculation is showing a value of 2 queries-per-second.

What am I doing wrong?

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

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Extracting stats from BIND XML stats file : issues

blrmaani
On Wednesday, January 13, 2016 at 11:34:16 AM UTC-8, blrmaani wrote:

> Hi,
>   I am trying to get Ipv4 query rate for our DNS server. I am taking 2 snapshots with a delay of 60 seconds between these snapshots.
>
> curl <dns-server>:<port>   > /tmp/snapshot1.xml
> sleep 60
> curl <dns-server>:<port>   > /tmp/snapshot2.xml
>
>
> I am calculating queryrate as below
>
> query_rate = (Queryv4_value2 - Queryv4_value1) / (current_time2 - current_time1)
>
> where Queryv4 values are the values extracted from XML file and current_time are the values from XML files ( and I am converting this to epoch to get number of seconds between these snapshots which is typically 60 seconds)
>
>         <current-time>2012-08-07T21:47:36Z</current-time>
>
> Here is the issue:
> I am sending approx 200 'A' queries to the DNS server and my above calculation is showing a value of 2 queries-per-second.
>
> What am I doing wrong?
>
> thanks
> Blr

Sorry, missed some references during earlier post:

https://deepthought.isc.org/article/AA-00769/0

The time extracted from XML file is as below:
        <current-time>2012-08-07T21:47:36Z</current-time>



The Queryv4 from XML looks as below:
...

            <name>Queryv4</name>
            <counter>31129</counter>

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

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Extracting stats from BIND XML stats file : issues

John Wobus
I haven’t used the XML stats so I have no direct experience.
Your formula looks right to me.

If it were me, I’d confirm the load traffic as much as I could,
e.g. os udp counts, tcpdumps at both ends, etc.  I’d
want to make sure it was bind that was doing something strange.

It occurred to me that a bind rrl configuration could affect
this, but a little thought told me that was unlikely to be the
issue.

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

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Extracting stats from BIND XML stats file : issues

Phil Mayers
In reply to this post by blrmaani
On 13/01/2016 19:38, blrmaani wrote:

>> Here is the issue:
>> I am sending approx 200 'A' queries to the DNS server and my above calculation is showing a value of 2 queries-per-second.

Does the XML value you're looking at measure outbound or inbound
queries, and are the queries you're sending being served from cache,
being recursed, or served from authoritative zones?

Which statistics version is this? On bind 9.10 the:

statistics/server/counters[type="opcode"]/counter[name="QUERY"]
statistics/server/counters[type="nsstat"]/counter[name="Request*"]

...give expected and agreeing values for me.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users