]> granicus.if.org Git - pdns/commitdiff
implement AND DOCUMENT (wow!) ipv6-questions metric - patch including docs (WOW!...
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 10 Jan 2013 15:26:43 +0000 (15:26 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 10 Jan 2013 15:26:43 +0000 (15:26 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3034 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/docs/pdns.xml
pdns/pdns_recursor.cc
pdns/rec_channel_rec.cc
pdns/syncres.hh

index 1a4a863cf6b0f15d92b05503e85e50c9aa7fd6cb..29c56d4415d096ff081b20c258b244659d337342 100644 (file)
@@ -13209,6 +13209,7 @@ packetcache-hits    Packet cache hits (since 3.2)
 packetcache-misses  Packet cache misses (since 3.2)
 qa-latency          shows the current latency average, in microseconds
 questions           counts all End-user initiated queries with the RD bit set
+ipv6-questions      counts all End-user initiated queries with the RD bit set, received over IPv6 UDP
 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
index 3a6511cbf6f859a0197f7fe50bdf6ee819f5ce23..2e465c8316a80e849c67b06361daa2090ba85385 100644 (file)
@@ -816,6 +816,8 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcparam_t& )
 string* doProcessUDPQuestion(const std::string& question, const ComboAddress& fromaddr, int fd)
 {
   ++g_stats.qcounter;
+  if(fromaddr.sin4.sin_family==AF_INET6)
+     g_stats.ipv6qcounter++;
 
   string response;
   try {
index 60aecc52777d710d1604df143f66c3175f372e16..7d969d3baca1bc056878df2d36d2304a52eba5c7 100644 (file)
@@ -402,6 +402,7 @@ uint64_t doGetMallocated()
 RecursorControlParser::RecursorControlParser()
 {
   addGetStat("questions", &g_stats.qcounter);
+  addGetStat("ipv6-questions", &g_stats.ipv6qcounter);
   addGetStat("tcp-questions", &g_stats.tcpqcounter);
 
   addGetStat("cache-hits", doGetCacheHits);
index b3ab70567beac9160c6899072aef75c16514d58a..41ab66f1b4b2ab86fba853827149e118f7fd96cb 100644 (file)
@@ -460,6 +460,7 @@ struct RecursorStats
   uint64_t answers0_1, answers1_10, answers10_100, answers100_1000, answersSlow;
   uint64_t avgLatencyUsec;
   uint64_t qcounter;
+  uint64_t ipv6qcounter;
   uint64_t tcpqcounter;
   uint64_t unauthorizedUDP;
   uint64_t unauthorizedTCP;