Operating System - Linux
1823255 Members
3117 Online
109648 Solutions
New Discussion юеВ

How to map PCIe slot to card

 
ChuckOvits
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.
2 REPLIES 2
Suman_1978
HPE Pro

Re: How to map PCIe slot to card

Hi,

Have you tried setpci command?
http://linux.die.net/man/8/setpci
http://linux.about.com/library/cmd/blcmdl8_setpci.htm

Hope this helps.


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Matti_Kurkela
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.

MK
MK