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
- 08e55255log: HM56 done, T36A startedmre
- 5fd2ac75status: #36 GOmre
- 0d253b45mission: T36Amre
- 2aa22d23log: #36 GOmre
- 833aee2flog: #50 closed, HM56 startedmre
- ac58c1e5mission: HM56mre
- 58979c0clog: HM54 held for decision, DP65 startedmre
- bb2ebc67log: #64 live, #53 mergedmre
- 27cde42fMerge hm53-dom: tracker#53 inputs bound to membersmre
- 2156cc7flog: HM54 reviewmre
- 9fb82efclog: HM54 gap, fill continuesmre
- b632eb8dlog: HM53 done, HM54 startedmre
- ccb1a263tracker#53: bind editor drafts and use key event focus targetmre
- 3356fcfclog: #52 blocked, HM53 startedmre
- 833dcfc9Merge hm52-search: report only, tracker#52 blocked by framework gapmre
- 73010cc0HM52: report replace-navigation search draft regressionmre
- 1742e92bstatus: DP64 and HM52 runningmre
- 29ad5b58log: #64 merged, DP64 and HM52 startedmre
- fafddbf9Merge hm64-catalog: tracker#64 catalog from packed entriesmre
- b2e2206dlog: #63 livemre