v2.5
What's New
nic-xray.sh v2.0 — Network Topology Diagrams
Generate visual network topology diagrams showing server-to-switch connectivity directly from nic-xray.sh.
New Features
--output dot— Pure Graphviz DOT source to stdout (no dependencies)--output svg— Render SVG topology diagram via graphviz--output png— Render PNG topology diagram via graphviz--diagram-out FILE— Custom output file path for SVG/PNG
Diagram Visual Elements
- Left-to-right layout: server on left, switches on right
- Bond clusters with dashed blue borders and LACP status labels
- Interface nodes with colored borders (green=UP, red=DOWN), driver and link state
- Edge labels with port name, speed/duplex, and VLAN information
- Edge thickness scaled by speed tier
- Switch nodes with orange borders
- Disconnected interfaces shown with dashed gray lines
- Dark theme (Catppuccin Mocha-inspired) for good contrast
Dependencies
--output dotrequires no additional dependencies--output svg/--output pngrequiregraphviz(dotcommand)- Graceful error with fallback suggestion if graphviz is not installed
Usage Examples
# Generate DOT source for external rendering
sudo nic-xray.sh --output dot > topology.dot
# Generate SVG diagram (saved to /tmp/nic-xray-<hostname>.svg)
sudo nic-xray.sh --output svg
# Generate PNG with custom path
sudo nic-xray.sh --output png --diagram-out /tmp/network.png