30 lines
1.9 KiB
Bash
Executable File
30 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# noswap.sh MINUTES — night 2026-10-21 Part 2.1: does the freeze come back on a host with NO swap? On the soak VM
|
|
# (host 192.168.0.128, NOT demo-hp): record → `swapoff -a` → the same upload burst (load2.py cycles on the helper CT 9332,
|
|
# via noswaprun.sh) for MINUTES → `swapon -a` → record. The 10 s recorder and the outside probe keep running.
|
|
# Run from DooPlex. Prints a timeline; nothing secret.
|
|
set -u
|
|
M=${1:-30}
|
|
SP=/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/38fde0c6-e964-4ec1-b0c7-56e62d675225/scratchpad
|
|
BX=$SP/bx
|
|
F='perl:\|LC_\|LANG\|supported\|locale\|Falling'
|
|
t() { date -u +%T; }
|
|
echo "$(t) NOSWAP START ($M min)"
|
|
$BX 'export LC_ALL=C; echo "## before"; swapon --show; free -m; pct config 9201 | grep -E "^(memory|swap)"; cat /sys/fs/cgroup/lxc/9201/memory.swap.max' 2>&1 | grep -v "$F"
|
|
echo "$(t) swapoff -a"
|
|
$BX 'export LC_ALL=C; time swapoff -a; swapon --show; free -m | grep -i swap' 2>&1 | grep -v "$F"
|
|
echo "$(t) restarting immich-machine-learning so its models load again under the burst (as on the first afternoon)"
|
|
$BX 'pct exec 9201 -- docker restart immich-machine-learning' 2>&1 | tail -1
|
|
echo "$(t) burst start"
|
|
sec run REHEARSAL_2026_10_20_IRISZ_PW,REHEARSAL_2026_10_20_ODON_PW -- sh -c 'printf "IRISZ=%s\nODON=%s\n" "$REHEARSAL_2026_10_20_IRISZ_PW" "$REHEARSAL_2026_10_20_ODON_PW" | ssh hp "pct exec 9332 -- bash -c \"umask 077; cat > /root/.burstenv\""'
|
|
ssh hp "pct exec 9332 -- bash /root/noswaprun.sh $M" &
|
|
BP=$!
|
|
end=$(( $(date +%s) + M*60 ))
|
|
while [ "$(date +%s)" -lt "$end" ]; do sleep 60; echo "$(t) health $(tail -1 $SP/soaklive/02-outside.txt | awk '{print $2, $3}')"; done
|
|
echo "$(t) burst window over; swapon -a"
|
|
$BX 'export LC_ALL=C; swapon -a; swapon --show; free -m | grep -i swap' 2>&1 | grep -v "$F"
|
|
wait $BP 2>/dev/null
|
|
echo "$(t) agent log (host-swap):"
|
|
$BX 'journalctl -u felhom-agent --since "-60min" --no-pager | grep -E "host-swap" | cut -c1-260' 2>&1 | grep -v "$F"
|
|
echo "$(t) NOSWAP END"
|