Dmidecode命令
Dmidecode简介
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,用户可以获取序列号、电脑厂商、串口信息以及其它系统配件信息。
dmidecode的输出格式一般如下:
Handle ×
DMI type , bytes
Base Board Information
Manufacturer:Intel
Product Name: C440GX+
Version: -
Serial Number: INCY92700942
其中的前三行都称为记录头(recoce Header), 其中包括了:
、recode id(handle): DMI表中的记录标识符,这是唯一的,比如上例中的Handle ×。
、dmi type id: 记录的类型,譬如说:BIOS,Memory,上例是type ,即”Base Board Information”
、recode size: DMI表中对应记录的大小,上例为8 bytes.(不包括文本信息,所有实际输出的内容比这个size要更大。)
记录头之后就是记录的值:
、decoded values: 记录值可以是多行的,比如上例显示了主板的制造商(manufacturer)、model、version以及serial Number。
dmidecode的作用是将DMI数据库中的信息解码,以可读的文本方式显示。由于DMI信息可以人为修改,因此里面的信息不一定是系统准确的信息。
dmidecode命令用法详解
不带选项执行 dmidecode 通常会输出所有的硬件信息。Dmidecode 有个很有用的选项 -t,可以按指定类型输出相关信息,假如要获得处理器方面的信息,则可以执行
[root@master ~]# dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
[root@master ~]# dmidecode -t processor
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present. Handle 0x0004, DMI type , bytes
Processor Information
Socket Designation: CPU #
Type: Central Processor
Family: Unknown
Manufacturer: GenuineIntel
ID: A7 FF FB AB 0F
Version: Intel(R) Core(TM) i3-2348M CPU @ .30GHz
Voltage: 3.3 V
External Clock: Unknown
Max Speed: MHz
Current Speed: MHz
Status: Populated, Enabled
Upgrade: ZIF Socket
L1 Cache Handle: 0x0094
L2 Cache Handle: 0x0114
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Core Count:
Core Enabled:
Characteristics:
-bit capable
Execute Protection
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
只显示指定DMI字符串的信息
-t, --type TYPE Only display the entries of given type
只显示指定条目的信息
-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
-V, --version Display the version and exit
显示版本信息
dmidecode参数string及type列表
[root@master ~]# dmidecode -s
dmidecode: option requires an argument -- 's'
String keyword expected
Valid string keywords are:
bios-vendor
bios-version
bios-release-date
system-manufacturer
system-product-name
system-version
system-serial-number
system-uuid
baseboard-manufacturer
baseboard-product-name
baseboard-version
baseboard-serial-number
baseboard-asset-tag
chassis-manufacturer
chassis-type
chassis-version
chassis-serial-number
chassis-asset-tag
processor-family
processor-manufacturer
processor-version
processor-frequency
[root@master ~]# dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
查看内存槽数、那个槽位插了内存,大小是多少
[root@master ~]# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range
Size: MB
查看最大支持内存数
[root@master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
Maximum Capacity: GB
查看槽位上内存的速率,没插就是unknown。
[root@master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'
Speed: Unknown
以上均是通过dmidecode命令来实现的,具体方法如下:
dmidecode以一种可读的方式dump出机器的DMI(Desktop Management Interface)信息。这些信息包括了硬件以及BIOS,既可以得到当前的配置,也可以得到系统支持的最大配
置,比如说支持的最大内存数等。
DMI有人也叫SMBIOS(System Management BIOS),这两个标准都由DMTF(Desktop Management Task Force)开发。
dmidecode的使用方法
1. 最简单的的显示全部dmi信息:
[root@master ~]# dmidecode
将输出所有的dmi信息。
2.更精简的信息显示:
[root@master ~]# dmidecode -q
-q(–quite) 只显示必要的信息,这个很管用哦。
3.显示指定类型的信息:
通常我只想查看某类型,比如CPU,内存或者磁盘的信息而不是全部的。这可以使用-t(–type TYPE)来指定信息类型:
[root@master ~]# dmidecode -t bios
[root@master ~]# dmidecode -t bios, processor
Invalid type keyword: bios,
Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
[root@master ~]# dmidecode -t 0, 4
dmidecode到底支持哪些type?
这些可以在man dmidecode里面看到:
文本参数支持:
bios, system, baseboard, chassis, processor, memory, cache, connector, slot
4. 通过关键字查看信息:
比如只想查看序列号,可以使用:
代码示例:
[root@master ~]# dmidecode -s system-serial-number
VMware- 4d b7 f3 1e -b4 a6 1d e3
-s (–string keyword)支持的keyword包括:
bios-vendor,bios-version, bios-release-date,
system-manufacturer, system-product-name, system-version, system-serial-number,
baseboard-manu-facturer,baseboard-product-name, baseboard-version, baseboard-serial-number, baseboard-asset-tag,
chassis-manufacturer, chas-sis-version, chassis-serial-number, chassis-asset-tag,
processor-manufacturer, processor-version.
5. 下面是一些测试示例。
5.1 查看当前内存和支持的最大内存
Linux下,可以使用free或者查看meminfo来获得当前的物理内存:
代码示例:
[root@master ~]# free
total used free shared buff/cache available
Mem:
Swap:
[root@master ~]# grep MemTotal /proc/meminfo
MemTotal: kB
服务器到底能扩展到多大的内存?
[root@master ~]# dmidecode -t
[root@master ~]# dmidecode 2.7
[root@master ~]# dmidecode -t |more
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present. Handle 0x01A3, DMI type , bytes
Memory Device
Array Handle: 0x0025
Error Information Handle: No Error
Total Width: bits
Data Width: bits
Size: MB #有一条512兆的内存条。
Form Factor: DIMM
Set: None
Locator: RAM slot #
Bank Locator: RAM slot #
Type: DRAM
Type Detail: EDO
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown Handle 0x01A4, DMI type , bytes
Memory Device
Array Handle: 0x0025
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None #没有内存条
Locator: RAM slot #
Bank Locator: RAM slot #
Type: DRAM
Type Detail: Unknown
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
dmidecode支持的数字参数:
ype Information
—————————————-
BIOS
System
Base Board
Chassis
Processor
Memory Controller
Memory Module
Cache
Port Connector
System Slots
On Board Devices
OEM Strings
System Configuration Options
BIOS Language
Group Associations
System Event Log
Physical Memory Array
Memory Device
-bit Memory Error
Memory Array Mapped Address
Memory Device Mapped Address
Built-in Pointing Device
Portable Battery
System Reset
Hardware Security
System Power Controls
Voltage Probe
Cooling Device
Temperature Probe
Electrical Current Probe
Out-of-band Remote Access
Boot Integrity Services
System Boot
-bit Memory Error
Management Device
Management Device Component
Management Device Threshold Data
Memory Channel
IPMI Device
Power Supply
Dmidecode命令的更多相关文章
- 使用 python 获取 Linux 系统信息(通过dmidecode命令)
通过 dmidecode 命令可以获取到 Linux 系统的包括 BIOS. CPU.内存等系统的硬件信息,这里使用 python 代码来通过调用 dmidecode 命令来获取 Linux 必要的系 ...
- 【转】dmidecode命令详解
Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息.Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS.系统.主板.处理器.内存.缓存等等. ...
- linux 查看内存信息,及其他硬件信息 dmidecode命令
由于想换内存,想看看内存型号.频率,简单搜了下命令 可以用dmidecode 命令查看. dmidecode -t memory 这个命令可以查看内存的几乎所有信息,包括频率 大小等等 另外这个命令强 ...
- 如何使用dmidecode命令查看硬件信息
引言 当我们需要获取机器硬件信息时,可使用linux系统自带的dmidecode工具进行查询. dmidecode命令通过读取系统DMI表,显示服务器硬件和BIOS信息.除了可使用dmidecode查 ...
- linux下dmidecode命令获取硬件信息
linux下dmidecode命令获取硬件信息 2 A+ 所属分类:Linux 运维工具 dmidecode在 Linux 系统下获取有关硬件方面的信息.dmidecode 遵循 SMBIOS/DMI ...
- Linux dmidecode 命令
当我们需要获取机器硬件信息时,可使用linux系统自带的dmidecode工具进行查询. dmidecode 用于获取服务器的硬件信息,通常是在不打开计算机机箱的情况下使用该命令来查找硬件详细信息 这 ...
- Linux dmidecode命令
1.linux系统自带的dmidecode工具查询服务器硬件信息 dmidecode 用于获取服务器的硬件信息,通常是在不打开计算机机箱的情况下使用该命令来查找硬件详细信息 这个命令可以查看内存的几乎 ...
- dmidecode 命令
dmidecode # 查看全面硬件信息dmidecode | grep "Product ...
- linux 命令之 dmidecode
Dmidecode 这款软件同意你在 Linux 系统下获取有关硬件方面的信息.Dmidecode 遵循 SMBIOS/DMI 标准.其输出的信息包含 BIOS.系统.主板.处理器.内存.缓存等等. ...
随机推荐
- IntelliJ IDEA创建一个简单的Java Project(二)
1. 选择要创建的项目类型,同时配置本地的JDK 2. 是否使用模板创建项目 3. 选择项目在本地的存储位置 4. 点击Finish,完成一个简单的Java工程的创建.
- SpringMVC的Java API(五)
1. HttpMessageConverter消息转换器 (1) HttpMessageConverter接口源码: public interface HttpMessageConverter< ...
- LeetCode 268. Missing Number缺失数字 (C++/Java)
题目: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is mi ...
- go 通过select实现超时
package main import ( "fmt" "time" ) func main() { ch := make(chan int) quit := ...
- jquery ajax 重写
(function($){ //备份jquery的ajax方法 var _ajax=$.ajax; //重写jquery的ajax方法 $.ajax=function(opt){ //备份opt中er ...
- Spring的工具类StringUtils使用
我们经常会对字符串进行操作,spring已经实现了常用的处理功能.我们可以使用org.springframework.util.StringUtils 工具类帮我们处理字符串. 工具类整理如下: ...
- 【shell脚本】创建账户及删除账户,批量创建账户及批量删除账户===autoCreateUser.sh
一.字符串运算符 二.创建账户 1.提示用户输入用户名和密码,脚本自动创建相应的账户及配置密码.如果用户不输入账户名,则提示必须输入账户名并退出脚本;如果用户不输入密码,则统一使用默认的 123456 ...
- RSyslog Windows Agent 安装配置
下载地址:https://www.rsyslog.com/windows-agent/windows-agent-download/ 安装过程: 1.双击rsyslogwa安装包,开始进行安装 2.一 ...
- sysstat工具包之mpstat
mpstat 1 简介 mpstat是一个实时监控工具,主要报告与CPU相关统计信息,信息存放在/proc/stat文件中: 在多核心cpu系统中,不仅可以查看cpu平均信息,还可以查看指定cpu信息 ...
- 北京麒麟会GITC
分享ppt:https://pan.baidu.com/s/1Aerqtbi8VpMiFGhfEMUtPQ http://bj.thegitc.com/#meeting-agenda