2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Merge branch 'aram/statschannel-spilled-clients-counter' into 'main'

Add ClientQuota statistics channel counter

See merge request isc-projects/bind9!7978
This commit is contained in:
Arаm Sаrgsyаn
2023-05-31 09:52:29 +00:00
5 changed files with 59 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
6185. [func] Add "ClientQuota" statistics channel counter, which
indicates the number of the resolver's spilled queries
due to reaching the clients per query quota. [GL !7978]
6184. [func] Special-case code that was added to allow GSS-TSIG 6184. [func] Special-case code that was added to allow GSS-TSIG
to work around bugs in the Windows 2000 version of to work around bugs in the Windows 2000 version of
Active Directory has been removed. The 'nsupdate -o' Active Directory has been removed. The 'nsupdate -o'

View File

@@ -464,6 +464,8 @@ init_desc(void) {
SET_RESSTATDESC(zonequota, "spilled due to zone quota", "ZoneQuota"); SET_RESSTATDESC(zonequota, "spilled due to zone quota", "ZoneQuota");
SET_RESSTATDESC(serverquota, "spilled due to server quota", SET_RESSTATDESC(serverquota, "spilled due to server quota",
"ServerQuota"); "ServerQuota");
SET_RESSTATDESC(clientquota, "spilled due to clients per query quota",
"ClientQuota");
SET_RESSTATDESC(nextitem, "waited for next item", "NextItem"); SET_RESSTATDESC(nextitem, "waited for next item", "NextItem");
SET_RESSTATDESC(priming, "priming queries", "Priming"); SET_RESSTATDESC(priming, "priming queries", "Priming");

View File

@@ -7917,6 +7917,12 @@ Resolver Statistics Counters
``QuerySockFail`` ``QuerySockFail``
This indicates the number of failures in opening query sockets. One common reason for such failures is due to a limitation on file descriptors. This indicates the number of failures in opening query sockets. One common reason for such failures is due to a limitation on file descriptors.
``QueryCurUDP``
This indicates the number of UDP queries in progress.
``QueryCurTCP``
This indicates the number of TCP queries in progress.
``QueryTimeout`` ``QueryTimeout``
This indicates the number of query timeouts. This indicates the number of query timeouts.
@@ -7947,6 +7953,48 @@ Resolver Statistics Counters
``QryRTTnn`` ``QryRTTnn``
This provides a frequency table on query round-trip times (RTTs). Each ``nn`` specifies the corresponding frequency. In the sequence of ``nn_1``, ``nn_2``, ..., ``nn_m``, the value of ``nn_i`` is the number of queries whose RTTs are between ``nn_(i-1)`` (inclusive) and ``nn_i`` (exclusive) milliseconds. For the sake of convenience, we define ``nn_0`` to be 0. The last entry should be represented as ``nn_m+``, which means the number of queries whose RTTs are equal to or greater than ``nn_m`` milliseconds. This provides a frequency table on query round-trip times (RTTs). Each ``nn`` specifies the corresponding frequency. In the sequence of ``nn_1``, ``nn_2``, ..., ``nn_m``, the value of ``nn_i`` is the number of queries whose RTTs are between ``nn_(i-1)`` (inclusive) and ``nn_i`` (exclusive) milliseconds. For the sake of convenience, we define ``nn_0`` to be 0. The last entry should be represented as ``nn_m+``, which means the number of queries whose RTTs are equal to or greater than ``nn_m`` milliseconds.
``NumFetch``
This indicates the number of active fetches.
``BucketSize``
This indicates the number the resolver's internal buckets (a static number).
``REFUSED``
This indicates the number of REFUSED responses received.
``ClientCookieOut``
This indicates the number of COOKIE sent with client cookie only.
``ServerCookieOut``
This indicates the number of COOKIE sent with client and server cookie.
``CookieIn``
This indicates the number of COOKIE replies received.
``CookieClientOk``
This indicates the number of COOKIE client ok.
``BadEDNSVersion``
This indicates the number of bad EDNS version replies received.
``BadCookieRcode``
This indicates the number of bad cookie rcode replies received.
``ZoneQuota``
This indicates the number of queries spilled due to zone quota.
``ServerQuota``
This indicates the number of queries spilled due to server quota.
``ClientQuota``
This indicates the number of queries spilled due to clients per query quota.
``NextItem``
This indicates the number of waits for next item, when an invalid response is received.
``Priming``
This indicates the number of priming fetches performed by the resolver.
.. _socket_stats: .. _socket_stats:
Socket I/O Statistics Counters Socket I/O Statistics Counters

View File

@@ -71,9 +71,10 @@ enum {
dns_resstatscounter_badcookie = 40, dns_resstatscounter_badcookie = 40,
dns_resstatscounter_zonequota = 41, dns_resstatscounter_zonequota = 41,
dns_resstatscounter_serverquota = 42, dns_resstatscounter_serverquota = 42,
dns_resstatscounter_nextitem = 43, dns_resstatscounter_clientquota = 43,
dns_resstatscounter_priming = 44, dns_resstatscounter_nextitem = 44,
dns_resstatscounter_max = 45, dns_resstatscounter_priming = 45,
dns_resstatscounter_max = 46,
/* /*
* DNSSEC stats. * DNSSEC stats.

View File

@@ -10399,6 +10399,7 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name,
fctx->spilled = true; fctx->spilled = true;
} }
if (fctx->spilled) { if (fctx->spilled) {
inc_stats(res, dns_resstatscounter_clientquota);
result = DNS_R_DROP; result = DNS_R_DROP;
goto unlock; goto unlock;
} }