参考:https://blog.csdn.net/carefree2005/article/details/112446558

一、dmidecode命令简介

  • dmidecode命令可以让你在Linux系统下获取有关硬件方面的信息。dmidecode的作用是将DMI数据库中的信息解码,以可读的文本方式显示。由于DMI信息可以人为修改,因此里面的信息不一定是系统准确的信息。dmidecode遵循SMBIOS/DMI标准,其输出的信息包括BIOS、系统、主板、处理器、内存、缓存等等。
  • DMI(Desktop Management Interface,DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。SMBIOS(System Management BIOS)是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。SMBIOS和DMI是由行业指导机构Desktop Management Task Force(DMTF)起草的开放性的技术标准,其中DMI设计适用于任何的平台和操作系统。
  • DMI充当了管理工具和系统层之间接口的角色。它建立了标准的可管理系统更加方便了电脑厂商和用户对系统的了解。DMI的主要组成部分是Management Information Format(MIF)数据库。这个数据库包括了所有有关电脑系统和配件的信息。通过DMI,用户可以获取序列号、电脑厂商、串口信息以及其它系统配件信息。

二、命令语法及参数选项说明

1、语法

$ dmidecode [OPTIONS]

命令:

dmidecode --help

输出:

Usage: dmidecode [OPTIONS]
Options are:-d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem)-h, --help             Display this help text and exit-q, --quiet            Less verbose output-s, --string KEYWORD   Only display the value of the given DMI string-t, --type TYPE        Only display the entries of given type-H, --handle HANDLE    Only display the entry of given handle-u, --dump             Do not decode the entries--dump-bin FILE    Dump the DMI data to a binary file--from-dump FILE   Read the DMI data from a binary file--no-sysfs         Do not attempt to read DMI data from sysfs files--oem-string N     Only display the value of the given OEM string-V, --version          Display the version and exit

2、参数选项说明

-d:(default:/dev/mem)从设备文件读取信息,输出内容与不加参数标准输出相同。
-h:显示帮助信息。
-q:概要输出
-s:只显示指定DMI字符串的信息。(string)
-t:只显示指定条目的信息。(type)
-H:仅显示给定句柄的条目
-u:显示未解码的原始条目内容。 –dump-bin file:将DMI数据转储到一个二进制文件中。 –from-dump FILE:从一个二进制文件读取DMI数据。 –no sysfs:不尝试从sysfs文件读取DMI数据 –oem-string
N:仅显示给定oem字符串的值
-V:显示版本信息。

三、使用示例

1、查看主板信息

命令:

dmidecode -t 2

输出:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.Handle 0x0002, DMI type 2, 15 bytes
Base Board InformationManufacturer: H3C               #厂号Product Name: TC1-TRMB-A        #产品型号Version: MBD3N43200D00001       #版本Serial Number: MBDHC2231711201A #主板序列Asset Tag: Not SpecifiedFeatures:Board is a hosting boardBoard is replaceableLocation In Chassis: Part ComponentChassis Handle: 0x0003Type: MotherboardContained Object Handles: 0

2、查看内存信息

可以看到内存条的数量为32条,支持的最大内存为12TB。

命令:

dmidecode -t 16

输出:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.Handle 0x0054, DMI type 16, 23 bytes
Physical Memory ArrayLocation: System Board Or MotherboardUse: System MemoryError Correction Type: Single-bit ECCMaximum Capacity: 12 TBError Information Handle: Not ProvidedNumber Of Devices: 32

3、查看当前内存数、大小和插槽数

输出结果可以看到,这里只显示插了一半的32GB的内存条。一共32内存插条。(服务器)
命令:

dmidecode|grep -P -A5 "Memory Device" |grep Size

输出:

        Size: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module InstalledSize: 32 GBSize: No Module Installed

4、查看详细信息

输出结果可以看到两个插槽一组,只有其中一个插了内存条的插槽可以读取到信息。
命令:

dmidecode -t 17

