X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=mrtg-alix%2Fmrtg-scripts%2Fexplore_net;fp=mrtg-alix%2Fmrtg-scripts%2Fexplore_net;h=f9f51af9e9fc8a5a96c17d359d009aecd06a0e3b;hb=e1c2d0940e95d5a903d8bbc8cc7837f67bdcac89;hp=0000000000000000000000000000000000000000;hpb=0d5f2f20d9da1b932020bf17f84ad4cd542cc86a;p=sven%2Fscripts.git diff --git a/mrtg-alix/mrtg-scripts/explore_net b/mrtg-alix/mrtg-scripts/explore_net new file mode 100755 index 0000000..f9f51af --- /dev/null +++ b/mrtg-alix/mrtg-scripts/explore_net @@ -0,0 +1,15 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +DEV="$1" +if test -z "$DEV"; then echo No device specified; exit 1; fi + +INFO=`grep $DEV /proc/net/dev | tr -s ' ' ' ' | cut -d: -f2` +RECEIVE=`echo $INFO | cut -d" " -f1` +TRANSMIT=`echo $INFO | cut -d" " -f9` + +echo $RECEIVE +echo $TRANSMIT +echo "" +hostname -s