This tool turns lspci output into a graphviz graph representing a machine's PCI(e) switches and devices.
It was originally written to help debug performance problems on large GPU servers.
Make sure you have graphviz installed, and then run:
(dmidecode; lspci -nnvv) | cargo run > pci.dot
dot -Tpng pci.dot > pci.pngIncluding dmidecode output is optional. If it is included, pcigraph will annotate the produced graph with any PCI slot names found in System Slot Information (DMI type 9) records in the dmidecode output.