输出:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.Handle 0x0055, DMI type 17, 92 bytes
Memory DeviceArray Handle: 0x0054Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 32 GBForm Factor: DIMMSet: NoneLocator: DIMM000Bank Locator: NODE 0Type: DDR4Type Detail: Synchronous Registered (Buffered)Speed: 3200 MT/sManufacturer: MicronSerial Number: S802C0F2139317D513EAsset Tag: 0F2139Part Number: 18ASF4G72PDZ-3G2E1Rank: 2Configured Memory Speed: 3200 MT/sMinimum Voltage: 1.2 VMaximum Voltage: 1.2 VConfigured Voltage: 1.2 VMemory Technology: DRAMMemory Operating Mode Capability: Volatile memoryFirmware Version: 0000Module Manufacturer ID: Bank 1, Hex 0x2CModule Product ID: UnknownMemory Subsystem Controller Manufacturer ID: UnknownMemory Subsystem Controller Product ID: UnknownNon-Volatile Size: NoneVolatile Size: 32 GBCache Size: NoneLogical Size: NoneHandle 0x0056, DMI type 17, 92 bytes
Memory DeviceArray Handle: 0x0054Error Information Handle: Not ProvidedTotal Width: UnknownData Width: UnknownSize: No Module InstalledForm Factor: DIMMSet: NoneLocator: DIMM001Bank Locator: NODE 0Type: UnknownType Detail: UnknownSpeed: UnknownManufacturer: NO DIMMSerial Number: NO DIMMAsset Tag: NO DIMMPart Number: NO DIMMRank: UnknownConfigured Memory Speed: UnknownMinimum Voltage: UnknownMaximum Voltage: UnknownConfigured Voltage: UnknownMemory Technology: UnknownMemory Operating Mode Capability: NoneFirmware Version: NO DIMMModule Manufacturer ID: UnknownModule Product ID: UnknownMemory Subsystem Controller Manufacturer ID: UnknownMemory Subsystem Controller Product ID: UnknownNon-Volatile Size: NoneVolatile Size: NoneCache Size: NoneLogical Size: None.........

5、查看CPU信息

命令:

dmidecode -t 4

输出:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.Handle 0x008A, DMI type 4, 48 bytes
Processor InformationSocket Designation: CPU0Type: Central ProcessorFamily: XeonManufacturer: Intel(R) CorporationID: A6 06 06 00 FF FB EB BFSignature: Type 0, Family 6, Model 106, Stepping 6Flags:FPU (Floating-point unit on-chip)VME (Virtual mode extension)DE (Debugging extension)PSE (Page size extension)TSC (Time stamp counter)MSR (Model specific registers)PAE (Physical address extension)MCE (Machine check exception)CX8 (CMPXCHG8 instruction supported)APIC (On-chip APIC hardware supported)SEP (Fast system call)MTRR (Memory type range registers)PGE (Page global enable)MCA (Machine check architecture)CMOV (Conditional move instruction supported)PAT (Page attribute table)PSE-36 (36-bit page size extension)CLFSH (CLFLUSH instruction supported)DS (Debug store)ACPI (ACPI supported)MMX (MMX technology supported)FXSR (FXSAVE and FXSTOR instructions supported)SSE (Streaming SIMD extensions)SSE2 (Streaming SIMD extensions 2)SS (Self-snoop)HTT (Multi-threading)TM (Thermal monitor supported)PBE (Pending break enabled)Version: Intel(R) Xeon(R) Platinum 8372C CPU @ 3.20GHzVoltage: 1.6 VExternal Clock: 100 MHzMax Speed: 3500 MHzCurrent Speed: 3200 MHzStatus: Populated, EnabledUpgrade: <OUT OF SPEC>L1 Cache Handle: 0x0087L2 Cache Handle: 0x0088L3 Cache Handle: 0x0089Serial Number: 49076C02C93610EFAsset Tag: UNKNOWNPart Number: Not SpecifiedCore Count: 28Core Enabled: 28Thread Count: 56Characteristics:64-bit capableMulti-CoreHardware ThreadExecute ProtectionEnhanced VirtualizationPower/Performance ControlHandle 0x008E, DMI type 4, 48 bytes
Processor InformationSocket Designation: CPU1Type: Central ProcessorFamily: XeonManufacturer: Intel(R) CorporationID: A6 06 06 00 FF FB EB BFSignature: Type 0, Family 6, Model 106, Stepping 6Flags:FPU (Floating-point unit on-chip)VME (Virtual mode extension)DE (Debugging extension)PSE (Page size extension)TSC (Time stamp counter)MSR (Model specific registers)PAE (Physical address extension)MCE (Machine check exception)CX8 (CMPXCHG8 instruction supported)APIC (On-chip APIC hardware supported)SEP (Fast system call)MTRR (Memory type range registers)PGE (Page global enable)MCA (Machine check architecture)CMOV (Conditional move instruction supported)PAT (Page attribute table)PSE-36 (36-bit page size extension)CLFSH (CLFLUSH instruction supported)DS (Debug store)ACPI (ACPI supported)MMX (MMX technology supported)FXSR (FXSAVE and FXSTOR instructions supported)SSE (Streaming SIMD extensions)SSE2 (Streaming SIMD extensions 2)SS (Self-snoop)HTT (Multi-threading)TM (Thermal monitor supported)PBE (Pending break enabled)Version: Intel(R) Xeon(R) Platinum 8372C CPU @ 3.20GHzVoltage: 1.6 VExternal Clock: 100 MHzMax Speed: 3500 MHzCurrent Speed: 3200 MHzStatus: Populated, EnabledUpgrade: <OUT OF SPEC>L1 Cache Handle: 0x008BL2 Cache Handle: 0x008CL3 Cache Handle: 0x008DSerial Number: 499F7302D55B8BBEAsset Tag: UNKNOWNPart Number: Not SpecifiedCore Count: 28Core Enabled: 28Thread Count: 56Characteristics:64-bit capableMulti-CoreHardware ThreadExecute ProtectionEnhanced VirtualizationPower/Performance Control

