一、常规lscpi
lspci | grep Non-Volatile
03:00.0 Non-Volatile memory controller ...
其解释为(域 0)、总线 03、设备 00、功能 0。
dmidecode的相关部分:
dmidecode -t slot
Handle 0x0026, DMI type 9, 17 bytes
System Slot Information
Designation: PCIE3
Type: x16 PCI Express 3 x16
Current Usage: In Use
Length: Long
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:03:02.0
显示域 0、总线 3、设备 2、功能 0。
现在,从 lspci 树视图中可以看到那里有一座桥:
lspci -tv | grep -C 3 Non-Volatile
\-[0000:00]-+-00.0 Intel Corporation Xeon E5/Core i7 DMI2
+-01.0-[01]--
+-01.1-[02]--
+-02.0-[03]----00.0 Non-Volatile memory controller ...
桥接器是总线 0 上的设备 2,但是 dmidecode 认为插槽是总线 3 上的设备 2,这有点奇怪。
答案1
man dmidecode
说
...
dmidecode is a tool for dumping a computer's DMI (some say
SMBIOS) table contents in a human-readable format.
...
While this is a good point in terms of report speed and safeness,
this also makes the presented information possibly unreliable.
...
Linux 内核知道它使用的地址。所以我会依赖 sysfs 和 lspci。