Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/evidence/qwen38-serve-20261019T0128Z/keepalive.sh # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / evidence / qwen38-serve-20261019T0128Z / keepalive.sh` 17 lines ยท 915 bytes Raw Blame History 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