mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Remove CacheNSECNodes statistics counter
There is no auxiliary NSEC tree, so we can't count the NSEC nodes separately. Remove the CacheNSECNodes statistics counter as it would be always zero.
This commit is contained in:
parent
f3032ecd85
commit
70c8054b84
2 changed files with 0 additions and 51 deletions
|
|
@ -683,21 +683,6 @@ for ns in 2 4 5 6; do
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "check 'rndc stats' output for 'cache NSEC auxiliary database nodes' (synth-from-dnssec ${description};) ($n)"
|
||||
ret=0
|
||||
# 2 views, _bind should always be '0 cache NSEC auxiliary database nodes'
|
||||
count=$(grep "cache NSEC auxiliary database nodes" ns${ns}/named.stats | wc -l)
|
||||
test $count = 2 || ret=1
|
||||
zero=$(grep "0 cache NSEC auxiliary database nodes" ns${ns}/named.stats | wc -l)
|
||||
if [ ${ad} = yes ]; then
|
||||
test $zero = 1 || ret=1
|
||||
else
|
||||
test $zero = 2 || ret=1
|
||||
fi
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
for synthesized in NXDOMAIN no-data wildcard; do
|
||||
case $synthesized in
|
||||
NXDOMAIN) count=2 ;;
|
||||
|
|
@ -740,21 +725,6 @@ for ns in 2 4 5 6; do
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "check XML for 'CacheNSECNodes' with (synth-from-dnssec ${description};) ($n)"
|
||||
ret=0
|
||||
counter=$(sed -n 's;.*<view name="_default">.*\(<counter name="CacheNSECNodes">[0-9]*</counter>\).*</view><view.*;\1;gp' $xml)
|
||||
count=$(echo "$counter" | grep CacheNSECNodes | wc -l)
|
||||
test $count = 1 || ret=1
|
||||
zero=$(echo "$counter" | grep ">0<" | wc -l)
|
||||
if [ ${ad} = yes ]; then
|
||||
test $zero = 0 || ret=1
|
||||
else
|
||||
test $zero = 1 || ret=1
|
||||
fi
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
for synthesized in SynthNXDOMAIN SynthNODATA SynthWILDCARD; do
|
||||
case $synthesized in
|
||||
SynthNXDOMAIN) count=2 ;;
|
||||
|
|
@ -800,20 +770,6 @@ for ns in 2 4 5 6; do
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "check JSON for 'CacheNSECNodes' with (synth-from-dnssec ${description};) ($n)"
|
||||
ret=0
|
||||
count=$(grep '"CacheNSECNodes":' $json | wc -l)
|
||||
test $count = 2 || ret=1
|
||||
zero=$(grep '"CacheNSECNodes":0' $json | wc -l)
|
||||
if [ ${ad} = yes ]; then
|
||||
test $zero = 1 || ret=1
|
||||
else
|
||||
test $zero = 2 || ret=1
|
||||
fi
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
for synthesized in SynthNXDOMAIN SynthNODATA SynthWILDCARD; do
|
||||
case $synthesized in
|
||||
SynthNXDOMAIN) count=2 ;;
|
||||
|
|
|
|||
|
|
@ -679,8 +679,6 @@ dns_cache_renderxml(dns_cache_t *cache, void *writer0) {
|
|||
|
||||
TRY0(renderstat("CacheNodes",
|
||||
dns_db_nodecount(cache->db, dns_dbtree_main), writer));
|
||||
TRY0(renderstat("CacheNSECNodes",
|
||||
dns_db_nodecount(cache->db, dns_dbtree_nsec), writer));
|
||||
|
||||
TRY0(renderstat("TreeMemInUse", isc_mem_inuse(cache->tmctx), writer));
|
||||
|
||||
|
|
@ -745,11 +743,6 @@ dns_cache_renderjson(dns_cache_t *cache, void *cstats0) {
|
|||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "CacheNodes", obj);
|
||||
|
||||
obj = json_object_new_int64(
|
||||
dns_db_nodecount(cache->db, dns_dbtree_nsec));
|
||||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "CacheNSECNodes", obj);
|
||||
|
||||
obj = json_object_new_int64(isc_mem_inuse(cache->tmctx));
|
||||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "TreeMemInUse", obj);
|
||||
|
|
|
|||
Loading…
Reference in a new issue