mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 16:45:24 +00:00
Added TCP high-water statistics variable
This variable will report the maximum number of simultaneous tcp clients that BIND has served while running. It can be verified by running rndc status, then inspect "tcp high-water: count", or by generating statistics file, rndc stats, then inspect the line with "TCP connection high-water" text. The tcp-highwater variable is atomically updated based on an existing tcp-quota system handled in ns/client.c.
This commit is contained in:
committed by
Ondřej Surý
parent
a544e2e300
commit
66fe8627de
@@ -3400,7 +3400,6 @@ client_accept(ns_client_t *client) {
|
||||
isc_result_t result;
|
||||
|
||||
CTRACE("accept");
|
||||
|
||||
/*
|
||||
* Set up a new TCP connection. This means try to attach to the
|
||||
* TCP client quota (tcp-clients), but fail if we're over quota.
|
||||
@@ -3451,6 +3450,12 @@ client_accept(ns_client_t *client) {
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* TCP high-water stats update. */
|
||||
unsigned int curr_tcpquota = isc_quota_getused(&client->sctx->tcpquota);
|
||||
ns_stats_update_if_greater(client->sctx->nsstats,
|
||||
ns_statscounter_tcphighwater,
|
||||
curr_tcpquota);
|
||||
|
||||
/*
|
||||
* If this client was set up using get_client() or get_worker(),
|
||||
* then TCP is already marked active. However, if it was restarted
|
||||
|
Reference in New Issue
Block a user