diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-25 03:49:35 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-25 03:49:35 +0200 |
commit | c8c277200169dfadf88dd176e5c056967550e059 (patch) | |
tree | ec1a519ef550c2206c7863503627388e343778a3 /archive/scriptlib/check_server_traffic.sh | |
parent | 5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4 (diff) | |
download | conky-c8c277200169dfadf88dd176e5c056967550e059.tar.gz conky-c8c277200169dfadf88dd176e5c056967550e059.tar.bz2 conky-c8c277200169dfadf88dd176e5c056967550e059.tar.xz conky-c8c277200169dfadf88dd176e5c056967550e059.zip |
Add remote services
Diffstat (limited to 'archive/scriptlib/check_server_traffic.sh')
-rwxr-xr-x | archive/scriptlib/check_server_traffic.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archive/scriptlib/check_server_traffic.sh b/archive/scriptlib/check_server_traffic.sh new file mode 100755 index 0000000..a9f0abf --- /dev/null +++ b/archive/scriptlib/check_server_traffic.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +all_in=`iptables -L traffic_in -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` +all_out=`iptables -L traffic_out -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` +all_forward=`iptables -L traffic_forward -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'` + +echo "$all_in $all_out $all_forward" |