From: Ruben d'Arco Date: Sun, 3 Mar 2013 10:05:04 +0000 (+0100) Subject: Add rfc2136-changes statbag X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=276a5ce7de95b799e893f5a710b7587763c981dd;p=pdns Add rfc2136-changes statbag --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index d6c6e1cc5..41bfcaaee 100755 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -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"); diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 75665b4e3..c4d705767 100755 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -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) {