#!/bin/bash # Consolidated watcher for the 3 live C512 EP runs. nohup'd so it survives session events. # Logs each run's latest val-CE line + alive/dead every 10 min to runs/watch_all.log. R=/home/yurenh2/ept/ep_run/runs LOG=$R/watch_all.log while true; do TS=$(date '+%m-%d %H:%M') for f in ep_resreg_warm ep_jacreg ep_rr_ajr; do if pgrep -f "ckpt runs/$f.pt" >/dev/null; then a=ALIVE; else a=DEAD; fi line=$(grep -iE "val CE" "$R/$f.log" 2>/dev/null | tail -1) echo "$TS [$a] $f | $line" >> "$LOG" done echo "----" >> "$LOG" sleep 600 done