Fix math for suri loss calulcations

This commit is contained in:
Mike Reeves
2020-06-25 13:54:01 -04:00
parent 65687fd28e
commit 1e6fab4e6e

View File

@@ -15,7 +15,7 @@ if [ $CHECKIT == 2 ]; then
else
CURRENTPACKETS=${RESULT[9]}
PASTPACKETS=${RESULT[19]}
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS))
TOTAL=$(($CURRENTPACKETS - $PASTPACKETS + $DROPPED))
LOSS=$(echo $DROPPED $TOTAL / p | dc)
echo "suridrop drop=$LOSS"