Files
felhom.eu/documentation/audits/fixes-2026-10-21/tools/outside.sh
T

15 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# outside.sh — the freeze test's second channel (fixes 2026-10-21 Part 4), on DooPlex, for up to 8 h:
# every 10 s: the dashboard's /api/health latency (the household's door) + demo-hp's view of VM 9321 (qemu disk reads);
# every 60 s: copy the box's rec.jsonl to the evidence folder.
K=/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/38fde0c6-e964-4ec1-b0c7-56e62d675225/scratchpad/kh9321
end=$(($(date +%s)+28800)); n=0
while [ $(date +%s) -lt $end ]; do
t=$(date -u +%FT%TZ)
h=$(curl -sk -m 15 -o /dev/null -w "%{http_code} %{time_total}" -H "Host: felhom.tester4.test" https://192.168.0.139/api/health)
q=$(ssh -o ConnectTimeout=5 hp 'p=$(cat /var/run/qemu-server/9321.pid 2>/dev/null); awk "/read_bytes|write_bytes/{printf \"%s \", \$2}" /proc/$p/io 2>/dev/null' 2>/dev/null)
echo "$t health=$h qemu_rw=$q" >> /mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/fixes-2026-10-21/P4-freeze/02-outside.txt
n=$((n+1)); if [ $((n % 6)) -eq 0 ]; then scp -q -o UserKnownHostsFile=$K -o ConnectTimeout=10 root@192.168.0.133:/root/rec/rec.jsonl /mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/fixes-2026-10-21/P4-freeze/03-rec.jsonl 2>/dev/null; fi
sleep 10
done