6、查看内存速率

命令:

dmidecode|grep -A16 "Memory Device"|grep 'Speed'

输出:

        Speed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: UnknownSpeed: 3200 MT/sSpeed: Unknown

7、查看支持的最大内存

命令:

dmidecode|grep -P ‘Maximum\s+Capacity’

输出:

        Maximum Capacity: 12 TB

8、查看bios信息

命令:

dmidecode -t bios

输出:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.Handle 0x0000, DMI type 0, 26 bytes
BIOS InformationVendor: American Megatrends Inc.Version: 1.05.00Release Date: 01/10/2022Address: 0xF0000Runtime Size: 64 kBROM Size: 32 MBCharacteristics:PCI is supportedBIOS is upgradeableBIOS shadowing is allowedBoot from CD is supportedSelectable boot is supportedBIOS ROM is socketedEDD is supportedJapanese floppy for NEC 9800 1.2 MB is supported (int 13h)Japanese floppy for Toshiba 1.2 MB is supported (int 13h)5.25"/360 kB floppy services are supported (int 13h)5.25"/1.2 MB floppy services are supported (int 13h)3.5"/720 kB floppy services are supported (int 13h)3.5"/2.88 MB floppy services are supported (int 13h)Print screen service is supported (int 5h)Serial services are supported (int 14h)Printer services are supported (int 17h)CGA/mono video services are supported (int 10h)USB legacy is supportedBIOS boot specification is supportedTargeted content distribution is supportedUEFI is supportedBIOS Revision: 5.22Handle 0x010E, DMI type 13, 22 bytes
BIOS Language InformationLanguage Description Format: LongInstallable Languages: 2en|US|iso8859-1zh|CN|unicodeCurrently Installed Language: en|US|iso8859-1

9、查看bios版本

命令:

dmidecode -s bios-version

输出:

1.05.00

四、dmidecode参数string及type列表

1、Valid string关键字

0、bios-vendor
1、bios-version
2、bios-release-date
3、system-manufacturer
4、system-product-name
5、 system-version
6、 system-serial-number
7、 system-uuid
8、baseboard-manufacturer
9、baseboard-product-name
10、baseboard-version
11 、baseboard-serial-number
12 、baseboard-asset-tag
13 、chassis-manufacturer
14、chassis-type
15、chassis-version
16、chassis-serial-number
17、chassis-asset-tag
18、processor-family
19、processor-manufacturer
20、processor-version
21、 processor-frequency

2、Valid type关键字

0、 bios

1、 system

2、baseboard

3、chassis

4、processor

5、 memory

6、 Cache

7、connector

8、 slot

3、type全部编码列表

查询命令可简化为:

$ dmidecode -t [num]

num的取值代表的含义如下表所示:

0、 BIOS

1、System

2、 Base Board

3、Chassis

4、 Processor

5、 Memory Controller

6、Memory Module

7、Cache

8、Port Connector

9、System Slots

10、On Board Devices

11、 OEM Strings

12、System Configuration Options

13 、BIOS Language

14、 Group Associations

15 、System Event Log

16、Physical Memory Array

17、 Memory Device

18 、32-bit Memory Error

19、 Memory Array Mapped Address

20、 Memory Device Mapped Address

21 、Built-in Pointing Device

22 、Portable Battery

23、 System Reset

24、 Hardware Security

25 、System Power Controls

26 、Voltage Probe

27 、Cooling Device

28、 Temperature Probe

29、Electrical Current Probe

30、 Out-of-band Remote Access

31、 Boot Integrity Services

32、 System Boot

33、64-bit Memory Error

34、 Management Device

35、Management Device Component

36、 Management Device Threshold Data

