add a stats counter for clients dropped due to recursive-clients limit

(cherry picked from commit 715afa9c57)
This commit is contained in:
Evan Hunt
2019-11-26 11:20:12 -08:00
parent 0f7676c8fe
commit d445121c26
5 changed files with 26 additions and 2 deletions
+3
View File
@@ -317,6 +317,9 @@ init_desc(void) {
"QryUsedStale");
SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch");
SET_NSSTATDESC(keytagopt, "Keytag option received", "KeyTagOpt");
SET_NSSTATDESC(reclimitdropped,
"queries dropped due to recursive client limit",
"RecLimitDropped");
INSIST(i == ns_statscounter_max);
+12
View File
@@ -179,5 +179,17 @@ echo_i "clients count exceeded 380 on $exceeded trials (expected 0)"
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "checking drop statistics"
rm -f ns3/named.stats
$RNDCCMD stats
for try in 1 2 3 4 5; do
[ -f ns3/named.stats ] && break
sleep 1
done
drops=`grep 'queries dropped due to recursive client limit' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
[ "${drops:-0}" -ne 0 ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1