At the end of Dell World 2012, I met a customer for an informal discussion. The customer optimizes their Linux deployments for high performance. These optimizations require certain PCIe controller in specific PCIe slots for different servers. Sometimes, these PCIe controllers are not installed in the specified slots and the customer’s software deployment process is not able to catch it – requiring manual audits. My immediate thought was what about lspci? Well, looking a bit carefully, lspci seems to use the bus address as name for a slot which is not much help if looking for the name printed next to the slot socket.
Apparently, there is no Linux command for listing devices by slots – that is by physical add-in slots or that is what many folks have told me. However, this can be done in two steps as described below,
- Run dmidecode –t slot and match Bus Address and Designation for populated PCI slots
- Run lspci –s to get info about device at the Bus Address for a given PCI slot.
These steps can be scripted while someone out there is thinking about providing this capability in existing tools.