mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
change suriloss and zeekloss to be more similar code style
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user