tracker
All repositories: gitoria
2.4 KB
#!/bin/bash# realdata-071.sh <jobs|fresh|stop> <new|old> <port> — mission 071 (Hybriel re-vendor, old 8590df63 vs new), NOT the gate.# Works on .scratch/w071/real-<which>/ (a COPY of live storage/, see STATUS "How to repeat"); old runs from .scratch/w071/oldtree# (this tree with .scratch/pre-070 bin/plugins and a .env link).# jobs: all jobs on, the daily run forced NOW as a delta (sync-state.txt = yesterday) → server-jobs.log, rss-jobs.log# fresh: a process on the done copy, TRACKER_SYNC=0 → server-fresh.log, rss-fresh.log; prints the boot RSS 60 s after listening# stop: kills the server by its PID (server.pid)# Both start modes write a session for the creator (az5b2 = user 0mujqspn0aqb) → real-<which>/sid.W=/media/STORAGE/projects/WorldAPI/tracker.worldapi.org; mode=$1; which=$2; port=$3R=$W/.scratch/w071/real-$which; tree=$W; [ "$which" = old ] && tree=$W/.scratch/w071/oldtreeif [ "$mode" = stop ]; then pid=$(cat $R/server.pid); kill $pid; while kill -0 $pid 2>/dev/null; do sleep 1; done; echo "stopped $pid"; exit 0; fimkdir -p $R/sessionssid=$(head -c 16 /dev/urandom | xxd -p); now=$(date +%s%3N)echo "{\"created\":$now,\"data\":{\"tag\":\"t\"},\"id\":\"$sid\",\"seen\":$now,\"user\":{\"id\":\"0mujqspn0aqb\"}}" > $R/sessions/$(printf %s "$sid" | sha256sum | cut -d' ' -f1)echo $sid > $R/sidcd $treeif [ "$mode" = jobs ]; thendate -u -d yesterday +%F > $R/storage/mpackdb/sync-state.txtset -- TRACKER_SYNC=1 TRACKER_SYNC_HOUR=$(date -u +%-H)elseset -- TRACKER_SYNC=0fienv "$@" TRACKER_PORT=$port TRACKER_URL=http://127.0.0.1:$port HL_HOST=127.0.0.1 TRACKER_WATCH=0 \TRACKER_STORAGE=$R/storage/mpackdb TRACKER_SESSIONS=$R/sessions/ TRACKER_OLD_SHORT_IDS=$tree/data/old-short-ids.json \setsid ./bin/hybriel project.hl > $R/server-$mode.log 2>&1 < /dev/null &pid=$!; echo $pid > $R/server.pid# RSS every 10 s ("<s since start> <time> <kB>") until the process ends( t0=$(date +%s); while kill -0 $pid 2>/dev/null; do echo "$(( $(date +%s) - t0 )) $(date +%T) $(awk '/VmRSS/{print $2}' /proc/$pid/status 2>/dev/null)" >> $R/rss-$mode.log; sleep 10; done ) > /dev/null 2>&1 < /dev/null &t0=$(date +%s)until curl -s -o /dev/null http://127.0.0.1:$port/; do sleep 1; kill -0 $pid 2>/dev/null || { echo "server died"; tail -20 $R/server-$mode.log; exit 1; }; doneecho "$which $mode pid $pid listening after $(( $(date +%s) - t0 )) s"if [ "$mode" = fresh ]; then sleep 60; echo "boot RSS (60 s after listening): $(awk '/VmRSS/{printf "%.0f", $2/1024}' /proc/$pid/status) MB"; fi
Branches
Latest commits
- 3945eb81ST1: stall diagnosis reportmre
- 404733aclog: ST1 startedmre
- 3e3d5a55mission ST1: stall diagnosismre
- 9c3180eblog+status: RV28d measured after deploymre
- fdf10b1alog: RV28d deployed on day38bmre
- 320005e9log: RV28d merged, deploy runningmre
- a8fef27dRV28d: reportmre
- 2bae8373RV28d: re-vendor Hybriel set day38b (source 1e554d75, bin 5ff2a46d)mre
- 16b3354aMerge branch 'main' into rv28cmre
- 6f4f27d8log: RV28d started (day38b)mre
- e6cf03ffmission RV28d: rv28c onto day38bmre
- 3ccaee19status: live sweep freeze, waiting for Apollomre
- 49f76ecblog: watch toggle slowness = session sweep freeze (tracker#50)mre
- 3daf6eddlog: day37 live, still waiting for day39mre
- 796ba672records: #277 slips to day39mre
- a9eb9827records: mpackdb integrity clean, all 12 tablesmre
- 6cf40dbdrecords: mpackdb integrity check, shows uncheckedmre
- 1880f42arecords: day38 deploy may swap normallymre
- 9d806e35records: mpackdb freeze until day38mre
- a660239drecords: day37 lacks #277, wait for day38mre