System Administration
Showing results for 
Search instead for 
Did you mean: 

How to map PCIe slot to card

New Member

How to map PCIe slot to card

lspci does not include this info. How,from a command line in Linux , can you uniquely identify a single card and what physical slot it is in (WWN,MAC,IP would also be helpful). dmidecode only lists that a slot is in use. lspci does not list this info. Thanks.

Re: How to map PCIe slot to card


Have you tried setpci command?

Hope this helps.

I work for HPE

Accept or Kudo

Honored Contributor

Re: How to map PCIe slot to card

Unfortunately, there is no standard method for numbering the physical slots that would be applicable to all PC chassis types. When a system board is designed, the hardware designer will decide which PCIe bus/slot ID will be wired to which physical slot.

Good hardware manufacturers might include this information in hardware documentation; bad ones won't. So the answer might be "read the hardware documentation".

With NICs, you can use "ethtool --identify ethX NN", which will blink or light up the LEDs of the chosen NIC in a pattern that should be distinguishable from the regular usage for the time of NN seconds.

For example, "ethtool --identify eth0 30" will blink eth0's LEDs for 30 seconds.

In FibreChannel HBAs, a similar feature is usually called "beacon": with Qlogic HBAs on RHEL5 and newer, you can enable the beacon feature through sysfs.

Example: to enable beacon LED blink on "host0" HBA, run:
echo 1 > /sys/class/scsi_host/host0/beacon

To disable it again, run:
echo 0 > /sys/class/scsi_host/host0/beacon

I think Emulex HBAs might have a similar feature, but I'm not sure if it can be started in the same way.