Command Reference#
Monitoring Modes#
Mode |
Tracks |
Overhead |
Use when |
|---|---|---|---|
Thread (default) |
Individual threads (TIDs) |
~5–10% |
Debugging, optimization |
PID ( |
Processes only |
~2–3% |
Production, long-term runs |
Quick Reference#
Task |
Command |
Duration |
|---|---|---|
Quick check |
|
30 s |
Full monitor |
|
until Ctrl-C |
Full monitor (PID mode) |
|
until Ctrl-C |
Monitor specific node |
|
until Ctrl-C |
Extended session |
|
5 min |
Graph only |
|
until Ctrl-C |
Resources only (threads) |
|
until Ctrl-C |
Resources only (PIDs) |
|
until Ctrl-C |
Remote system |
|
until Ctrl-C |
Remote system (PID mode) |
|
until Ctrl-C |
Pipeline graph (interactive) |
|
— |
Pipeline graph (PNG) |
|
— |
KPI charts + report |
|
— |
Thermal dashboard |
|
— |
GPU dashboard |
|
— |
NPU dashboard |
|
— |
List sessions |
|
— |
Re-visualize last session |
|
— |
Clean all data |
|
— |
uv run src/monitor_stack.py --node /slam_toolbox --duration 120 --interval 2
./grafana-monitor.sh --remote-ip 192.168.1.100 --node /slam_toolbox --remote-user ros
monitor_stack.py#
uv run src/monitor_stack.py [OPTIONS]
Option |
Description |
|---|---|
|
Narrow graph discovery to one node (proc delay measured for all nodes) |
|
Name for this session (default: timestamp) |
|
Auto-stop after N seconds |
|
Update interval (default: 5) |
|
Where to save results |
|
Skip resource monitoring |
|
Skip graph monitoring |
|
Process-level only, no thread details |
|
Enable Intel RAPL CPU package power monitoring (writes |
|
Skip auto-visualization on exit |
|
Enable Intel™ GPU monitoring (uses |
|
Enable Intel™ NPU monitoring via sysfs |
|
Monitor a remote machine |
|
SSH user for remote machine (default: ubuntu) |
|
Explicitly set |
|
Group sessions under |
|
Pass |
|
List previous sessions and exit |
uv run src/monitor_stack.py --node /slam_toolbox --session my_test --duration 120
uv run src/monitor_stack.py --remote-ip 192.168.1.100 --node /slam_toolbox
uv run src/monitor_stack.py --resources-only --pid-only --duration 60
ros2_graph_monitor.py#
uv run src/ros2_graph_monitor.py # All nodes
uv run src/ros2_graph_monitor.py --node /slam_toolbox # Scope to one node
uv run src/ros2_graph_monitor.py --node /ctrl --log t.csv # With CSV logging
uv run src/ros2_graph_monitor.py --interval 2 # Custom interval
uv run src/ros2_graph_monitor.py --remote-ip 192.168.1.100
monitor_resources.py#
uv run src/monitor_resources.py # CPU only
uv run src/monitor_resources.py --memory --threads # CPU + memory + threads
uv run src/monitor_resources.py --memory --log out.log # With logging
uv run src/monitor_resources.py --list # List ROS2 processes
uv run src/monitor_resources.py --remote-ip 192.168.1.100 --memory
uv run src/monitor_resources.py --power # + Intel RAPL CPU package power
uv run src/monitor_resources.py --memory --npu --power # CPU + NPU + power
uv run src/monitor_resources.py --check-hw # Probe GPU / NPU / RAPL availability
visualize_timing.py#
uv run src/visualize_timing.py timing.csv --delays --frequencies --output-dir ./plots/
Option |
Description |
|---|---|
|
Message arrival scatter plot |
|
Topic message rates over time |
|
Processing delay over time |
|
Inter-message timing / jitter |
|
Save plots as PNG (omit to display interactively) |
|
Print statistics only, no plots |
visualize_resources.py#
uv run src/visualize_resources.py resource.log --cores --heatmap --top 10 --output-dir ./plots/
uv run src/visualize_resources.py resource.log --summary # text table only
Option |
Description |
|---|---|
|
CPU utilization per core over time |
|
CPU utilization per PID/thread (top N) |
|
Core utilization heatmap |
|
Thread-to-core scatter plot |
|
Number of top threads to show (default: 10) |
|
Save plots as PNG |
|
Print statistics only, no plots |
Note:
pidstatreports CPU% where 100% = 1 full core. On a 20-core system the maximum is 2000%. Use the Avg Cores column in--summaryoutput for a human-readable reading.
visualize_graph.py#
Renders the ROS2 computation graph as a directed topology diagram.
# Headless PNG
uv run src/visualize_graph.py monitoring_sessions/<name> --no-show --output graph.png
# Interactive (click nodes to see topic detail popups)
uv run src/visualize_graph.py monitoring_sessions/<name> --show
Hardware Visualizers (GPU / NPU)#
All visualizers accept a session directory or log file as their first argument and auto-detect the latest session when omitted.
# GPU dashboard (5 panels: busy%, frequency, temperature, power, per-PID)
uv run src/visualize_gpu.py <session_dir>
uv run src/visualize_gpu.py <session_dir> --save
uv run src/visualize_gpu.py <session_dir> --summary
# NPU dashboard (3 panels: busy%, clock frequency, memory)
uv run src/visualize_npu.py <session_dir>
uv run src/visualize_npu.py <session_dir> --no-show
visualize_thermal.py#
Renders CPU/GPU temperature, throttle state, and RAPL power from cpu_power.log and gpu_usage.log.
uv run src/visualize_thermal.py <session_dir> --save # writes 3 PNGs to visualizations/
uv run src/visualize_thermal.py <session_dir> --show # interactive window
uv run src/visualize_thermal.py # auto-uses latest session
Output files written when --save is used:
File |
Contents |
|---|---|
|
Combined 3-panel overview (temp + throttle + power) |
|
CPU / GPU temperature over time |
|
RAPL CPU package power (W) over time |
# Makefile shortcut
make visualize-thermal
make visualize-thermal SESSION=monitoring_sessions/<name>
Common option |
Description |
|---|---|
|
Explicit session directory |
|
Save PNG here (default: session |
|
Write PNG without opening a window |
|
Open an interactive matplotlib window |
|
Never open a window (headless / CI) |
|
Print text summary only, no plot |
Enable GPU logging with
--gpuand NPU logging with--npuonmonitor_stack.py. Intel™ GPU monitoring requiresqmassa(make install-qmassa).
visualize_kpi.py#
Generates publication-ready charts from kpi.json files produced by the
benchmark framework. Supports latency histograms, cross-SKU comparisons,
resource utilization breakdowns, and Level-2 throughput/drop-rate charts.
# All charts for a session directory
uv run src/visualize_kpi.py --session monitoring_sessions/<name>
# Cross-SKU comparison
uv run src/visualize_kpi.py \
--kpi mtl.json arl.json ptl.json \
--label MTL ARL PTL \
--output-dir charts/
# SVG output
uv run src/visualize_kpi.py --session <dir> --format svg
Option |
Description |
|---|---|
|
Session directory containing |
|
One or more |
|
SKU labels matching |
|
Path to |
|
Output directory for charts (default: |
|
Output image format (default: |
analyze_rosbag.py#
Analyses a ROS2 bag file and prints per-topic statistics, message latency,
and node graph information. Accepts SQLite3 .db3 or .mcap bag files.
uv run src/analyze_rosbag.py path/to/bag.db3
uv run src/analyze_rosbag.py path/to/bag.mcap
All analysis is run automatically and printed to stdout.
Scenario Benchmark Runner#
benchmark_runner.sh is the generic orchestrator used by all scenario run scripts.
It is driven entirely by a YAML run profile (config/*.yaml).
bash src/benchmark_runner.sh --run-config config/wandering_run.yaml
bash src/wandering_run.sh --record --plot # record KPI bag + generate plots
bash src/wandering_run.sh --show # record + plot + auto-open HTML report
bash src/wandering_run.sh --timeout 120 # hard stop after 2 min
Flag |
Description |
|---|---|
|
Record KPI topics to an MCAP bag |
|
Save trigger-timeline PNG charts after analysis |
|
Implies |
|
Override YAML stop timeout |
|
Stop after N goal events |
|
Session parent directory |
Progress stages printed during each run:
[1/6] Pre-run cleanup
[2/6] Launching <scenario> simulation
[3/6] Starting monitor stack
[4/6] Running benchmark
[5/6] Post-Run Analysis (scenario-specific, e.g. fastmapping log parse)
[6/6] Trigger-Latency Analysis
Make targets (plain targets default to --record --plot):
make wandering # single run with record + plot
make wandering SHOW=1 # single run + auto-open report
make wandering-benchmark RUNS=5 TIMEOUT=120 # 5-run benchmark + aggregate
make picknplace-run # single run with record + plot
make fastmapping # single run with record + plot
make fastmapping SHOW=1 # single run + auto-open report
bag_replay_run.sh / make bag-replay#
Replays a previously recorded bag file through the monitoring stack, enabling reproducible offline benchmarking and CI integration.
# Via Makefile (recommended)
make bag-replay BAG=/path/to/bag.db3
make bag-replay BAG=/path/to/bag.db3 RATE=0.5 RUNS=5
# Directly
./src/bag_replay_run.sh /path/to/bag.db3
Variable |
Default |
Description |
|---|---|---|
|
(required) |
Path to the bag file to replay |
|
|
Playback rate multiplier |
|
|
Loop the bag continuously |
|
|
Number of benchmark repetitions |
|
|
Seconds to pause between runs |
fastmapping_run.sh / make fastmapping#
Runs the FastMapping RGB-D SLAM benchmark, which exercises the fast-mapping pipeline across a sequence of depth images.
# Single run
make fastmapping
# Multiple runs (benchmark mode)
make fastmapping-benchmark RUNS=10
# Visualize results
make fastmapping-plot
See FastMapping Benchmark for a complete walkthrough.
Grafana Dashboard Commands#
Command |
Description |
|---|---|
|
Start Grafana + Prometheus (Docker) |
|
Stop the stack |
|
Check services — shows URL http://localhost:30000 |
|
Export session metrics to Prometheus |
|
Continuously export live monitoring data |
|
Open dashboard in browser |
Metrics are exposed on port 9092 (Prometheus occupies 9090 in
host-network mode). Prometheus is pre-configured to scrape localhost:9092.
Remote Monitoring#
Component |
How it works |
|---|---|
Graph monitor |
DDS peer discovery via |
Resource monitor |
Runs |
Results are stored and visualized locally on the monitoring machine.
uv run src/monitor_stack.py --remote-ip 192.168.1.100
uv run src/monitor_stack.py --remote-ip 192.168.1.100 --remote-user ros --node /slam_toolbox
uv run src/monitor_stack.py --remote-ip 192.168.1.100 --pid-only --duration 120
Troubleshooting#
Problem |
Fix |
|---|---|
No ROS2 processes found |
Run |
Monitor exits immediately |
Source ROS2: |
Visualizations not generated |
Run |
Permission denied |
Run |
Remote: no data |
Check SSH auth and matching |
CPU shows e.g. “563%” |
Normal — 100% = 1 core. Check Avg Cores column. |
|
|
Graph click does nothing |
Use |