执行了一些数据导入导出的操作,突然 Ubunut 16.04 变得有些反应迟钝。htop 看了一下发现物理内存占用很高,想知道这笔记本还有没有空闲的内存插槽。

dmidecode 遵循 SMBIOS/DMI 标准,可读取机器的 DMI(Desktop Management Interface) 信息, 包括 BIOS、系统、主板、处理器、内存、缓存等, 既可以得到当前的配置,也可以得到系统支持的最大配置,如支持的最大内存数等。

显示全部 dmi 信息

输出的结果特别多

$ sudo dmidecode

精简 dmi 信息输出

$ sudo dmidecode -q

Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB
	Number Of Devices: 4

Memory Device
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: SODIMM
	Set: None
	Locator: ChannelA-DIMM0
	Bank Locator: BANK 0
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1600 MHz
	Manufacturer: 0443
	Serial Number: 108E5182
	Asset Tag: 9876543210
	Part Number: RMT3160ED58E9W1600
	Rank: Unknown
	Configured Clock Speed: 1600 MHz

Memory Device
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM1
	Bank Locator: BANK 1
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: 9876543210
	Part Number: Not Specified
	Rank: Unknown
	Configured Clock Speed: Unknown

Memory Device
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM0
	Bank Locator: BANK 2
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: 9876543210
	Part Number: Not Specified
	Rank: Unknown
	Configured Clock Speed: Unknown

Memory Device
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM1
	Bank Locator: BANK 3
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: 9876543210
	Part Number: Not Specified
	Rank: Unknown
	Configured Clock Speed: Unknown

Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Partition Row Position: 1

Memory Array Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Partition Width: 4