aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 20:14:42 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 20:14:42 +0100
commit8a259103551d200fc5b5b641e36b7eada0728759 (patch)
treebbe6e514e6111772728ac7ae2fa1b0516f2f0620 /modules
parent549ccc0f41f20dfce4d3da52a4ff5199a2c03c08 (diff)
Added a delta var for the network up and down modules
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/networkdowntraffic5
-rwxr-xr-xmodules/networkuptraffic5
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