Quickstart

Get started analyzing DDS traffic with hdds-viewer in minutes.

Installation

From Cargo

cargo install hdds-viewer

From Binary Release

# Linux x86_64

curl -LO https://git.hdds.io/hdds/hdds/releases/download/latest/hdds-viewer-linux-x86_64.tar.gz

tar xzf hdds-viewer-linux-x86_64.tar.gz

sudo mv hdds-viewer /usr/local/bin/

Build from Source

git clone https://git.hdds.io/hdds/hdds.git

cd hdds/tools/hdds-viewer

cargo build --release

Quick Start

View Live Traffic

Monitor DDS traffic on domain 0:

hdds-viewer --domain 0

Output:

HDDS Viewer v1.0.0 - Monitoring domain 0

[12:34:56.123] PARTICIPANT DISCOVERED

GUID: 01.0f.ab.cd.12.34.56.78|0.0.1.c1

Host: sensor-node-1

Process: sensor_publisher (PID 1234)

[12:34:56.456] TOPIC DISCOVERED

Name: SensorTopic

Type: sensors::SensorData

Writers: 1, Readers: 0

[12:34:57.001] DATA RECEIVED (SensorTopic)

sensor_id: 1

value: 25.5

timestamp: 1703847297001234567

Monitor Specific Topic

hdds-viewer --domain 0 --topic SensorTopic

Live Statistics

Show real-time statistics:

hdds-viewer --domain 0 --stats

Output:

┌─────────────────────────────────────────────────────────┐

│ HDDS Viewer - Domain 0 │

├─────────────────────────────────────────────────────────┤

│ Participants: 3 Topics: 5 Writers: 8 Readers: 12 │

├─────────────────────────────────────────────────────────┤

│ Topic │ Rate │ Bytes/s │ Writers │

├─────────────────────┼───────────┼───────────┼──────────┤

│ SensorTopic │ 100 Hz │ 4.8 KB/s │ 2 │

│ CommandTopic │ 10 Hz │ 320 B/s │ 1 │

│ StatusTopic │ 1 Hz │ 128 B/s │ 3 │

└─────────────────────────────────────────────────────────┘

Capture and Analyze

Record to File

Capture traffic to a file for later analysis:

hdds-viewer --domain 0 --record capture.hddscap

Analyze Capture

Analyze a recorded capture:

hdds-viewer --analyze capture.hddscap

Output:

Capture Analysis: capture.hddscap

Duration: 5m 23s

Samples: 32,456

Top Topics by Volume:

1. SensorTopic - 25,000 samples (77%)

2. TelemetryTopic - 5,456 samples (17%)

3. CommandTopic - 2,000 samples (6%)

Latency Statistics (SensorTopic):

Min: 0.12 ms

Max: 4.56 ms

Avg: 0.34 ms

P99: 1.23 ms

Export to PCAP

Convert capture to Wireshark-compatible format:

hdds-viewer --convert capture.hddscap --output capture.pcap

ML-Based Analysis

Anomaly Detection

Enable ML-powered anomaly detection:

hdds-viewer --domain 0 --ml-detect

Output:

[12:35:01.234] ANOMALY DETECTED

Topic: SensorTopic

Type: Latency Spike

Expected: 0.3 ms, Observed: 15.2 ms

Confidence: 98.7%

[12:35:02.567] ANOMALY DETECTED

Topic: CommandTopic

Type: Missing Samples

Expected rate: 10 Hz, Observed: 3 Hz

Confidence: 95.2%

Traffic Classification

Classify traffic patterns:

hdds-viewer --analyze capture.hddscap --classify

Output:

Traffic Classification Results:

Normal Operation: 94.2%

High Load: 4.1%

Degraded: 1.5%

Attack/Anomaly: 0.2%

Detected Patterns:

- Periodic sensor data (100 Hz)

- Request-response commands

- Heartbeat traffic

Common Use Cases

Debug Discovery Issues

Watch discovery traffic:

hdds-viewer --domain 0 --discovery-only

Monitor QoS Violations

Alert on QoS issues:

hdds-viewer --domain 0 --qos-alerts

Compare Before/After

Compare two captures:

hdds-viewer --diff before.hddscap after.hddscap

Output Formats

JSON Output

hdds-viewer --domain 0 --format json | jq '.'

CSV Export

hdds-viewer --analyze capture.hddscap --format csv > data.csv

Live Web Dashboard

Start web interface:

hdds-viewer --domain 0 --web --port 8080

Access at http://localhost:8080.

Filter Expressions

Filter by topic pattern:

hdds-viewer --domain 0 --filter "topic =~ 'Sensor.*'"

Filter by content:

hdds-viewer --domain 0 --filter "data.value > 100"

Combine filters:

hdds-viewer --domain 0 --filter "topic == 'SensorTopic' AND data.sensor_id == 1"

Configuration

Config File

Create ~/.config/hdds-viewer/config.toml:

[default]

domain = 0

format = "pretty"

color = true

[ml]

anomaly_threshold = 0.95

model_path = "~/.config/hdds-viewer/models/"

[capture]

max_size = "1GB"

rotate = true

Environment Variables

export HDDS_VIEWER_DOMAIN=0

export HDDS_VIEWER_LOG_LEVEL=debug