change suriloss and zeekloss to be more similar code style

This commit is contained in:
m0duspwnens
2021-01-12 16:39:19 -05:00
parent 96dab31ab0
commit 225ed1c14a
2 changed files with 6 additions and 6 deletions

View File

@@ -33,16 +33,16 @@ if [ $CHECKIT == 2 ]; then
CURRENTDROP=${RESULT[4]} CURRENTDROP=${RESULT[4]}
PASTDROP=${RESULT[14]} PASTDROP=${RESULT[14]}
DROPPED=$(($CURRENTDROP - $PASTDROP)) DROPPED=$((CURRENTDROP - PASTDROP))
if [ $DROPPED == 0 ]; then if [ $DROPPED == 0 ]; then
LOSS=0 LOSS=0
echo "suridrop drop=0" echo "suridrop drop=0"
else else
CURRENTPACKETS=${RESULT[9]} CURRENTPACKETS=${RESULT[9]}
PASTPACKETS=${RESULT[19]} PASTPACKETS=${RESULT[19]}
TOTALCURRENT=$(($CURRENTPACKETS + $CURRENTDROP)) TOTALCURRENT=$((CURRENTPACKETS + CURRENTDROP))
TOTALPAST=$(($PASTPACKETS + $PASTDROP)) TOTALPAST=$((PASTPACKETS + PASTDROP))
TOTAL=$(($TOTALCURRENT - $TOTALPAST)) TOTAL=$((TOTALCURRENT - TOTALPAST))
LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc) LOSS=$(echo 4 k $DROPPED $TOTAL / p | dc)
echo "suridrop drop=$LOSS" echo "suridrop drop=$LOSS"