]> 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)
committerAram Sargsyan <aram@isc.org>
Wed, 31 May 2023 09:08:58 +0000 (09:08 +0000)
This counter indicates the number of the resolver's spilled
queries due to reaching the clients per query quota.

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

index ce324f991d10df6964c3a3564c0c3490277fe272..bbb402262e0946a5970d58e3e6b93a4d0326a206 100644 (file)
@@ -464,6 +464,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 7b1b03e3a34af072f4931c6982d83bb89968f71b..7a9f7143e2ef19797d295c14862c5d91e86d9eb0 100644 (file)
@@ -71,9 +71,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 3295b55a9a0df6040745e9018db644962f15e4b3..ce0d7bc389852b8eca1065df0dca02feb95d70d4 100644 (file)
@@ -10399,6 +10399,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;
                        }