* `answers1-10`: counts the number of queries answered within 10 milliseconds
* `answers10-100`: counts the number of queries answered within 100 milliseconds
* `answers100-1000`: counts the number of queries answered within 1 second
-* `auth-answers-slow`: counts the number of queries answered by auths after 1 second (4.0)
-* `auth-answers0-1`: counts the number of queries answered by auths within 1 millisecond (4.0)
-* `auth-answers1-10`: counts the number of queries answered by auths within 10 milliseconds (4.0)
-* `auth-answers10-100`: counts the number of queries answered by auths within 100 milliseconds (4.0)
-* `auth-answers100-1000`: counts the number of queries answered by auths within 1 second (4.0)
+* `auth4-answers-slow`: counts the number of queries answered by auth4s after 1 second (4.0)
+* `auth4-answers0-1`: counts the number of queries answered by auth4s within 1 millisecond (4.0)
+* `auth4-answers1-10`: counts the number of queries answered by auth4s within 10 milliseconds (4.0)
+* `auth4-answers10-100`: counts the number of queries answered by auth4s within 100 milliseconds (4.0)
+* `auth4-answers100-1000`: counts the number of queries answered by auth4s within 1 second (4.0)
+* `auth6-answers-slow`: counts the number of queries answered by auth6s after 1 second (4.0)
+* `auth6-answers0-1`: counts the number of queries answered by auth6s within 1 millisecond (4.0)
+* `auth6-answers1-10`: counts the number of queries answered by auth6s within 10 milliseconds (4.0)
+* `auth6-answers10-100`: counts the number of queries answered by auth6s within 100 milliseconds (4.0)
+* `auth6-answers100-1000`: counts the number of queries answered by auth6s within 1 second (4.0)
* `cache-bytes`: size of the cache in bytes (since 3.3.1)
* `cache-entries`: shows the number of entries in the cache
* `cache-hits`: counts the number of cache hits since starting, this does **not** include hits that got answered from the packet-cache
* `nsspeeds-entries`: shows the number of entries in the NS speeds map
* `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
+* `outgoing4-timeouts`: counts the number of timeouts on outgoing UDP IPv4 queries since starting (since 4.0)
+* `outgoing6-timeouts`: counts the number of timeouts on outgoing UDP IPv6 queries since starting (since 4.0)
* `over-capacity-drops`: questions dropped because over maximum concurrent query limit (since 3.2)
* `packetcache-bytes`: size of the packet cache in bytes (since 3.3.1)
* `packetcache-entries`: size of packet cache (since 3.2)
addGetStat("answers100-1000", &g_stats.answers100_1000);
addGetStat("answers-slow", &g_stats.answersSlow);
- addGetStat("auth-answers0-1", &g_stats.authAnswers0_1);
- addGetStat("auth-answers1-10", &g_stats.authAnswers1_10);
- addGetStat("auth-answers10-100", &g_stats.authAnswers10_100);
- addGetStat("auth-answers100-1000", &g_stats.authAnswers100_1000);
- addGetStat("auth-answers-slow", &g_stats.authAnswersSlow);
+ addGetStat("auth4-answers0-1", &g_stats.auth4Answers0_1);
+ addGetStat("auth4-answers1-10", &g_stats.auth4Answers1_10);
+ addGetStat("auth4-answers10-100", &g_stats.auth4Answers10_100);
+ addGetStat("auth4-answers100-1000", &g_stats.auth4Answers100_1000);
+ addGetStat("auth4-answers-slow", &g_stats.auth4AnswersSlow);
+
+ addGetStat("auth6-answers0-1", &g_stats.auth6Answers0_1);
+ addGetStat("auth6-answers1-10", &g_stats.auth6Answers1_10);
+ addGetStat("auth6-answers10-100", &g_stats.auth6Answers10_100);
+ addGetStat("auth6-answers100-1000", &g_stats.auth6Answers100_1000);
+ addGetStat("auth6-answers-slow", &g_stats.auth6AnswersSlow);
+
addGetStat("qa-latency", doGetAvgLatencyUsec);
addGetStat("unexpected-packets", &g_stats.unexpectedCount);
addGetStat("concurrent-queries", boost::bind(getConcurrentQueries));
addGetStat("security-status", &g_security_status);
addGetStat("outgoing-timeouts", &SyncRes::s_outgoingtimeouts);
+ addGetStat("outgoing4-timeouts", &SyncRes::s_outgoing4timeouts);
+ addGetStat("outgoing6-timeouts", &SyncRes::s_outgoing6timeouts);
addGetStat("tcp-outqueries", &SyncRes::s_tcpoutqueries);
addGetStat("all-outqueries", &SyncRes::s_outqueries);
addGetStat("ipv6-outqueries", &g_stats.ipv6queries);
unsigned int SyncRes::s_serverdownthrottletime;
uint64_t SyncRes::s_queries;
uint64_t SyncRes::s_outgoingtimeouts;
+uint64_t SyncRes::s_outgoing4timeouts;
+uint64_t SyncRes::s_outgoing6timeouts;
uint64_t SyncRes::s_outqueries;
uint64_t SyncRes::s_tcpoutqueries;
uint64_t SyncRes::s_throttledqueries;
bool SyncRes::s_noEDNSPing;
bool SyncRes::s_noEDNS;
-void accountAuthLatency(int usec)
+void accountAuthLatency(int usec, int family)
{
- if(usec < 1000)
- g_stats.authAnswers0_1++;
- else if(usec < 10000)
- g_stats.authAnswers1_10++;
- else if(usec < 100000)
- g_stats.authAnswers10_100++;
- else if(usec < 1000000)
- g_stats.authAnswers100_1000++;
- else
- g_stats.authAnswersSlow++;
+ if(family == AF_INET) {
+ if(usec < 1000)
+ g_stats.auth4Answers0_1++;
+ else if(usec < 10000)
+ g_stats.auth4Answers1_10++;
+ else if(usec < 100000)
+ g_stats.auth4Answers10_100++;
+ else if(usec < 1000000)
+ g_stats.auth4Answers100_1000++;
+ else
+ g_stats.auth4AnswersSlow++;
+ } else {
+ if(usec < 1000)
+ g_stats.auth6Answers0_1++;
+ else if(usec < 10000)
+ g_stats.auth6Answers1_10++;
+ else if(usec < 100000)
+ g_stats.auth6Answers10_100++;
+ else if(usec < 1000000)
+ g_stats.auth6Answers100_1000++;
+ else
+ g_stats.auth6AnswersSlow++;
+ }
+
}
SyncRes::SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_unreachables(0),
throw ImmediateServFailException("Query killed by policy");
d_totUsec += lwr.d_usec;
- accountAuthLatency(lwr.d_usec);
+ accountAuthLatency(lwr.d_usec, remoteIP->sin4.sin_family);
if(resolveret != 1) {
if(resolveret==0) {
LOG(prefix<<qname.toString()<<": timeout resolving after "<<lwr.d_usec/1000.0<<"msec "<< (doTCP ? "over TCP" : "")<<endl);
d_timeouts++;
s_outgoingtimeouts++;
+ if(remoteIP->sin4.sin_family == AF_INET)
+ s_outgoing4timeouts++;
+ else
+ s_outgoing6timeouts++;
}
else if(resolveret==-2) {
LOG(prefix<<qname.toString()<<": hit a local resource limit resolving"<< (doTCP ? " over TCP" : "")<<", probable error: "<<stringerror()<<endl);
static uint64_t s_queries;
static uint64_t s_outgoingtimeouts;
+ static uint64_t s_outgoing4timeouts;
+ static uint64_t s_outgoing6timeouts;
static uint64_t s_throttledqueries;
static uint64_t s_dontqueries;
static uint64_t s_outqueries;
uint64_t nxDomains;
uint64_t noErrors;
uint64_t answers0_1, answers1_10, answers10_100, answers100_1000, answersSlow;
- uint64_t authAnswers0_1, authAnswers1_10, authAnswers10_100, authAnswers100_1000, authAnswersSlow;
+ uint64_t auth4Answers0_1, auth4Answers1_10, auth4Answers10_100, auth4Answers100_1000, auth4AnswersSlow;
+ uint64_t auth6Answers0_1, auth6Answers1_10, auth6Answers10_100, auth6Answers100_1000, auth6AnswersSlow;
double avgLatencyUsec;
uint64_t qcounter; // not increased for unauth packets
uint64_t ipv6qcounter;