]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add ClientQuota statistics channel counter
authorAram Sargsyan <aram@isc.org>
Mon, 29 May 2023 15:19:49 +0000 (15:19 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Wed, 31 May 2023 11:07:08 +0000 (11:07 +0000)
This counter indicates the number of the resolver's spilled
queries due to reaching the clients per query quota.

(cherry picked from commit 04648d7c2f2814623557d6659eff8a547cb32c3a)

bin/named/statschannel.c
lib/dns/include/dns/stats.h
lib/dns/resolver.c

index f6ce4254459c10b1ce9bfa5aab1e6be85bb6d15b..2c4760ca200f2191ca5469239499cca565d5eb25 100644 (file)
@@ -441,6 +441,8 @@ init_desc(void) {
        SET_RESSTATDESC(zonequota, "spilled due to zone quota", "ZoneQuota");
        SET_RESSTATDESC(serverquota, "spilled due to server quota",
                        "ServerQuota");
+       SET_RESSTATDESC(clientquota, "spilled due to clients per query quota",
+                       "ClientQuota");
        SET_RESSTATDESC(nextitem, "waited for next item", "NextItem");
        SET_RESSTATDESC(priming, "priming queries", "Priming");
 
index 1f57810e732164c631f5c1439cec7ba66eac401b..683f870552711ac7c101d884c642e228d195fbe6 100644 (file)
@@ -69,9 +69,10 @@ enum {
        dns_resstatscounter_badcookie = 40,
        dns_resstatscounter_zonequota = 41,
        dns_resstatscounter_serverquota = 42,
-       dns_resstatscounter_nextitem = 43,
-       dns_resstatscounter_priming = 44,
-       dns_resstatscounter_max = 45,
+       dns_resstatscounter_clientquota = 43,
+       dns_resstatscounter_nextitem = 44,
+       dns_resstatscounter_priming = 45,
+       dns_resstatscounter_max = 46,
 
        /*
         * DNSSEC stats.
index b09813d444838929556bc60022ab53723500b3aa..cba590ae6231b4f81f05716cf1868586b5497d64 100644 (file)
@@ -10918,6 +10918,7 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name,
                        fctx->spilled = true;
                }
                if (fctx->spilled) {
+                       inc_stats(res, dns_resstatscounter_clientquota);
                        result = DNS_R_DROP;
                        goto unlock;
                }