I need to find out the number of queries that my BIND server is handling a month. I have dumped the stats out to named.stats, but I am having problems understanding it. How can I find out what time period the statistics cover? I assume that it isn't just since the last time "rndc stats" was run, as running twice, with 15 seconds between them gives me something in the range of "36xxx QUERY" under "++ INCOMING REQUESTS ++", and, while the domain gets a decent amount of traffic, it isn't getting 2400 queries a second (basing that off of some statistics I found about 1-2 million visitors per day sites being under 200 queries per second.)

What am I missing about interpreting these stats?

  • Check you named.conf if you have logging enabled for queries and also if your logfile isn't cropped too soon for gathering statistics for a whole month. Then you can parse that with a simple shellscript. – r_3 Jan 9 '15 at 16:59

The statistics of rndc stats are from the start of the named process until now.
Running rndc stats does not reset them, they will just continue counting up.
If you want to find out the monthly queries, you'll need to run rndc stats every 4 weeks and calculate the monthly number yourself.

  • Unfortunately the 4 week approach is very fragile when it comes to intermittent restarts: if you aren't saving that information before every process teardown, your numbers will be way off. Whenever possible it's best to collect this information from the load balancer sitting in front of your servers. (that said, I upvoted anyway) – Andrew B Jan 8 '15 at 23:11
  • That is true of course, I left it as an exercise to the reader to increase the frequency to a better value. – faker Jan 9 '15 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.