diff --git a/connection-stats b/connection-stats new file mode 100755 index 0000000..0756631 --- /dev/null +++ b/connection-stats @@ -0,0 +1,20 @@ +#!/bin/bash + +set -o errexit -o nounset -o pipefail + +[[ $# -ge 1 ]] || exit 1 + +user=root + +. hosts.sh + +declare -n hosts=hosts_$1 +shift +for host in ${hosts[@]}; do + echo $host + echo + + ssh $user@$host ss -s + + echo +done diff --git a/nginx-stats b/nginx-stats new file mode 100755 index 0000000..39ca72e --- /dev/null +++ b/nginx-stats @@ -0,0 +1,19 @@ +#!/bin/bash + +set -o errexit -o nounset -o pipefail + +[[ $# -ge 1 ]] || exit 1 + +user=root + +. hosts.sh + +declare -n hosts=hosts_$1 +shift +for host in ${hosts[@]}; do + echo $host + echo + + ssh $user@$host curl -sS --unix-socket /run/nginx/status.sock http://localhost/ + echo +done