Skip to content

v2.5

Choose a tag to compare

@ciroiriarte ciroiriarte released this 27 Feb 20:11
· 15 commits to main since this release

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 dot requires no additional dependencies
  • --output svg / --output png require graphviz (dot command)
  • 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