mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Patch for server.num.zero_ttl stats for count of expired replies,
from Pavel Odintsov. git-svn-id: file:///svn/unbound/trunk@3910 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
27182d614b
commit
96961081b0
6 changed files with 19 additions and 1 deletions
|
|
@ -760,6 +760,8 @@ print_stats(SSL* ssl, const char* nm, struct stats_info* s)
|
||||||
(unsigned long)s->svr.num_queries_missed_cache)) return 0;
|
(unsigned long)s->svr.num_queries_missed_cache)) return 0;
|
||||||
if(!ssl_printf(ssl, "%s.num.prefetch"SQ"%lu\n", nm,
|
if(!ssl_printf(ssl, "%s.num.prefetch"SQ"%lu\n", nm,
|
||||||
(unsigned long)s->svr.num_queries_prefetch)) return 0;
|
(unsigned long)s->svr.num_queries_prefetch)) return 0;
|
||||||
|
if(!ssl_printf(ssl, "%s.num.zero_ttl"SQ"%lu\n", nm,
|
||||||
|
(unsigned long)s->svr.zero_ttl_responses)) return 0;
|
||||||
if(!ssl_printf(ssl, "%s.num.recursivereplies"SQ"%lu\n", nm,
|
if(!ssl_printf(ssl, "%s.num.recursivereplies"SQ"%lu\n", nm,
|
||||||
(unsigned long)s->mesh_replies_sent)) return 0;
|
(unsigned long)s->mesh_replies_sent)) return 0;
|
||||||
if(!ssl_printf(ssl, "%s.requestlist.avg"SQ"%g\n", nm,
|
if(!ssl_printf(ssl, "%s.requestlist.avg"SQ"%g\n", nm,
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,7 @@ void server_stats_add(struct stats_info* total, struct stats_info* a)
|
||||||
total->svr.qEDNS += a->svr.qEDNS;
|
total->svr.qEDNS += a->svr.qEDNS;
|
||||||
total->svr.qEDNS_DO += a->svr.qEDNS_DO;
|
total->svr.qEDNS_DO += a->svr.qEDNS_DO;
|
||||||
total->svr.ans_rcode_nodata += a->svr.ans_rcode_nodata;
|
total->svr.ans_rcode_nodata += a->svr.ans_rcode_nodata;
|
||||||
|
total->svr.zero_ttl_responses += a->svr.zero_ttl_responses;
|
||||||
total->svr.ans_secure += a->svr.ans_secure;
|
total->svr.ans_secure += a->svr.ans_secure;
|
||||||
total->svr.ans_bogus += a->svr.ans_bogus;
|
total->svr.ans_bogus += a->svr.ans_bogus;
|
||||||
total->svr.rrset_bogus += a->svr.rrset_bogus;
|
total->svr.rrset_bogus += a->svr.rrset_bogus;
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,8 @@ struct server_stats {
|
||||||
size_t unwanted_queries;
|
size_t unwanted_queries;
|
||||||
/** usage of tcp accept list */
|
/** usage of tcp accept list */
|
||||||
size_t tcp_accept_usage;
|
size_t tcp_accept_usage;
|
||||||
|
/** answers served from expired cache */
|
||||||
|
size_t zero_ttl_responses;
|
||||||
/** histogram data exported to array
|
/** histogram data exported to array
|
||||||
* if the array is the same size, no data is lost, and
|
* if the array is the same size, no data is lost, and
|
||||||
* if all histograms are same size (is so by default) then
|
* if all histograms are same size (is so by default) then
|
||||||
|
|
|
||||||
|
|
@ -563,6 +563,10 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
||||||
return 0;
|
return 0;
|
||||||
/* below, rrsets with ttl before timenow become TTL 0 in
|
/* below, rrsets with ttl before timenow become TTL 0 in
|
||||||
* the response */
|
* the response */
|
||||||
|
/* This response was served with zero TTL */
|
||||||
|
if (timenow >= rep->ttl) {
|
||||||
|
worker->stats.zero_ttl_responses++;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* see if it is possible */
|
/* see if it is possible */
|
||||||
if(rep->ttl < timenow) {
|
if(rep->ttl < timenow) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
28 October 2016: Wouter
|
||||||
|
- Patch for server.num.zero_ttl stats for count of expired replies,
|
||||||
|
from Pavel Odintsov.
|
||||||
|
|
||||||
26 October 2016: Wouter
|
26 October 2016: Wouter
|
||||||
- Fix unit tests for openssl 1.1, with no DSA, by faking DSA, enabled
|
- Fix unit tests for openssl 1.1, with no DSA, by faking DSA, enabled
|
||||||
with the undocumented switch 'fake-dsa'. It logs a warning.
|
with the undocumented switch 'fake-dsa'. It logs a warning.
|
||||||
|
|
|
||||||
|
|
@ -316,6 +316,9 @@ and resulted in recursive processing, taking a slot in the requestlist.
|
||||||
Not part of the recursivereplies (or the histogram thereof) or cachemiss,
|
Not part of the recursivereplies (or the histogram thereof) or cachemiss,
|
||||||
as a cache response was sent.
|
as a cache response was sent.
|
||||||
.TP
|
.TP
|
||||||
|
.I threadX.num.zero_ttl
|
||||||
|
number of replies with ttl zero, because they served an expired cache entry.
|
||||||
|
.TP
|
||||||
.I threadX.num.recursivereplies
|
.I threadX.num.recursivereplies
|
||||||
The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries.
|
The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries.
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -365,6 +368,9 @@ summed over threads.
|
||||||
.I total.num.prefetch
|
.I total.num.prefetch
|
||||||
summed over threads.
|
summed over threads.
|
||||||
.TP
|
.TP
|
||||||
|
.I total.num.zero_ttl
|
||||||
|
summed over threads.
|
||||||
|
.TP
|
||||||
.I total.num.recursivereplies
|
.I total.num.recursivereplies
|
||||||
summed over threads.
|
summed over threads.
|
||||||
.TP
|
.TP
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue