aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / evidence / qwen38-serve-20261019T0128Z / keepalive.sh
| 1 | #!/bin/bash |
| 2 | # Keeps port 18091 served: every 60 s, if the 27B server's pid is gone and nothing listens on |
| 3 | # 18091, run start-27b.sh. At most 3 restarts per hour (a failing load does not loop). Started |
| 4 | # detached by the q38-serve chat; stop with: kill $(cat ~/.local/state/aien-q38/keepalive.pid) |
| 5 | S=$HOME/.local/state/aien-q38 |
| 6 | starts=() |
| 7 | while sleep 60; do |
| 8 | kill -0 "$(cat "$S/serve.pid" 2>/dev/null)" 2>/dev/null && continue |
| 9 | ss -ltn | grep -q '127.0.0.1:18091 ' && continue |
| 10 | now=$(date +%s); recent=() |
| 11 | for t in "${starts[@]}"; do [ $((now - t)) -lt 3600 ] && recent+=("$t"); done |
| 12 | starts=("${recent[@]}") |
| 13 | if [ ${#starts[@]} -ge 3 ]; then echo "$(date -u +%FT%TZ) keepalive: 3 restarts this hour, not retrying" >> "$S/keepalive.log"; continue; fi |
| 14 | echo "$(date -u +%FT%TZ) keepalive: 18091 dead, starting the 27B" >> "$S/keepalive.log" |
| 15 | "$S/start-27b.sh" >> "$S/keepalive.log" 2>&1 |
| 16 | starts+=("$now") |
| 17 | done |