need help with lspci output

Issues related to hardware problems
Post Reply
bodisha
Posts: 54
Joined: 2015/06/06 23:55:29

need help with lspci output

Post by bodisha » 2016/07/11 22:34:21

Hello and thanks in advance for any help anyone can offer!

I'm trying to understand how to tell what hardware cards are install into what slot on a Centos machine. I believe I understand the lspci output is formatted as bus:slot:function... and that in a hypothetical bare metal machine the bus & slot would correspond to physical bus/slot. If I've misunderstood that could someone please correct me.

My confusion is about the function field. I understand it ranges from 0-7 but do the fields correspond to any particular function? or are the functions vendor specific? Could someone set me straight on this?

Once again thanks in advanced for any help

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: need help with lspci output

Post by aks » 2016/07/15 23:59:27

Physical in this sense means where the solder tracks run, not necessarily what seems to be the obvious physical layout.

All devices have at least 1 function, function 0. As you say, there are 8 possible functions per device, numbered 0-7. Any device that has more than 1 function is a multi-function device. Multi-function devices, such as a combination modem+soundcard will usually have 2 uniquely addressable functions, numbered 0 and 1. It's about addressing *that* function. Additionally, every function has 256 eight-bit registers. Registers 0-3F are defined by the PCI specification and provide a wealth of information about the particular function. Registers 40-FF are vendor defined and control the properties of the function itself.

bodisha
Posts: 54
Joined: 2015/06/06 23:55:29

Re: need help with lspci output

Post by bodisha » 2016/09/15 22:47:20

Thanks for the reply. It sounds like I might be a bit more unclear on the subject of bus/slot than I might have thought. Your reply confused me a bit more than I already was.

"Physical in this sense means where the solder tracks run, not necessarily what seems to be the obvious physical layout."

Could I ask you to clarify a bit please? I'm unsure how solder tracks would differ from the physical layout. In my head they'd pretty much be one in the same. Thanks!

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: need help with lspci output

Post by aks » 2016/09/19 03:44:07

Your reply confused me a bit more than I already was
Glad to be of help :)

What I meant was that a physical slot (let's say from left to right) could actually be physically connected in the order 3 1 2 4. To trace, you would have to trace the tracks. The tracks are the physical layout from the computers viewpoint.

User avatar
TrevorH
Site Admin
Posts: 33227
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: need help with lspci output

Post by TrevorH » 2016/09/19 06:35:32

I'm not sure that there is necessarily any relationship between the physical position of a slot on the motherboard and the slot number as reported by lspci. Yes, there probably should be if everything was logical but real life interferes!
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: need help with lspci output

Post by MartinR » 2016/09/19 09:44:19

The only reliable way I've found is to put a unique board in a slot, boot, lspci, look for the board (record it), shutdown and move to the next slot. It's a right royal PITA with IBM/Lenovo xServers - they have a 5 minute boot time from cold. :-(

Tip: use lspci -tv to see a map of the kernel's view including bridges.

Post Reply