From: Ruben Kerkhof Date: Sun, 14 Dec 2014 10:33:30 +0000 (+0100) Subject: Count the number of NOTIFY packets received X-Git-Tag: rec-3.7.0-rc1~109^2~14^2~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93aecccc0efd2a8cec5a56207ea890a2b8eb1555;p=pdns Count the number of NOTIFY packets received --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index c1abe1d26..a2ab02f9d 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -251,6 +251,8 @@ void declareStats(void) S.declare("dnsupdate-refused", "DNS update packets that are refused."); S.declare("dnsupdate-changes", "DNS update changes to records in total."); + S.declare("incoming-notifications", "NOTIFY packets received."); + S.declare("uptime", "Uptime of process in seconds", uptimeOfProcess); S.declare("sys-msec", "Number of msec spent in system time", getSysUserTimeMsec); S.declare("user-msec", "Number of msec spent in user time", getSysUserTimeMsec); diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 12a5968b5..3c461502c 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -1054,6 +1054,7 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse) return r; } else if(p->d.opcode==Opcode::Notify) { + S.inc("incoming-notifications"); int res=processNotify(p); if(res>=0) { r->setRcode(res);