Repository navigation
rig: record the rig-nodes host monitor (/rig/host) in every run's bag - #282
Merged
5 commits merged intoOct 29, 2026
Merged
5 commits merged into
5 commits merged into
Conversation
…every run's bag A generic node (nothing FicTrac- or arena-specific) that publishes, once a second, CPU per core (window mean + busiest 100 ms sub-window, P/E-core class, sampler lateness, context switches / interrupts / DPCs), memory + page file + hard faults, log-volume free space, per-disk and per-adapter rates, NVIDIA GPU (incl. NVENC/NVDEC) and the top processes plus pinned groups (FicTrac, BIAS, MATLAB, browser, Foxglove, router, each graph node). The method is atlas-bench tools/cpu_sampler.py: cycle counters and one NtQuerySystemInformation call for all processes on Windows; GetIfEntry2 for network; NVML through ctypes; psutil for the rest and on Linux/macOS. - rig/nodes/host_sampler.py (no ROS) + host_monitor.py: rig-nodes material, prototyped here. Typed rig_interfaces/HostStats when installed (requested for rig-nodes 0.3.0; spec in rig/docs/host-stats-request.md), else String JSON with the same field names. - bridge_node.py records /rig/host into the bag; rig.py starts the monitor by default (--no-host-monitor, --host-monitor-args). - Cost on ww18: 0.9 % of one core (median); 4.9 % of the harness run's compressed payload, about 1.0 MB/h. Gated in the harness (<= 2 % of a core, <= 5 % of the payload). - tests/test-host-sampler.py (root suite, no ROS/psutil): fields and types against the .msg spec, rates, CPU mean vs peak, process selection, strict JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rig-nodes The generic host monitor (host_sampler.py, host_monitor.py, its unit test, design note and the HostStats message spec) belongs in reiserlab/rig-nodes as rig_nodes.host_monitor; it is being ported there from branch rig/host-monitor-port (f5cf5a6). What stays here is the arena rig's composition and gateway: - bridge_node.py records /rig/host into each run's bag (typed HostStats when rig_interfaces has it, else String). - rig.py starts `python -m rig_nodes.host_monitor --log-dir rig/runlogs --py-root rig/` when the installed rig_nodes ships it (a note otherwise); --no-host-monitor, --host-monitor-args. - test_ros2_poc.py runs it the same way and checks samples, fields, per-core sanity, pinned graph nodes, its CPU (<= 2 % of a core) and storage (<= 5 % of the compressed payload); skipped with an info line when the installed rig_nodes has no host monitor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…7942b8 # Conflicts: # rig/nodes/rig.py # rig/tests/test_ros2_poc.py
…after the BIAS node, docstring) Coordinated with the session building the candidate with #269 (stimulus node): its hunks edit the --sim argparse neighbourhood, the --foxglove docstring line and the lines after nodes.append(bridge). Ours now sit after --sim-args, after the BIAS node append and after the --sim docstring example, so the two PRs merge without conflict. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
… recorded schema The converter's pure CDR decoder reads no nested message arrays (HostStats carries DiskStats[], NetStats[], GpuStats[], ProcStats[]), and the converter never needs /rig/host, so the typed check deserializes with ROS itself. The info line now says which type was recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
mbreiser
added a commit
that referenced
this pull request
Oct 28, 2026
mbreiser
added a commit
that referenced
this pull request
Oct 28, 2026
This was referenced Oct 28, 2026
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The arena rig now runs the generic host monitor from rig-nodes and records the PC's "pressure" into every run's MCAP bag, so each run carries how loaded the PC was. The monitor publishes CPU per core (window mean + busiest 100 ms), P-/E-core class, sampler lateness, memory, page faults, disks, network, NVIDIA GPU (incl. NVENC) and the top processes, once a second on
/rig/host.The node itself,
rig_nodes.host_monitor, and its messages,rig_interfaces/HostStats(+DiskStats,NetStats,GpuStats,ProcStats), shipped in rig-nodes 0.3.0. They were prototyped on ww18; the prototype is on branchrig/host-monitor-port@ f5cf5a6, and the message spec is ondocs/host-stats-request. This PR is only the arena half:rig/nodes/bridge_node.py(+13): records/rig/hostinto the bag on arrival. It uses the typedHostStatswhenrig_interfaceshas it, else the String JSON fallback.rig/nodes/rig.py(+22): startspython -m rig_nodes.host_monitor --log-dir rig/runlogs --py-root rig/by default.--py-rootlets it name this workspace's nodespy:<script>.--no-host-monitor,--host-monitor-args.rig/tests/test_ros2_poc.py(+81): starts the monitor the same way and adds six checks. It skips them with an info line when the installed rig_nodes has no monitor. The checks:HostStats(when typed);/rig/host≤ 5 % of the run's compressed payload.rig/README.md: one row.fictrac-bridge/bridge.pyis untouched; nothing inrig/pixi.toml/pixi.lockchanges.Depends on the webDisplayTools re-pin to the rig-nodes 0.3.0 channel (and #274) for the monitor to actually start. Until then this PR is inert apart from the bridge subscription.
Tier
Next candidate (rig code; no web-tool change, no version bumps).
Release notes
none (rig-PC ROS graph only; no web tool changes)
Test plan
pixi run test(root): 72/72 filescd rig && pixi run teston ww18 (Windows 11, Core Ultra 9 285K, 24 CPUs, RTX PRO 4500), model fly, no hardware:release/0.3.0@ 5e20dee) first onPYTHONPATH: exit 0, all 6 host-monitor checks pass. 24 samples / 25 s, 24 cores,py:bridge_node/py:fictrac_udp_adapter/py:host_monitorpinned, monitor CPU median 0.9 % of one core,/rig/host4.8 % of the compressed payload (≈ 1 MB/h, String JSON)pixi self-updateto 0.83 andpixi install --locked -e typed.pixi run -e typed test:/rig/hostrecorded asrig_interfaces/msg/HostStats(24 samples / 25 s, fields = the installedHostStats, 24 cores, graph nodes pinned, monitor CPU median 0.9 % of one core). Every check passes except the storage gate: 6.7 % of the compressed payload (1.77 MB/h).typedenvironment only; the default environment (String JSON, whatpixi run riguses) passes at 4.8 %./rig/hostwith rclpy's deserializer (db51439). The converter's pure CDR decoder reads no nested message arrays, and the converter never needs this topic.pixi run rigwith FicTrac + the Studio, confirm/rig/hostin the run's bag🤖 Generated with Claude Code