hdds-discovery-dump
Dump live DDS discovery state - see participants, topics, readers, and writers on your network.
Overview
hdds-discovery-dump joins a DDS domain and displays the discovery state after collecting announcements. It shows all discovered participants with their endpoints, and all topics with their associated writers and readers.
Installation
From Source
cd hdds/tools/hdds-discovery-dump
cargo build --release
Binary at target/release/hdds-discovery-dump.
From Cargo
cargo install hdds-discovery-dump
Usage
hdds-discovery-dump [OPTIONS]
Options:
-d, --domain <DOMAIN> DDS domain ID [default: 0]
--timeout <TIMEOUT> Discovery duration in seconds [default: 5]
-f, --format <FORMAT> Output format: pretty, json [default: pretty]
-w, --watch <WATCH> Continuous monitoring mode (refresh every N seconds)
-t, --topic <TOPIC> Filter by topic name
--quiet Compact output
-h, --help Print help
-V, --version Print version
Examples
Basic Discovery Dump
hdds-discovery-dump
Output:
>>> Discovery dump (domain=0)
Discovering for 5 seconds...
=== DDS Discovery State ===
Participants: 3 participant(s) discovered
[1] 01aa0001.c0a80064.00000001.000001c1
State: Alive
Endpoints: 7400, 7401
Lease: 10000ms (expires in 8523ms)
[2] 010f0001.c0a80065.00000002.000001c1
State: Alive
Endpoints: 7400, 7401
Lease: 15000ms (expires in 12100ms)
Topics: 2 topic(s)
Topic: temperature
Writers: 1 Readers: 2
W 01aa0001.c0a80064.00000001.00000102 (type: Temperature)
R 010f0001.c0a80065.00000002.00000107 (type: Temperature)
R 01aa0001.c0a80064.00000003.00000107 (type: Temperature)
Topic: sensor_data
Writers: 2 Readers: 1
W 01aa0001.c0a80064.00000001.00000202 (type: SensorReading)
W 010f0001.c0a80065.00000002.00000202 (type: SensorReading)
R 01aa0001.c0a80064.00000003.00000207 (type: SensorReading)
--- Summary ---
Participants: 3 Topics: 2 Writers: 3 Readers: 3
Different Domain
hdds-discovery-dump -d 42
Longer Discovery Time
For networks with slow discovery or many participants:
hdds-discovery-dump --timeout 15
JSON Output
hdds-discovery-dump --format json
Output:
{"domain":0,"participants":[{"guid":"01aa0001.c0a80064.00000001.000001c1","state":"Alive","endpoints":["7400","7401"],"lease_ms":10000}],"topics":[{"name":"temperature","writers":[{"guid":"01aa0001.c0a80064.00000001.00000102","type":"Temperature"}],"readers":[{"guid":"01aa0001.c0a80064.00000003.00000107","type":"Temperature"}]}]}
Pretty-print with jq:
hdds-discovery-dump -f json | jq .
Watch Mode (Continuous Monitoring)
Refresh every 2 seconds:
hdds-discovery-dump -w 2
The screen clears and updates with fresh discovery state. Press Ctrl+C to stop.
Filter by Topic
Only show topics matching a pattern:
hdds-discovery-dump -t temperature
hdds-discovery-dump -t sensor
Quiet Mode
Compact single-line output per item:
hdds-discovery-dump --quiet
Output:
[1] 01aa0001.c0a80064.00000001.000001c1 (Alive) 7400, 7401
[2] 010f0001.c0a80065.00000002.000001c1 (Alive) 7400, 7401
temperature (1W/2R)
sensor_data (2W/1R)
Combine Options
Watch a specific topic in quiet mode:
hdds-discovery-dump -w 1 -t chatter --quiet
Output Details
Participant Information
| Field | Description |
|---|---|
| GUID | 16-byte globally unique identifier (format: prefix.prefix.prefix.entityId) |
| State | Alive or Stale (lease expired) |
| Endpoints | Locator ports (multicast/unicast) |
| Lease | Remaining time before participant is considered dead |
Topic Information
| Field | Description |
|---|---|
| Name | Topic name string |
| Writers | Count and list of DataWriters |
| Readers | Count and list of DataReaders |
| Type | Data type name for each endpoint |
Vendor Identification
GUID prefixes identify vendors:
01aa....- HDDS010f....- FastDDS (eProsima)0101....- RTI Connext0110....- CycloneDDS0103....- OpenDDS
Use Cases
Network Debugging
Check if publishers and subscribers have discovered each other:
hdds-discovery-dump -t my_topic
If writers exist but no readers (or vice versa), there's a discovery or QoS mismatch.
Cross-Vendor Interop Testing
Verify participants from different DDS vendors can see each other:
hdds-discovery-dump --timeout 10 -f json | jq '.participants[].guid'
Continuous Monitoring Dashboard
Run in watch mode to monitor a live system:
hdds-discovery-dump -w 5
Scripted Health Checks
# Check if any participants exist
count=$(hdds-discovery-dump --timeout 3 -f json | jq '.participants | length')
if [ "$count" -eq 0 ]; then
echo "No DDS participants found!"
exit 1
fi
Export Discovery State
hdds-discovery-dump -f json > discovery_$(date +%Y%m%d_%H%M%S).json
Comparison with Other Tools
| Feature | hdds-discovery-dump | RTI Admin Console | FastDDS Monitor |
|---|---|---|---|
| CLI-based | Yes | No (GUI) | No (GUI) |
| JSON export | Built-in | XML | JSON |
| Cross-vendor | Yes | RTI only | FastDDS only |
| Watch mode | Yes | Yes | Yes |
| Topic filter | Yes | Yes | Yes |
| Lightweight | ~2MB | ~500MB | ~100MB |
Troubleshooting
No Participants Found
- Check domain ID matches other participants
- Verify multicast is enabled on your network
- Increase timeout:
--timeout 15 - Check firewall allows UDP ports 7400-7500
Discovery Not Available
If you see "Discovery not available (intra-process mode?)":
- The participant was created with
IntraProcesstransport only - Switch to
UdpMulticasttransport to enable network discovery
Stale Participants
Participants showing State: Stale have missed their lease renewal:
- The remote process may have crashed
- Network connectivity issues
- Lease duration too short for network latency
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (DDS initialization failed, etc.) |