Display sum of all netisr threads instead of displaying separate value

for each thread
This commit is contained in:
Babak Farrokhi 2017-09-02 18:52:21 +04:30
parent 4c89a0baab
commit b281709420
Signed by: farrokhi
GPG Key ID: 6B267AD85D632E9A

31
netisr_
View File

@ -46,15 +46,32 @@ if [ $# -lt 1 ]; then
echo "Should run from symlink" echo "Should run from symlink"
exit 1 exit 1
fi fi
awk ' awk '
BEGIN {
OFS="";
qed=0;
handled=0;
dropped=0;
hdised=0;
dised=0;
st="";
}
/ ('${STAT_TYPE}') / { / ('${STAT_TYPE}') / {
print "t"$2 "_"$3"_queued.value "$9; st=$3;
print "t"$2 "_"$3"_handled.value "$10; qed=qed+$9;
print "t"$2 "_"$3"_dropped.value "$8; handled=handled+$10;
print "t"$2 "_"$3"_hdispatched.value "$7; dropped=dropped+$8;
print "t"$2 "_"$3"_dispatched.value "$6; hdised=hdised+$7;
} ' ${STATFILE} dised=dised+$6;
}
END {
print st, "_queued.value ", qed;
print st, "_handled.value ", handled;
print st, "_dropped.value ", dropped;
print st, "_hdispatched.value ", hdised;
print st, "_dispatched.value ", dised;
}
' ${STATFILE}
elif [ "$1" == "suggest" ]; then elif [ "$1" == "suggest" ]; then