From 8a259103551d200fc5b5b641e36b7eada0728759 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Thu, 24 Oct 2019 20:14:42 +0100 Subject: [PATCH] Added a delta var for the network up and down modules --- modules/networkdowntraffic | 5 +++-- modules/networkuptraffic | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/networkdowntraffic b/modules/networkdowntraffic index d82d24b..ea270e3 100755 --- a/modules/networkdowntraffic +++ b/modules/networkdowntraffic @@ -1,11 +1,12 @@ #!/bin/bash -# Prints out the current down network traffic in DJNADJNA +# Prints out the current down network traffic in MB PREFIX=' ' get_down_traffic() { + DELTA=2 RECIEVE1=0 RECIEVE2=0 @@ -16,7 +17,7 @@ get_down_traffic() fi done - sleep 2 + sleep $DELTA IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do diff --git a/modules/networkuptraffic b/modules/networkuptraffic index 6907928..5c7dc13 100755 --- a/modules/networkuptraffic +++ b/modules/networkuptraffic @@ -1,11 +1,12 @@ #!/bin/bash -# Prints out the current up network traffic in DJNADJNA +# Prints out the current up network traffic in MB PREFIX=' ' get_up_traffic() { + DELTA=2 TRANSMIT1=0 TRANSMIT2=0 @@ -16,7 +17,7 @@ get_up_traffic() fi done - sleep 2 + sleep $DELTA IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do