ubuntu - 设备常见指令

查看主板支持多少个内存插槽(Memory Slots)

1. 查看所有内存设备(插槽)信息
复制代码
sudo dmidecode -t memory

lichang@ubuntu:~$ sudo dmidecode -t memory
[sudo] password for lichang: 
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.6.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.

Handle 0x003A, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 128 GB
	Error Information Handle: Not Provided
	Number Of Devices: 4

Handle 0x003B, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x003A
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: Unknown
	Set: None
	Locator: Controller0-DIMMA1
	Bank Locator: BANK 0
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
	Rank: Unknown
	Configured Memory Speed: Unknown
	Minimum Voltage: Unknown
	Maximum Voltage: Unknown
	Configured Voltage: Unknown
	Memory Technology: <OUT OF SPEC>
	Memory Operating Mode Capability: None
	Firmware Version: Not Specified
	Module Manufacturer ID: Unknown
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: None
	Cache Size: None
	Logical Size: None

Handle 0x003C, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x003A
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16384 MB
	Form Factor: DIMM
	Set: None
	Locator: Controller0-DIMMA2
	Bank Locator: BANK 0
	Type: DDR4
	Type Detail: Synchronous
	Speed: 3600 MT/s
	Manufacturer: 0x0B92
	Serial Number: 12121239
	Asset Tag: 9876543210
	Part Number:                     
	Rank: 2
	Configured Memory Speed: 3600 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Not Specified
	Module Manufacturer ID: Bank 12, Hex 0x92
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 16 GB
	Cache Size: None
	Logical Size: None

Handle 0x003D, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x003A
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: Unknown
	Set: None
	Locator: Controller1-DIMMB1
	Bank Locator: BANK 0
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
	Rank: Unknown
	Configured Memory Speed: Unknown
	Minimum Voltage: Unknown
	Maximum Voltage: Unknown
	Configured Voltage: Unknown
	Memory Technology: <OUT OF SPEC>
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Not Specified
	Module Manufacturer ID: Unknown
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: None
	Cache Size: None
	Logical Size: None

Handle 0x003E, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x003A
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16384 MB
	Form Factor: DIMM
	Set: None
	Locator: Controller1-DIMMB2
	Bank Locator: BANK 0
	Type: DDR4
	Type Detail: Synchronous
	Speed: 3600 MT/s
	Manufacturer: 0x0B92
	Serial Number: 12121237
	Asset Tag: 9876543210
	Part Number:                     
	Rank: 2
	Configured Memory Speed: 3600 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Not Specified
	Module Manufacturer ID: Bank 12, Hex 0x92
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 16 GB
	Cache Size: None
	Logical Size: None
2. 仅查看插槽数量和每个插槽的容量
复制代码
sudo dmidecode -t memory | grep -A5 "Memory Device$" | grep -E "Size|Locator"

lichang@ubuntu:~$ sudo dmidecode -t memory | grep -A5 "Memory Device$" | grep -E "Size|Locator"
	Size: No Module Installed
	Size: 16384 MB
	Size: No Module Installed
	Size: 16384 MB
相关推荐
运维有小邓@1 天前
Active Directory服务账户是什么?
运维·服务器·网络
百万蹄蹄向前冲1 天前
2026云服务器从零 搭建与运维 指南
服务器·javascript·后端
HIT_Weston1 天前
84、【Ubuntu】【Hugo】搭建私人博客:文章目录(三)
linux·运维·ubuntu
qq_5470261791 天前
Linux 常用快捷键及文本编辑器
linux·运维·服务器
埃伊蟹黄面1 天前
磁盘级文件系统核心原理解析
linux·文件
醇氧1 天前
【Linux】 安装 Azul Zulu JDK
java·linux·运维
小康小小涵1 天前
睿抗机器人大赛魔力元宝
python·ubuntu·gitee·github
一直跑1 天前
查看显卡驱动版本,查看哪个用户使用显卡(GPU)进程
linux·服务器
滴水之功1 天前
Windows远程桌面(非图形化界面)连接Ubuntu22.04
linux