Redis Tools
Two utilities are provided for inspecting the Redis cache — useful for verifying that the navigation collector is running, that the dive detector is writing state, and that sensor values look correct.
redis_dump
File: backend/redis_dump.py
Prints a snapshot of all keys in a bucket as a formatted table using Rich.
Usage
Arguments:
| Argument | Description |
|---|---|
bucket |
Required. Key prefix to inspect, e.g. rcsn |
--redis-host |
Redis hostname (default: localhost) |
--redis-port |
Redis port (default: 6379) |
Example:
Outputs a table of all rcsn:* keys sorted alphabetically, one row per
key.
redis_dump_textual
File: backend/redis_dump_textual.py
An auto-refreshing terminal UI built with Textual that shows live Redis values as they update.
Usage
Arguments:
| Argument | Description |
|---|---|
bucket |
Required. Key prefix to inspect, e.g. rcsn |
--redis-host HOST |
Redis hostname (default: localhost) |
--redis-port PORT |
Redis port (default: 6379) |
--refresh-interval SECS |
Auto-refresh period (default: 5) |
--web |
Serve the TUI over HTTP instead of running in the terminal |
--host HOST |
Web server host when --web is used (default: localhost) |
--port PORT |
Web server port when --web is used (default: 8000) |
Keyboard shortcuts:
| Key | Action |
|---|---|
r |
Force immediate refresh |
q |
Quit |
Example — terminal mode:
Example — web mode (useful on headless servers):
Then open http://<server>:8000 in a browser.
Checking the live system
To verify the keys the dive detector and dashboard rely on:
# Quick one-shot snapshot
uv run backend/redis_dump.py rcsn
# Live monitor
uv run backend/redis_dump_textual.py rcsn --refresh-interval 2
Expected output (ROV in water at ~47 m, dashboard auto-stream on, force off, OBS healthy and streaming):