linux下dmidecode命令查看内存型号的例子

发布时间:2020-02-18编辑:脚本学堂
本文介绍下,在linux中用dmidecode命令查看内存型号等信息的方法,有需要的朋友,参考下吧。

linux系统中,查看内存型号信息,可以使用命令dmidecode。

例如:
 

# dmidecode -t memory
# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: Multi-bit ECC
    Maximum Capacity: 32 GB          《最大支持的内存数》
    Error Information Handle: Not Provided
    Number Of Devices: 8                    《插槽数》

Handle 0x1100, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 1024 MB                                 《已有的1G》
    Form Factor: FB-DIMM
    Set: 1
    Locator: DIMM1
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM                        《型号》
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)                     《频率》
    Manufacturer: 855185518551
    Serial Number: 02036124
    Asset Tag: 450728
    Part Number: 72T128420HFA3SB  

Handle 0x1101, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 1024 MB                            《已有的1G》
    Form Factor: FB-DIMM
    Set: 1
    Locator: DIMM2
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM                   《型号》
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)                  《频率》
    Manufacturer: 80AD808980AD
    Serial Number: 47714406
    Asset Tag: 010736
    Part Number: HYMP512F72CP8N3-Y5

Handle 0x1102, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 1024 MB                               《已有的1G》
    Form Factor: FB-DIMM
    Set: 2
    Locator: DIMM3
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM                        《型号》
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)                        《频率》
    Manufacturer: 855185518551
    Serial Number: 02034615
    Asset Tag: 450728
    Part Number: 72T128420HFA3SB  

Handle 0x1103, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 1024 MB                                     《已有的1G》
    Form Factor: FB-DIMM
    Set: 2
    Locator: DIMM4
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM                               《型号》
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)                               《频率》
    Manufacturer: 855185518551
    Serial Number: 02035C12
    Asset Tag: 450728
    Part Number: 72T128420HFA3SB  

Handle 0x1104, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: FB-DIMM
    Set: 3
    Locator: DIMM5
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer:            
    Serial Number:        
    Asset Tag:      
    Part Number:                  

Handle 0x1105, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: FB-DIMM
    Set: 3
    Locator: DIMM6
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer:            
    Serial Number:        
    Asset Tag:      
    Part Number:                  

Handle 0x1106, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: FB-DIMM
    Set: 4
    Locator: DIMM7
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer:            
    Serial Number:        
    Asset Tag:      
    Part Number:                  

Handle 0x1107, DMI type 17, 28 bytes
Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: FB-DIMM
    Set: 4
    Locator: DIMM8
    Bank Locator: Not Specified
    Type: DDR2 FB-DIMM
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer:            
    Serial Number:        
    Asset Tag:      
    Part Number:  

 从以上输出信息,我们得知:这台服务器是4个单根1G的内存,最大支持32G,8个插槽,单根支持4G。

附,查看内存条数、内存最大容量、内存频率的命令。
1,内存条数:
 

复制代码 代码示例:
dmidecode|grep -P -A5 "Memorys+Device"|grep Size|grep -v Range

2,内存最大容量:
 

复制代码 代码示例:
dmidecode|grep -P 'Maximums+Capacity'

3,内存频率:
 

复制代码 代码示例:
dmidecode|grep -A16 "Memory Device"|grep Speed