<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Statistics</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PowerDNS manual" HREF="index.html"><LINK REL="UP" TITLE="PowerDNS resolver/recursing nameserver" HREF="built-in-recursor.html"><LINK REL="PREVIOUS" TITLE="Details" HREF="recursor-details.html"><LINK REL="NEXT" TITLE="Design and Engineering of the PowerDNS Recursor" HREF="recursor-design-and-engineering.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PowerDNS manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="recursor-details.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 12. PowerDNS resolver/recursing nameserver</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="recursor-design-and-engineering.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="RECURSOR-STATS" >12.5. Statistics</A ></H1 ><P > The <B CLASS="COMMAND" >rec_control get</B > command can be used to query the following keys, either single keys or multiple keys at once: <PRE CLASS="SCREEN" >all-outqueries counts the number of outgoing UDP queries since starting answers0-1 counts the number of queries answered within 1 milisecond answers100-1000 counts the number of queries answered within 1 second answers10-100 counts the number of queries answered within 100 miliseconds answers1-10 counts the number of queries answered within 10 miliseconds answers-slow counts the number of queries answered after 1 second cache-entries shows the number of entries in the cache cache-hits counts the number of cache hits since starting cache-misses counts the number of cache misses since starting chain-resends number of queries chained to existing outstanding query client-parse-errors counts number of client packets that could not be parsed concurrent-queries shows the number of MThreads currently running dlg-only-drops number of records dropped because of delegation only setting negcache-entries shows the number of entries in the Negative answer cache noerror-answers counts the number of times it answered NOERROR since starting nsspeeds-entries shows the number of entries in the NS speeds map nsset-invalidations number of times an nsset was dropped because it no longer worked nxdomain-answers counts the number of times it answered NXDOMAIN since starting outgoing-timeouts counts the number of timeouts on outgoing UDP queries since starting qa-latency shows the current latency average questions counts all End-user initiated queries with the RD bit set resource-limits counts number of queries that could not be performed because of resource limits server-parse-errors counts number of server replied packets that could not be parsed servfail-answers counts the number of times it answered SERVFAIL since starting spoof-prevents number of times PowerDNS considered itself spoofed, and dropped the data sys-msec number of CPU milliseconds spent in 'system' mode tcp-client-overflow number of times an IP address was denied TCP access because it already had too many connections tcp-outqueries counts the number of outgoing TCP queries since starting tcp-questions counts all incoming TCP queries (since starting) throttled-out counts the number of throttled outgoing UDP queries since starting throttle-entries shows the number of entries in the throttle map unauthorized-tcp number of TCP questions denied because of allow-from restrictions unauthorized-udp number of UDP questions denied because of allow-from restrictions unexpected-packets number of answers from remote servers that were unexpected (might point to spoofing) uptime number of seconds process has been running (since 3.1.5) user-msec number of CPU milliseconds spent in 'user' mode </PRE > In the <TT CLASS="FILENAME" >rrd/</TT > subdirectory a number of rrdtool scripts is provided to make nice graphs of all these numbers. </P ><P > Every half our or so, the recursor outputs a line with statistics. More infrastructure is planned so as to allow for Cricket or MRTG graphs. To force the output of statistics, send the process a SIGUSR1. A line of statistics looks like this: <PRE CLASS="SCREEN" >Feb 10 14:16:03 stats: 125784 questions, 13971 cache entries, 309 negative entries, 84% cache hits, outpacket/query ratio 37%, 12% throttled</PRE > This means that there are 13791 different names cached, which each may have multiple records attached to them. There are 309 items in the negative cache, items of which it is known that don't exist and won't do so for the near future. 84% of incoming questions could be answered without any additional queries going out to the net. </P ><P > The outpacket/query ratio means that on average, 0.37 packets were needed to answer a question. Initially this ratio may be well over 100% as additional queries may be needed to actually recurse the DNS and figure out the addresses of nameservers. </P ><P > Finally, 12% of queries were not performed because identical queries had gone out previously, saving load servers worldwide. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="recursor-details.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="recursor-design-and-engineering.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Details</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="built-in-recursor.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Design and Engineering of the PowerDNS Recursor</TD ></TR ></TABLE ></DIV ></BODY ></HTML >