gates / gates (push) Successful in 2m2s
Read-only review of every job on a timer and of everything that ends on a date, with measurements from the three test boxes. Nothing ends in the next 14 days. Register 236 -> 245 (R-1379..R-1387), pointer lines on twelve rows, D76-D79 in STATUS.md. Part C: felhom-agent's clone address holds no token now; the other clones wait for the operator's yes. R-1035's 4-week check moved to 2026-11-18 (operator read needed). Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
15 lines
1.9 KiB
Bash
15 lines
1.9 KiB
Bash
#!/bin/bash
|
|
# guest-night.sh — read-only: per scheduler job, count, first/last start, the last three durations; and night lines.
|
|
L=$(mktemp); docker logs --timestamps felhom-controller > "$L" 2>&1
|
|
printf 'log first line: %s\nlog last line: %s\n' "$(head -1 "$L" | cut -c1-30)" "$(tail -1 "$L" | cut -c1-30)"
|
|
printf '\n=== scheduler jobs (UTC): runs, first start, last start, last three "took" ===\n'
|
|
grep -E '\[scheduler\] (Running job: |Job .* (completed|failed|skipped))' "$L" | awk '
|
|
/ Running job: / { j=$NF; n[j]++; if(!(j in f)) f[j]=substr($1,1,19); l[j]=substr($1,1,19); next }
|
|
/ Job / { for(i=1;i<=NF;i++) if($i=="Job") {j=$(i+1); break}; s=$0; sub(/^.*\[scheduler\] Job [^ ]+ /,"",s); d[j]=d3[j]; d3[j]=d2[j] " | " s; d2[j]=s; last[j]=(last[j]==""?s:last2[j]); h[j]=h[j] "#" s; }
|
|
END { for (j in n) { k=split(h[j],p,"#"); o=""; for(i=(k>3?k-2:2);i<=k;i++) o=o " [" p[i] "]"; printf "%-34s runs=%-5d first=%s last=%s%s\n", j, n[j], f[j], l[j], o } }' | sort
|
|
printf '\n=== jobs that ran fewer than 30 times: every start and end (UTC) ===\n'
|
|
grep -E '\[scheduler\] (Running job: |Job .* (completed|failed|skipped))' "$L" | awk '{ if ($0 ~ / Running job: /) j=$NF; else { for(i=1;i<=NF;i++) if($i=="Job") {j=$(i+1); break} } c[j]++; line[NR]=$0; jj[NR]=j } END { for(i=1;i<=NR;i++) if (c[jj[i]]<60) { s=line[i]; sub(/^[^ ]+ /,"",s); sub(/scheduler.go:[0-9]+: /,"",s); print substr(s,1,170) } }' | tail -120
|
|
printf '\n=== night lines 19:00-08:00 UTC, INFO/WARN/ERROR, backup words (first 2 per message shape) ===\n'
|
|
grep -E 'T(19|2[0-3]|0[0-7]):' "$L" | grep -E '\[(INFO|WARN|ERROR)\]' | grep -v '\[scheduler\]' | grep -i -E 'backup|restic|offbox|offsite|restore|prune|dump|verify|snapshot|retention|forget|check' | awk '{ k=$0; sub(/^[^ ]+ [^ ]+ [^ ]+ /,"",k); gsub(/[0-9]+/,"N",k); k=substr(k,1,48); c[k]++; if (c[k]<=2) { s=$0; sub(/^[^ ]+ /,"",s); print substr(s,1,230) } }' | head -90
|
|
rm -f "$L"
|