mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-01-03 02:50:47 -05:00
add stats scripts
This commit is contained in:
parent
5d07b89e77
commit
3400e1f481
20
connection-stats
Executable file
20
connection-stats
Executable file
@ -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
|
19
nginx-stats
Executable file
19
nginx-stats
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user