interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / tools / omegallm / ctlsamp / README.md

121 lines · 7025 bytes Raw Blame History Source

ctlsamp: controller telemetry sampler (seeded Omega)

ctlsamp.om is the telemetry instrument for the wsp controller study (Linear DRA-187, docs/omegallm/WSP-CONTROLLER.md section 5). It is the instrument going forward. It replaces the old sampler.py and ups-sampler.sh, which produced the traces already filed in evidence/OMEGALLM/wsp-ctl-traces-20261107/ and were deleted when this port landed.

It is a measurement tool, not product code. It needs no root, does no GPU work and changes no setting. Each sample it:

Timing uses monons (schedule and sample_cost_us) and realns (ts_unix, ts_utc). Each sample starts one interval after the previous sample started, or at once if the previous sample took longer than the interval; there are no catch-up samples. Just before each nvidia-smi launch the sampler also waits until interval_s has passed since the previous launch, so launches are never closer than interval_s on its own clock, whatever the /proc reads before them cost (the child's own start adds a few milliseconds of spread: 4.996 to 5.003 s measured at a stand-in). A slow sample (a child at its 4 s deadline) delays later rows instead of bunching them.

Build

With the pinned compiler (omega-mv e5b32567, omc sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f):

taskset -c 0 nice -n 19 omc < ctlsamp.om > ctlsamp && chmod +x ctlsamp

omc exits with the error code on a refused compile. Do not run the output of a refused compile.

Usage

taskset -c 0 nice -n 19 ./ctlsamp OUT [interval_s] [count] [nvsmi_path] [upsc_path] [raw_log]
ArgumentDefaultRule
OUTrequiredopened for append, created mode 0644
interval_s5whole seconds, 5 to 86400. 5 is the floor because of the machine rule of at most one nvidia-smi read every 5 s
count3600 to 999999 rows (999999 is the largest while bound this omc accepts)
nvsmi_path/usr/bin/nvidia-smifull path, no PATH search; an empty argument means the default
upsc_path/usr/bin/upscfull path, no PATH search; an empty argument means the default
raw_lognoneif given, every raw byte read is appended here (see below)

The child processes get an empty environment. Run it on core 0 at nice 19, as above.

Exit codes

CodeMeaning
0all rows written
2usage error, or OUT or raw_log could not be opened
3a kernel file (/proc/...) could not be read; the old Python sampler crashed here too
4a write to OUT or raw_log failed or came back short (for example a full disk); rows before the failing one are complete, the failing row may be partial

A failing nvidia-smi or upsc is not an exit: it is recorded in the row (next section).

Row format

Keys are sorted and separated the way Python json.dumps(row, sort_keys=True) does (", " and ": "), so rows match trace-001.jsonl byte for byte in layout. Keys:

These are the keys of trace-001.jsonl plus the UPS keys of ups-001.jsonl, now in one row.

Errors:

raw_log

With raw_log, each read is appended as a header line == <seq> <source> <nbytes>, then the exact bytes, then a newline. Sources are the kernel file paths, gpu (the nvidia-smi stdout) and ups (the upsc stdout). /proc/stat appears once before row 0 (the baseline) and once per row, so the busy shares of row k come from the /proc/stat record of row k and the one before it. This is the same-moment reading of the original commands used by the port gate.

Gate checks and ORACLE label

The port gate (evidence/OMEGALLM/wsp-ctl-traces-20261107/gate-om-20261107/) compares the rows with the raw log and with the independent sensors log; gate-om-drain-20261107/ next to it holds the large and endless output controls and a 30 s rerun of the same checks. The comparators are ORACLE only and are not shipped: