Linux使用dmidecode来查看机器有几根内存插槽,哪个槽上有内存

直接输入dmidecode即可,输出有很多,好像是根据SM总线来查询的,包括能查询到BIOS的地址空间和其中的信息等等,内存信息只是其中的一部分。摘录如下:
Handle  0x001C
        DMI type 
16 ,   15  bytes .
        Physical Memory Array
                Location
:   System  Board Or Motherboard
                
Use :   System  Memory
                Error Correction Type
:  None
                Maximum Capacity
:   4  GB
                Error Information Handle
:  Not Provided
                Number Of Devices
:   4
Handle 
0x001D
        DMI type 
17 ,   21  bytes .
        Memory Device
                Array Handle
:   0x001C
                Error Information Handle
:  Not Provided
                Total Width
:  Unknown
                Data Width
:  Unknown
                Size
:   No  Module Installed
                Form Factor
:  DIMM
                Set
:  None
                Locator
:  A0
                Bank Locator
:  Bank0 / 1
                Type
:  Unknown
                Type Detail
:  Unknown
Handle 
0x001E
        DMI type 
17 ,   21  bytes .
        Memory Device
                Array Handle
:   0x001C
                Error Information Handle
:  Not Provided
                Total Width
:  Unknown
                Data Width
:  Unknown
                Size
:   No  Module Installed
                Form Factor
:  DIMM
                Set
:  None
                Locator
:  A1
                Bank Locator
:  Bank2 / 3
                Type
:  Unknown
                Type Detail
:  Unknown
Handle 
0x001F
        DMI type 
17 ,   21  bytes .
        Memory Device
                Array Handle
:   0x001C
                Error Information Handle
:  Not Provided
                Total Width
:   64  bits
                Data Width
:   64  bits
                Size
:   512  MB
                Form Factor
:  DIMM
                Set
:  None
                Locator
:  A2
                Bank Locator
:  Bank4 / 5
                Type
:  SDRAM
                Type Detail
:  Synchronous
Handle 
0x0020
        DMI type 
17 ,   21  bytes .
        Memory Device
                Array Handle
:   0x001C
                Error Information Handle
:  Not Provided
                Total Width
:  Unknown
                Data Width
:  Unknown
                Size
:   No  Module Installed
                Form Factor
:  DIMM
                Set
:  None
                Locator
:  A3
                Bank Locator
:  Bank6 / 7
                Type
:  Unknown
                Type Detail
:  Unknown

 

 从这段输出可以看出,第一个Physical Memory Array是总体的内存信息,从这里可以看到有四个内存插槽、机器最大支持的内存总量等。然后下面开始就是每个内存插槽的情况,在这里可以看到,第三个内存插槽上插了一根512M的内存。 


更多的信息请参考dmidecode的手册。

你可能感兴趣的:(decode)