mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-23 16:20:26 -05:00
- unbound-control stats has mem.streamwait that counts TCP and TLS
waiting result buffers. git-svn-id: file:///svn/unbound/trunk@5050 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
4481b9584c
commit
8b18d1a0a4
6 changed files with 19 additions and 4 deletions
|
|
@ -789,7 +789,8 @@ print_longnum(RES* ssl, const char* desc, size_t x)
|
||||||
|
|
||||||
/** print mem stats */
|
/** print mem stats */
|
||||||
static int
|
static int
|
||||||
print_mem(RES* ssl, struct worker* worker, struct daemon* daemon)
|
print_mem(RES* ssl, struct worker* worker, struct daemon* daemon,
|
||||||
|
struct ub_stats_info* s)
|
||||||
{
|
{
|
||||||
size_t msg, rrset, val, iter, respip;
|
size_t msg, rrset, val, iter, respip;
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
|
|
@ -847,6 +848,9 @@ print_mem(RES* ssl, struct worker* worker, struct daemon* daemon)
|
||||||
dnscrypt_nonce))
|
dnscrypt_nonce))
|
||||||
return 0;
|
return 0;
|
||||||
#endif /* USE_DNSCRYPT */
|
#endif /* USE_DNSCRYPT */
|
||||||
|
if(!print_longnum(ssl, "mem.streamwait"SQ,
|
||||||
|
(size_t)s->svr.mem_stream_wait))
|
||||||
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1088,7 +1092,7 @@ do_stats(RES* ssl, struct daemon_remote* rc, int reset)
|
||||||
if(!print_uptime(ssl, rc->worker, reset))
|
if(!print_uptime(ssl, rc->worker, reset))
|
||||||
return;
|
return;
|
||||||
if(daemon->cfg->stat_extended) {
|
if(daemon->cfg->stat_extended) {
|
||||||
if(!print_mem(ssl, rc->worker, daemon))
|
if(!print_mem(ssl, rc->worker, daemon, &total))
|
||||||
return;
|
return;
|
||||||
if(!print_hist(ssl, &total))
|
if(!print_hist(ssl, &total))
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,7 @@ server_stats_compile(struct worker* worker, struct ub_stats_info* s, int reset)
|
||||||
}
|
}
|
||||||
lock_rw_unlock(&worker->env.auth_zones->lock);
|
lock_rw_unlock(&worker->env.auth_zones->lock);
|
||||||
}
|
}
|
||||||
|
s->svr.mem_stream_wait = tcp_req_info_get_stream_buffer_size();
|
||||||
|
|
||||||
/* Set neg cache usage numbers */
|
/* Set neg cache usage numbers */
|
||||||
set_neg_cache_stats(worker, &s->svr, reset);
|
set_neg_cache_stats(worker, &s->svr, reset);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
22 January 2018: Wouter
|
22 January 2018: Wouter
|
||||||
- Fix space calculation for tcp req buffer size.
|
- Fix space calculation for tcp req buffer size.
|
||||||
- Doc for stream-wait-size and unit test.
|
- Doc for stream-wait-size and unit test.
|
||||||
|
- unbound-control stats has mem.streamwait that counts TCP and TLS
|
||||||
|
waiting result buffers.
|
||||||
|
|
||||||
21 January 2018: Wouter
|
21 January 2018: Wouter
|
||||||
- Fix tcp idle timeout test, for difference in the tcp reply code.
|
- Fix tcp idle timeout test, for difference in the tcp reply code.
|
||||||
|
|
|
||||||
|
|
@ -499,6 +499,10 @@ Memory in bytes in use by the iterator module.
|
||||||
Memory in bytes in use by the validator module. Includes the key cache and
|
Memory in bytes in use by the validator module. Includes the key cache and
|
||||||
negative cache.
|
negative cache.
|
||||||
.TP
|
.TP
|
||||||
|
.I mem.streamwait
|
||||||
|
Memory in bytes in used by the TCP and TLS stream wait buffers. These are
|
||||||
|
answers waiting to be written back to the clients.
|
||||||
|
.TP
|
||||||
.I histogram.<sec>.<usec>.to.<sec>.<usec>
|
.I histogram.<sec>.<usec>.to.<sec>.<usec>
|
||||||
Shows a histogram, summed over all threads. Every element counts the
|
Shows a histogram, summed over all threads. Every element counts the
|
||||||
recursive queries whose reply time fit between the lower and upper bound.
|
recursive queries whose reply time fit between the lower and upper bound.
|
||||||
|
|
|
||||||
|
|
@ -770,6 +770,8 @@ struct ub_server_stats {
|
||||||
/** number of queries answered from edns-subnet specific data, and
|
/** number of queries answered from edns-subnet specific data, and
|
||||||
* the answer was from the edns-subnet cache. */
|
* the answer was from the edns-subnet cache. */
|
||||||
long long num_query_subnet_cache;
|
long long num_query_subnet_cache;
|
||||||
|
/** number of bytes in the stream wait buffers */
|
||||||
|
long long mem_stream_wait;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,8 @@ static void print_uptime(struct ub_shm_stat_info* shm_stat)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** print memory usage */
|
/** print memory usage */
|
||||||
static void print_mem(struct ub_shm_stat_info* shm_stat)
|
static void print_mem(struct ub_shm_stat_info* shm_stat,
|
||||||
|
struct ub_stats_info* s)
|
||||||
{
|
{
|
||||||
PR_LL("mem.cache.rrset", shm_stat->mem.rrset);
|
PR_LL("mem.cache.rrset", shm_stat->mem.rrset);
|
||||||
PR_LL("mem.cache.message", shm_stat->mem.msg);
|
PR_LL("mem.cache.message", shm_stat->mem.msg);
|
||||||
|
|
@ -266,6 +267,7 @@ static void print_mem(struct ub_shm_stat_info* shm_stat)
|
||||||
PR_LL("mem.cache.dnscrypt_nonce",
|
PR_LL("mem.cache.dnscrypt_nonce",
|
||||||
shm_stat->mem.dnscrypt_nonce);
|
shm_stat->mem.dnscrypt_nonce);
|
||||||
#endif
|
#endif
|
||||||
|
PR_LL("mem.streamwait", s->svr.mem_stream_wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** print histogram */
|
/** print histogram */
|
||||||
|
|
@ -399,7 +401,7 @@ static void do_stats_shm(struct config_file* cfg, struct ub_stats_info* stats,
|
||||||
pr_stats("total", &stats[0]);
|
pr_stats("total", &stats[0]);
|
||||||
print_uptime(shm_stat);
|
print_uptime(shm_stat);
|
||||||
if(cfg->stat_extended) {
|
if(cfg->stat_extended) {
|
||||||
print_mem(shm_stat);
|
print_mem(shm_stat, &stats[0]);
|
||||||
print_hist(stats);
|
print_hist(stats);
|
||||||
print_extended(stats);
|
print_extended(stats);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue