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
相关推荐
Nick.Q1 天前
vim插件的管理与离线安装
linux·编辑器·vim
码农小卡拉1 天前
Ubuntu22.04 安装 Docker 及 Docker Compose v2 详细教程
ubuntu·docker·容器
代码的奴隶(艾伦·耶格尔)1 天前
Nginx
java·服务器·nginx
头发还没掉光光1 天前
HTTP协议从基础到实战全解析
linux·服务器·网络·c++·网络协议·http
小白同学_C1 天前
Lab2-system calls && MIT6.1810操作系统工程【持续更新】
linux·c/c++·操作系统os
物理与数学1 天前
linux内核 struct super_block
linux·linux内核
Getgit1 天前
Linux 下查看 DNS 配置信息的常用命令详解
linux·运维·服务器·面试·maven
zhangrelay1 天前
Linux(ubuntu)如何锁定cpu频率工作在最低能耗模式下
linux·笔记·学习
_OP_CHEN1 天前
【Linux系统编程】(二十)揭秘 Linux 文件描述符:从底层原理到实战应用,一篇吃透 fd 本质!
linux·后端·操作系统·c/c++·重定向·文件描述符·linux文件
捷智算云服务1 天前
告别运维割裂!捷智算GPU维修中心重新定义“全栈式”维修新标准
运维·服务器·性能优化