summaryrefslogtreecommitdiffstats
path: root/analyze.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-08-15 19:21:15 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-08-15 19:21:15 +0200
commitd4f864cbd252a6156f7cc4b04f3daf1cd5149fc0 (patch)
tree253bd26151e1d53d977344189b37bc77322036fc /analyze.sh
parent5cdb425d6843c100189611c2edb37b03efc1dc5a (diff)
downloadods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.gz
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.bz2
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.tar.xz
ods-d4f864cbd252a6156f7cc4b04f3daf1cd5149fc0.zip
Multiple configurations
Diffstat (limited to 'analyze.sh')
-rwxr-xr-xanalyze.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/analyze.sh b/analyze.sh
index 33799cc..c0a8be1 100755
--- a/analyze.sh
+++ b/analyze.sh
@@ -3,6 +3,8 @@
sleep=1
int=$(ip addr show | grep "192\.168\.2\." | awk '{ print $NF }')
+[ -n "$1" ] && int="$1"
+
stats1=($(ethtool -S $int | grep -P "rx\d?_(packets|bytes)" | awk '{ print $2 }'))
sleep $sleep