Linux下读取smBIOS源码,linux check memory type and smbios info

How do I check RAM speed and type (line DDR or DDR2) without opening my computer? I need to purchase RAM and I need to know the exact speed and type installed. How do I find out ram information from a shell prompt?

You need to use biosdecode command line utility. Dmidecode is a tool or dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. The output contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. This command works under Linux, UNIX and BSD computers.

Example

Open a shell prompt and type the following command as root user:

$ sudo dmidecode --type 17

OR

$ sudo dmidecode --type 17 | more

Sample output:

# dmidecode 2.9

SMBIOS 2.4 present.

Handle 0x0018, DMI type 17, 27 bytes

Memory Device

Array Handle: 0x0017

Error Information Handle: Not Provided

Total Width: 64 bits

Data Width: 64 bits

Size: 2048 MB

Form Factor: DIMM

Set: None

Locator: J6H1

Bank Locator: CHAN A DIMM 0

Type: DDR2

Type Detail: Synchronous

Speed: 800 MHz (1.2 ns)

Manufacturer: 0x2CFFFFFFFFFFFFFF

Serial Number: 0x00000000

Asset Tag: Unknown

Part Number: 0x5A494F4E203830302D3247422D413131382D

Handle 0x001A, DMI type 17, 27 bytes

Memory Device

Array Handle: 0x0017

Error Information Handle: Not Provided

Total Width: Unknown

Data Width: Unknown

Size: No Module Installed

Form Factor: DIMM

Set: None

Locator: J6H2

Bank Locator: CHAN A DIMM 1

Type: DDR2

Type Detail: None

Speed: Unknown

Manufacturer: NO DIMM

Serial Number: NO DIMM

Asset Tag: NO DIMM

Part Number: NO DIMM

You can just grep speed and skip all other the details using the following syntax:

dmidecode --type 17 | grep -i speed

Sample outputs:

Speed: 1333 MHz (0.8 ns)

Speed: 1333 MHz (0.8 ns)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值