]> granicus.if.org Git - pdns/commitdiff
Add rfc2136-changes statbag
authorRuben d'Arco <cyclops@prof-x.net>
Sun, 3 Mar 2013 10:05:04 +0000 (11:05 +0100)
committermind04 <mind04@monshouwer.org>
Fri, 12 Jul 2013 15:26:18 +0000 (17:26 +0200)
pdns/common_startup.cc
pdns/rfc2136handler.cc

index d6c6e1cc50a420229d67e029c6e9f24867dd38b4..41bfcaaee63b505bc63449786cd3b05c38e3c707 100755 (executable)
@@ -178,6 +178,8 @@ void declareStats(void)
   S.declare("rfc2136-queries", "RFC2136 packets received.");
   S.declare("rfc2136-answers", "RFC2136 packets succesfully answered.");
   S.declare("rfc2136-refused", "RFC2136 packets that are refused.");
+  S.declare("rfc2136-changes", "RFC2136 changes to records in total.");
+
 
   S.declare("servfail-packets","Number of times a server-failed packet was sent out");
   S.declare("latency","Average number of microseconds needed to answer a question");
index 75665b4e309de8ae428c3a8a7d11b1edb2e5f837..c4d705767df2a39469a347607118b282557d4eca 100755 (executable)
@@ -12,6 +12,7 @@
 #include "backends/gsql/ssql.hh"
 
 extern PacketCache PC;
+extern StatBag S;
 
 pthread_mutex_t PacketHandler::s_rfc2136lock=PTHREAD_MUTEX_INITIALIZER;
 
@@ -715,6 +716,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
     // Section 3.6 - Update the SOA serial - outside of performUpdate because we do a SOA update for the complete update message
     if (changedRecords > 0 && !updatedSerial)
       increaseSerial(msgPrefix, &di, haveNSEC3, narrow, &ns3pr);
+    S.deposit("rfc2136-changes", changedRecords);
 
   }
   catch (DBException &e) {