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
相关推荐
一直都在57218 小时前
深入理解 synchronized:到底锁的是谁?
运维·服务器
RisunJan18 小时前
Linux命令-mkbootdisk(可建立目前系统的启动盘)
linux·运维·服务器
朽棘不雕18 小时前
Linux工具(上)
linux·运维·服务器
daad77719 小时前
bitcoin HD钱包示例 真实使命7
运维·服务器
Eric.Lee202119 小时前
查看ubuntu机器正在使用的网络端口
网络·ubuntu·php
BestOrNothing_201519 小时前
Ubuntu 22.04 下调整 VS Code 界面及字体教程
linux·vscode·ubuntu22.04·界面调整
Zero-Talent19 小时前
TCP/IP协议
运维·服务器·网络
桌面运维家19 小时前
Windows/Linux云桌面:高校VDisk方案部署指南
linux·运维·windows
Du_chong_huan19 小时前
1.7 计算机网络和因特网的历史 | 《计算机网络:自顶向下方法》精读版
运维·服务器·网络
没头脑的男大19 小时前
关于tailscale和ssh那些事儿
运维·服务器·ssh