igneum/tools/attack/adv-mixer-2/queue/01-adv-mixer-2-census-2p24.sh
2026-10-07 20:32:27 +00:00

17 lines
966 B
Bash
Executable file

#!/usr/bin/env bash
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 UK, 7 October 2026).
set -uo pipefail
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
L=/srv/builds/_adv-adv-mixer-2/logs
mkdir -p "$L"
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
local name="$1" thr="$2" mn="$3"; shift 3
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
echo $! > "$L/$name.pid"
wait $!
local rc=$?
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
rm -f "$L/$name.pid"
}
run census-2p24 32 16 census --from 20729 --count 2^24 --threads {cores} --lowest 16384 --out-days "$L/tail-2p24.txt"