Package: pcicrawler
pcicrawlerpcicrawleris a CLI tool to display/filter/export information about PCI or PCI
Express devices and their topology.Usagepcicrawlermust be run as root.The full--helpmessage is shown below.Usage:pcicrawler[OPTIONS]Tooltodisplay/filter/exportinformationaboutPCIorPCIExpressdevices,aswellastheirtopology.Mustrunasrootasitusesprivilegedsysfsentries.

Options:-c,--class-idTEXTOnlyshowdevicesmatchingthisPCIclassIDinhex,oroneof:nvme,ethernet,raid,gpu-d,--deviceTEXTOnlyshowdevicesmatchingthisPCIvendor/deviceID,(syntaxlikevendor:device,orvendor:,inhex)-e,--express-only/--no-express-onlyOnlyshowPCIedevices-j,--json/--no-jsonOutputinJSONformat-p,--include-path/--no-include-pathIncludedevicesupstreamofmatcheddevices-s,--addrTEXTShowdevicewiththisPCIaddress-t,--tree/--no-treeOutputasatree-v,--verbose/--no-verboseShowdebuggingoutput-notcompatiblewithJSON/treeviews-V,--vpd/--no-vpdIncludeVPDdataifpresent,doesnotworkwith--tree-x,--hexify/--no-hexifyOutputvendor/device/classIDsashexstringsinsteadofnumbersinJSONoutput-a,--aer/--no-aerIncludePCIeAdvancedErrorReporting(AER)informationwhenavailable-onlyprovidedinJSONoutput--helpShowthismessageandexit.ExamplesThe most common use forpcicrawleris calling it with its--treeoption.(run as root)$pcicrawler-t00:00.0root_port00:1d.0root_port,"M.2 PCIE SSD - Boot drive SSD 0",slot8,devicepresent,speed8GT/s,widthx4└─01:00.0endpoint,ToshibaAmericaInfoSystems(1179),device011600:1d.4root_port,"MEZZ_Conn",slot12,devicepresent,speed8GT/s,widthx2└─02:00.0endpoint,MellanoxTechnologies(15b3)MT27710Family[ConnectX-4Lx](1015)64:02.0root_port,"M.2 PCIE SSD - 2nd Storage SSD 2",slot7,devicepresent,speed8GT/s,widthx4└─65:00.0endpoint,SamsungElectronicsCoLtd(144d),devicea80864:03.0root_port,"M.2 PCIE SSD - 1st Storage SSD 1",slot8,devicepresent,speed8GT/s,widthx4└─66:00.0endpoint,SamsungElectronicsCoLtd(144d),devicea808Filter the output with the-soption.(run as root)$pcicrawler-s02:00.0-t00:1d.4root_port,"MEZZ_Conn",slot12,devicepresent,speed8GT/s,widthx2└─02:00.0endpoint,MellanoxTechnologies(15b3)MT27710Family[ConnectX-4Lx](1015)Filter the output, list VPD data (if any), and put into machine-readable format (JSON).(run as root)$pcicrawler-s02:00.0-V-j|python-mjson.tool{"0000:02:00.0":{"addr":"0000:02:00.0","capable_speed":"8GT/s","capable_width":2,"class_id":131072,"cur_speed":"8GT/s","cur_width":2,"device_id":4117,"express_type":"endpoint","location":"MEZZ_Conn","path":["0000:02:00.0","0000:00:1d.4"],"subsystem_device":633,"subsystem_vendor":5555,"target_speed":"8GT/s","vendor_id":5555,"vpd":{"fields":{"EC":"A2","PN":"MCX4431N-GCAN_FB","SN":"MT1751X14794","V0":"PCIeGen3 x8","V2":"MCX4431N-GCAN_FB","V3":"8427f48749ebe7118000ec0d9ad2c336","VA":"MLX:MODL=CX4431N:MN=MLNX:CSKU=V2:UUID=V3:PCI=V0"},"identifier_string":"CX4431N - ConnectX-4 LX QSFP28"}}}Howpcicrawlerworkspcicrawlerretrieves information about a device from its resources in sysfs. For
more information about how devices are organized on the system, visithttps://www.kernel.org/doc/Documentation/filesystems/sysfs-pci.txt.Requirementspcicrawlerrequires Python3 and works withCentOS Linux 7Buildingpcicrawlerpcicrawleris a Python package and a built.whldistribution can be made withpython3setup.pybdist_wheelInstallingpcicrawlerpcicrawleris a Python package and can be installed from within the directory withpython3setup.pyinstallContributing topcicrawlerSee theCONTRIBUTINGfile for information on how to help out.Licensepcicrawleris  licensed, as found in theLICENSEfile.