A command-line tool for interrogating mrpd REST APIs.
The tool requires Python 3 and the requests library:
pip install requestsMake the script executable:
chmod +x mrp./mrp [--host HOST] [--port PORT] [--format FORMAT] {msrp|mvrp|mmrp} ...
--host HOST- mrpd host (default: localhost)--port PORT- mrpd REST API port (default: 80)--format {json|table}- Output format (default: table)
./mrp msrp port./mrp msrp port eth0This displays:
- Port status (enabled, AS capable, forwarding)
- Talker streams (stream ID, destination, latency, registration status)
- Failed talker streams (with failure codes and reasons)
- Listener streams (stream ID, type, registration status)
- SR class information (Class A/B with bandwidth, priority, VLAN)
./mrp msrp stream./mrp msrp stream 91e0f000f7d4c0004139aabbccdd00aaThis displays:
- Stream properties (destination, VLAN, priority, bandwidth, rank)
- Talker information (port, type)
- Listener information (ports, connection status)
./mrp mvrp port./mrp mvrp port eth0This displays all registered VLANs with their registration and declaration status.
./mrp mmrp port./mrp mmrp port eth0This displays all registered MAC addresses with their registration and declaration status.
./mrp --host 10.10.32.205 msrp port./mrp --format json msrp stream 91e0f000f7d4c0004139aabbccdd00aa./mrp --host 10.10.32.205 msrp port eth0./mrp --host 10.10.32.205 msrp streamHuman-readable tables with aligned columns.
Raw JSON output from the API, useful for scripting and automation.