Files
rmon/USER_GUIDE.md
2026-04-11 21:11:15 +02:00

3.3 KiB

RMon User Guide

This guide explains how to configure and use the RMon Agent and UI to monitor remote data.

RMon Agent

The Agent is a lightweight server that runs on the remote machine. It collects data from configured sources and sends it to the UI.

Persistent Storage

  • All signals are persistently logged to ~/.rmon/data/.
  • Logs are stored in an optimized binary format ((i64, f64) pairs).
  • Data is kept until explicitly deleted, ensuring no data loss when the UI is closed.

Configuration (~/.rmon/config.toml)

The agent is configured via a TOML file. The UI can deploy this file automatically, but it can also be edited manually. Note: Every source must define its own timestamp configuration.

UDP Source

Useful for high-frequency binary data.

[[sources]]
type = "udp"
name = "imu_stream"
bind = "0.0.0.0:9000"

[sources.timestamp]
byte_offset = 24
byte_type = "u64_le"
format = "microseconds_since_epoch"

[[sources.signals]]
id = "accel_x"
label = "Accelerometer X"
unit = "m/s²"
scale = 0.001
offset = 0.0
byte_offset = 0
byte_type = "f32_le"
path = ["imu", "accelerometer"]

CSV Source

Useful for log files being written by other processes. Supports mapping specific columns to signals and parsing custom timestamp formats.

[[sources]]
type = "csv"
name = "sensor_logs"
path = "/path/to/data.csv"
poll_interval = "500ms"

[sources.timestamp]
column = "0" # 0-indexed column for the timestamp
# Format can be "nanoseconds_since_epoch", "seconds_since_epoch", 
# or a custom strftime string (e.g., "%Y-%m-%d %H:%M:%S")
format = "%Y-%m-%d %H:%M:%S" 

[[sources.signals]]
id = "temp_1"
label = "Temperature 1"
unit = "°C"
column = "1" # Mapped to the second column
scale = 1.0
offset = 0.0
path = ["sensors"]

[[sources.signals]]
id = "pressure"
label = "System Pressure"
unit = "bar"
column = "2" # Mapped to the third column
scale = 0.1
offset = 0.0
path = ["sensors"]

Shell Source

Highly flexible — run any command and parse the output with Regex.

[[sources]]
type = "shell"
name = "system_status"
command = "echo \"cpu_temp: $(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null | awk '{print $1/1000}' || echo 0)\""
poll_interval = "1s"

[sources.timestamp]
format = "none" # Use agent arrival time

[[sources.signals]]
id = "cpu_temp"
label = "CPU Temperature"
unit = "°C"
scale = 1.0
regex = "cpu_temp: ([0-9.]+)"
path = ["system", "thermal"]

RMon UI

The UI is the central control point for RMon.

Connection and Deployment

  1. SSH Host: Enter the hostname or alias (from ~/.ssh/config) of the remote machine.
  2. Agent Port: Default is 7891.
  3. Connect: Click 🚀 to connect. If the agent is not running, the UI will automatically deploy the pre-built binary and start it as a persistent background process.
  4. Disconnect: Clicking 🔌 closes the UI's connection, but the agent continues to collect and store data on the remote machine.
  5. Kill Agent: Clicking 💀 will terminate the remote agent process.

Visualization

  • Signals Tree: All signals are grouped into a hierarchical tree based on their path configuration.
  • Plots: Check a signal's box to add it to the real-time plotting area.
  • Scroll & Zoom: The plots are interactive. Use the mouse wheel to zoom and drag to pan.