跳转至

Ubuntu 查看内存硬件信息


2015-04-21 by dongnan

环境

操作系统: Ubuntu 14.04.2 amd64
电脑型号: 笔记本电脑

目标

查看内存信息,确定笔记本电脑是否可以添加(升级)内存条。

步骤

Linux 系统可以使用 dmidecode 命令

最大支持的内存

# 输入命令
dmidecode -t 16

# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0028, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 16 GB
    Error Information Handle: 0x002C
    Number Of Devices: 2

可以看到最大支持 16GB内存并且有两个插槽。

已安装内存信息

# 输入命令
dmidecode -t 17

# dmidecode 2.12
SMBIOS 2.7 present.

Handle 0x0029, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0028
    Error Information Handle: 0x002B
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: SODIMM
    Set: None
    Locator: DIMM0
    Bank Locator: BANK 0
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1600 MHz
    Manufacturer: A-DATA Technology
    Serial Number: F36C0000
    Asset Tag: Unknown
    Part Number: XXXX
    Rank: 1
    Configured Clock Speed: 1600 MHz

Handle 0x002A, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0028
    Error Information Handle: Not Provided
    Total Width: Unknown
    Data Width: Unknown
    Size: No Module Installed
    Form Factor: DIMM
    Set: None
    Locator: DIMM1
    Bank Locator: BANK 2
    Type: Unknown
    Type Detail: Unknown
    Speed: Unknown
    Manufacturer: Empty
    Serial Number: Empty
    Asset Tag: Unknown
    Part Number: Empty
    Rank: Unknown
    Configured Clock Speed: Unknown

注意,笔记本中插槽1里安装了一个内存条,内存大小为2G,类型为DDR3 1600 MHz,插槽2没有安装。

扩展

dmidecode可以查看很多组件例如:

# 输入命令
dmidecode -t system

# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: HaierComputer
    Product Name: T6-3
    Version: 03
    Serial Number: XXXX
    UUID: XXXX
    Wake-up Type: Power Switch
    SKU Number: XXXX
    Family: Type1Family

Handle 0x0025, DMI type 12, 5 bytes
System Configuration Options
    Option 1: String1 for Type12 Equipment Manufacturer
    Option 2: String2 for Type12 Equipment Manufacturer
    Option 3: String3 for Type12 Equipment Manufacturer
    Option 4: String4 for Type12 Equipment Manufacturer

Handle 0x0027, DMI type 15, 29 bytes
System Event Log
    Area Length: 0 bytes
    Header Start Offset: 0x0000
    Header Length: 32 bytes
    Data Start Offset: 0x0020
    Access Method: General-purpose non-volatile data functions
    Access Address: 0x0000
    Status: Valid, Not Full
    Change Token: 0x12345678
    Header Format: OEM-specific
    Supported Log Type Descriptors: 3
    Descriptor 1: POST memory resize
    Data Format 1: None
    Descriptor 2: POST error
    Data Format 2: POST results bitmap
    Descriptor 3: Log area reset/cleared
    Data Format 3: None

Handle 0x0033, DMI type 32, 20 bytes
System Boot Information
   Status: No errors detected

更多选项

# 输入命令
dmidecode -t

dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot



回到页面顶部