37、 Memory Channel

38、 IPMI Device

39、Power Supply

40、 Additional Information

41、Onboard Device

dmidecode命令相关推荐

  1. 如何使用dmidecode命令查看硬件信息

    引言 当我们需要获取机器硬件信息时,可使用linux系统自带的dmidecode工具进行查询. dmidecode命令通过读取系统DMI表,显示服务器硬件和BIOS信息.除了可使用dmidecode查 ...

  2. Linux下获取详细硬件信息的工具:Dmidecode命令详解

    Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息.Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS.系统.主板.处理器.内存.缓存等等.偶 ...

  3. 汇总 Linux下获取详细硬件信息的工具:Dmidecode命令详解

    Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息.Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS.系统.主板.处理器.内存.缓存等等.偶 ...

  4. linux dmidecode命令,Linux使用dmidecode命令查看内存型号

    其实Linux的内存型号不难查看,下面,让小编带你们一起了解怎么查看Linux的内存型号吧. Linux使用dmidecode命令查看内存型号: 目前我的电脑内存只有512M,想加根内存条.机器主板是 ...

  5. dmidecode命令详解

    在Linux系统下,想要查看系统的硬件信息就可以使用dmidecode命令,在Windows中可以使用"DMIScope"软件(收费软件,笔者未使用过)来查看和修改BIOS. 一. ...

  6. Linux查看BIOS信息:dmidecode命令以及SMBIOS、DMI等

    做Linux系统底层的测试,有时候需要关注BIOS的信息(包括基本信息.检测到的CPU和内存等).除了在开机启动时进入到BIOS之外,还可以在Linux系统中直接查看BIOS的信息,一般可以使用dmi ...

  7. dmidecode命令手册

    dmidecode:获取设备硬件信息 功能描述 使用dmidecode命令可以在Linux系统上获取有关硬件方面的信息,比如BIOS.系统.主板.CPU.内存及缓存等. dmidecode的作用是将D ...

  8. Linux命令之dmidecode命令

    一.dmidecode命令简介   dmidecode命令 可以让你在Linux系统下获取有关硬件方面的信息.dmidecode的作用是将DMI数据库中的信息解码,以可读的文本方式显示.由于DMI信息 ...

  9. dmidecode 命令详解(获取硬件信息)

    一.简介 DMI (Desktop Management Interface, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行. SMBIOS( ...

最新文章

  1. ITK:使用Otsu方法将前景和背景分开
  2. wait、waitpid
  3. 『深度应用』一文搞懂深度学习人脸识别模型开发流程
  4. 【论文笔记】Joint Cascade Face Detection and Alignment
  5. 最近几天,VirtualBox虚拟机坏了多次,备份很重要
  6. MySQL数据库主键与外键
  7. elastic-Job配置参数详细解释
  8. 信鸽推送的集成AndroidStudio版本
  9. 阿里开源自研语音识别模型DFSMN
  10. 豆果美食 php,#一道菜表白豆果美食# 比蛋糕还好吃的咕咕霍夫面包
  11. 哥本哈根大学物理学家研制的创新芯片解决了量子难题;高通风投投资量子机器公司 | 全球量子科技与工业快讯第四十二期
  12. linux grub error17,Ubuntu Grub 问题:提示 error17 修复方法
  13. python写等腰三角形的性质_杨辉三角—知识点详解 - osc_8cfq8uoa的个人空间 - OSCHINA - 中文开源技术交流社区...
  14. 财政部关于印发《政府采购评审专家管理办法》的通知
  15. Guava之RateLimiter限流
  16. 使用51单片机和MAX7219控制点阵滚动显示
  17. Android 通过okhttp + jsoup 爬虫爬取网页小说
  18. 无线网调优案例分享,很实用
  19. 北京市自然保护区分布2018年
  20. 记录使用 Vue 过程中遇到的一些技术点

热门文章

  1. 【一篇文章带你读完《C++游戏编程入门 第4版》】
  2. 在Wireshark中过滤UDS和OBD诊断ISO13400(DoIP)数据
  3. H.264视频监控系统架构
  4. 剑走偏锋--使用WMI获取远程计算机进程程序集中查毒病毒打造内网安全环境
  5. oracle 连续累加,Oracle 累加和实现
  6. 三星Galaxy camera刷机资料
  7. mysql update不更新_记一次MySQL更新语句update的踩坑
  8. 【我奶奶都能看懂系列016】Python进程和线程的使用
  9. 计算机算法的概念教案,算法概念的教学
  10. 八上人教版计算机笔记,人教版八年级上册Unit10课堂笔记