debug infra lines for infa timeout counters.
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@2616 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
ee86f47893
commit
257ec6f755
@ -802,7 +802,8 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
|
||||
{
|
||||
char buf[257];
|
||||
struct delegpt_addr* a;
|
||||
int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl;
|
||||
int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl,
|
||||
tA, tAAAA, tother;
|
||||
struct rtt_info ri;
|
||||
uint8_t edns_lame_known;
|
||||
for(a = dp->target_list; a; a = a->next_target) {
|
||||
@ -817,9 +818,11 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
|
||||
delay=0;
|
||||
entry_ttl = infra_get_host_rto(worker->env.infra_cache,
|
||||
&a->addr, a->addrlen, dp->name, dp->namelen,
|
||||
&ri, &delay, *worker->env.now);
|
||||
&ri, &delay, *worker->env.now, &tA, &tAAAA, &tother);
|
||||
if(entry_ttl == -2 && ri.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
|
||||
if(!ssl_printf(ssl, "expired, rto %d msec.\n", ri.rto))
|
||||
if(!ssl_printf(ssl, "expired, rto %d msec, tA %d "
|
||||
"tAAAA %d tother %d.\n", ri.rto, tA, tAAAA,
|
||||
tother))
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
@ -840,11 +843,12 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
|
||||
continue; /* skip stuff not in infra cache */
|
||||
}
|
||||
if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %d, ping %d "
|
||||
"var %d rtt %d",
|
||||
"var %d rtt %d, tA %d, tAAAA %d, tother %d",
|
||||
lame?"LAME ":"", dlame?"NoDNSSEC ":"",
|
||||
a->lame?"AddrWasParentSide ":"",
|
||||
rlame?"NoAuthButRecursive ":"", rto, entry_ttl,
|
||||
ri.srtt, ri.rttvar, rtt_notimeout(&ri)))
|
||||
ri.srtt, ri.rttvar, rtt_notimeout(&ri),
|
||||
tA, tAAAA, tother))
|
||||
return;
|
||||
if(delay)
|
||||
if(!ssl_printf(ssl, ", probedelay %d", delay))
|
||||
|
@ -1570,9 +1570,11 @@ dump_infra_host(struct lruhash_entry* e, void* arg)
|
||||
return;
|
||||
}
|
||||
if(!ssl_printf(a->ssl, "%s %s ttl %d ping %d var %d rtt %d rto %d "
|
||||
"tA %d tAAAA %d tother %d "
|
||||
"ednsknown %d edns %d delay %d lame dnssec %d rec %d A %d "
|
||||
"other %d\n", ip_str, name, (int)(d->ttl - a->now),
|
||||
d->rtt.srtt, d->rtt.rttvar, rtt_notimeout(&d->rtt), d->rtt.rto,
|
||||
d->timeout_A, d->timeout_AAAA, d->timeout_other,
|
||||
(int)d->edns_lame_known, (int)d->edns_version,
|
||||
(int)(a->now<d->probedelay?d->probedelay-a->now:0),
|
||||
(int)d->isdnsseclame, (int)d->rec_lame, (int)d->lame_type_A,
|
||||
|
6
services/cache/infra.c
vendored
6
services/cache/infra.c
vendored
@ -422,7 +422,8 @@ infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
|
||||
|
||||
int infra_get_host_rto(struct infra_cache* infra,
|
||||
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* nm,
|
||||
size_t nmlen, struct rtt_info* rtt, int* delay, uint32_t timenow)
|
||||
size_t nmlen, struct rtt_info* rtt, int* delay, uint32_t timenow,
|
||||
int* tA, int* tAAAA, int* tother)
|
||||
{
|
||||
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
|
||||
nm, nmlen, 0);
|
||||
@ -437,6 +438,9 @@ int infra_get_host_rto(struct infra_cache* infra,
|
||||
*delay = (int)(data->probedelay - timenow);
|
||||
else *delay = 0;
|
||||
}
|
||||
*tA = data->timeout_A;
|
||||
*tAAAA = data->timeout_AAAA;
|
||||
*tother = data->timeout_other;
|
||||
lock_rw_unlock(&e->lock);
|
||||
return ttl;
|
||||
}
|
||||
|
6
services/cache/infra.h
vendored
6
services/cache/infra.h
vendored
@ -275,12 +275,16 @@ int infra_get_lame_rtt(struct infra_cache* infra,
|
||||
* @param rtt: the rtt_info is copied into here (caller alloced return struct).
|
||||
* @param delay: probe delay (if any).
|
||||
* @param timenow: what time it is now.
|
||||
* @param tA: timeout counter on type A.
|
||||
* @param tAAAA: timeout counter on type AAAA.
|
||||
* @param tother: timeout counter on type other.
|
||||
* @return TTL the infra host element is valid for. If -1: not found in cache.
|
||||
* TTL -2: found but expired.
|
||||
*/
|
||||
int infra_get_host_rto(struct infra_cache* infra,
|
||||
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* name,
|
||||
size_t namelen, struct rtt_info* rtt, int* delay, uint32_t timenow);
|
||||
size_t namelen, struct rtt_info* rtt, int* delay, uint32_t timenow,
|
||||
int* tA, int* tAAAA, int* tother);
|
||||
|
||||
/**
|
||||
* Get memory used by the infra cache.
|
||||
|
Loading…
Reference in New Issue
Block a user