linux包之dmidecode
http://www.dmtf.org/standards/smbios
Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS、系统、主板、处理器、内存、缓存等等。
[root@oracle3A ~]# which dmidecode
/usr/sbin/dmidecode
[root@oracle3A ~]# rpm -qf /usr/sbin/dmidecode
dmidecode-2.11-.el6.x86_64
[root@oracle3A ~]# rpm -ql dmidecode
/usr/sbin/biosdecode
/usr/sbin/dmidecode
/usr/sbin/ownership
/usr/sbin/vpddecode
/usr/share/doc/dmidecode-2.11
/usr/share/doc/dmidecode-2.11/AUTHORS
/usr/share/doc/dmidecode-2.11/CHANGELOG
/usr/share/doc/dmidecode-2.11/LICENSE
/usr/share/doc/dmidecode-2.11/README
/usr/share/man/man8/biosdecode..gz
/usr/share/man/man8/dmidecode..gz
/usr/share/man/man8/ownership..gz
/usr/share/man/man8/vpddecode..gz
[root@oracle3A ~]# biosde
biosdecode biosdevname
[root@oracle3A ~]# biosdecode
# biosdecode 2.11
SMBIOS 2.4 present.
Structure Table Length: bytes
Structure Table Address: 0x000E0010
Number Of Structures: 364 其实就是条目数(记录数),dmidecode命令的输出(Handler 0x004D,4D=77)
Maximum Structure Size: bytes
BIOS32 Service Directory present.
Revision:
Calling Interface Address: 0x000FD780
ACPI 2.0 present.
OEM Identifier: PTLTD
RSD Table -bit Address: 0xBFEE3C7D
XSD Table -bit Address: 0x00000000BFEE3C21
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode -bit Code Address: F000:
Real Mode -bit Data Address: :
-bit Protected Mode Code Address: 0x000F9693
-bit Protected Mode Data Address: 0x00000400
PCI Interrupt Routing 1.0 present.
Router ID: :07.0
Exclusive IRQs: None
Compatible Router: :122e
Slot Entry : ID :0f, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :, slot number
Slot Entry : ID :1a, slot number
Slot Entry : ID :1b, slot number
Slot Entry : ID :1c, slot number
Slot Entry : ID :1d, slot number
Slot Entry : ID :1e, slot number
Slot Entry : ID :1f, slot number
Slot Entry : ID :, on-board
Slot Entry : ID :, on-board
Slot Entry : ID :, on-board [root@rac01 ~]# vpddecode
# vpddecode 2.11
# No VPD structure found, sorry.
[root@rac01 ~]# biosdecode
# biosdecode 2.11
ACPI present.
OEM Identifier: ALASKA
RSD Table 32-bit Address: 0x7F276040
SMBIOS 2.5 present.
Structure Table Length: 6576 bytes
Structure Table Address: 0x7F2D8018
Number Of Structures: 129
Maximum Structure Size: 157 bytes
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode 16-bit Code Address: F000:BBC6
Real Mode 16-bit Data Address: F000:0000
16-bit Protected Mode Code Address: 0x000FBBEE
16-bit Protected Mode Data Address: 0x000F0000
PCI Interrupt Routing 1.0 present. [root@aster6 ~]# biosdecode
# biosdecode 2.10
BIOS32 Service Directory present.
Revision: 0
Calling Interface Address: 0x000FD7E1
SMBIOS 2.5 present.
Structure Table Length: 2713 bytes
Structure Table Address: 0x7F6BD000
Number Of Structures: 68
Maximum Structure Size: 126 bytes
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode 16-bit Code Address: F000:320A
Real Mode 16-bit Data Address: F000:0000
16-bit Protected Mode Code Address: 0x000F320F
16-bit Protected Mode Data Address: 0x000F0000
ACPI 2.0 present.
OEM Identifier: IBM
RSD Table 32-bit Address: 0x7F7FE0AC
XSD Table 64-bit Address: 0x000000007F7FE120 [root@rac01 ~]# dmidecode |more
# dmidecode 2.11
SMBIOS 2.5 present.
129 structures occupying 6576 bytes.
Table at 0x7F2D8018.
[root@oracle3A ~]#
Keywords can be used instead of type numbers with --type. Each keyword is equivalent to a list of type numbers: Keyword Types
------------------------------
bios 0, 13
system 1, 12, 15, 23, 32
baseboard 2, 10, 41
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9 Keywords are matched case-insensitively. The following command lines are equivalent: · dmidecode --type 0 --type 13 · dmidecode --type 0,13 · dmidecode --type bios · dmidecode --type BIOS
SMBIOS(System Management BIOS)是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。
SMBIOS和DMI是由行业指导机构Desktop Management Task Force (DMTF)起草的开放性的技术标准,其中DMI设计适用于任何的平台和操作系统。
DMI(Desktop Management Interface, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。
DMI充当了管理工具和系统层之间接口的角色。它建立了标准的可管理系统更加方便了电脑厂商和用户对系统的了解。
DMI(Desktop Management Interface, DMI)的主要组成部分是Management Information Format (MIF)数据库。这个数据库包括了所有有关电脑系统和配件的信息。通过DMI,用户可以获取序列号、电脑厂商、串口信息以及其它系统配件信息。
dmidecode的输出格式一般如下:
Handle 0×0002,DMI type 2, 8 bytes, Base Board Information
Manufacturer:Intel
Product Name: C440GX+
Version: 727281-0001
Serial Number: INCY92700942
其中的前三逗号分隔的都称为记录头(recoce Header), 其中包括了:
recode id(handle): DMI表中的记录标识符,这是唯一的,比如上例中的Handle 0×0002。
dmi type id: 记录的类型,譬如说:BIOS,Memory,上例是type 2,即”Base Board Information”
recode size: DMI表中对应记录的大小,上例为8 bytes.(不包括文本信息,所有实际输出的内容比这个size要更大。)记录头之后就是记录的值
decoded values: 记录值可以是多行的,比如上例显示了主板的制造商(manufacturer)、model、version以及serial Number。
dmidecode的作用是将DMI数据库中的信息解码,以可读的文本方式显示。由于DMI信息可以人为修改,因此里面的信息不一定是系统准确的信息。
安装Dmidecode
Dmidecode 在主流的 Linux 发行版中都可以找到,只需通过所用发行版的包管理器安装即可,如:
apt-get install dmidecode
或者使用官方包安装:
Dmidecode源码包下载地址:http://download.savannah.GNU.org/releases/dmidecode/
Win版本下载地址:http://gnuwin32.sourceforge.net/packages/dmidecode.htm
不带选项执行 dmidecode 通常会输出所有的硬件信息。Dmidecode 有个很有用的选项 -t,可以按指定类型输出相关信息,假如要获得处理器方面的信息,则可以执行
dmidecode -t processor
dmidecode参数string及type列表
(1)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
(2)Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
Cache
connector
slot
(3)type全部编码列表
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 | grep 'Product Name'
查看主板的序列号:dmidecode |grep 'Serial Number'
查看系统序列号:dmidecode -s system-serial-number
查看内存信息:dmidecode -t memory
查看OEM信息:dmidecode -t 11
关于 Dmidecode 的更多用法,你可以通过指定 -h 选项查询。
linux包之dmidecode的更多相关文章
- Linux 包管理
1 文集 <Linux 包管理基础:apt.yum.dnf 和 pkg>,由Snapcrafter翻译,英文原创(作者Brennen)地址在这里. 这是一篇不错的概括性的文章,系统介绍了D ...
- linux包安装,解压,压缩,包管理,环境变量
linux 包安装,解压,压缩,包管理 centoscentos上有系统包管理器yum yum的配置一般有两种方式,一种是直接配置/etc目录下的yum.conf文件,另外一种是在/etc/yum.r ...
- DELPHI开发LINUX包
DELPHI开发LINUX包 我们知道,有了包的存在,开发插件架构的程序,才成为可能 . DELPHI在WINDOWS里面的包的扩展名是.bpl. 在LINUX里面的包的扩展名是.so. 怎样在LIN ...
- CentOS(Linux)下安装dmidecode包
安装代码: yum install dmidecode 安装完成后,查看总体信息: dmidecode 查看服务器类型,测试环境为DELL R610: dmidecode -s system-prod ...
- linux 命令之 dmidecode
Dmidecode 这款软件同意你在 Linux 系统下获取有关硬件方面的信息.Dmidecode 遵循 SMBIOS/DMI 标准.其输出的信息包含 BIOS.系统.主板.处理器.内存.缓存等等. ...
- 使用 python 获取 Linux 系统信息(通过dmidecode命令)
通过 dmidecode 命令可以获取到 Linux 系统的包括 BIOS. CPU.内存等系统的硬件信息,这里使用 python 代码来通过调用 dmidecode 命令来获取 Linux 必要的系 ...
- 用于 ‘Suse‘ Linux 包管理的 Zypper 命令大全
SUSE( Software and System Entwicklung,即软件和系统开发.其中‘entwicklung‘是德语,意为开发)Linux 是由 Novell 公司在 Linux 内核基 ...
- linux包之包管理命令rpm-yum
背景 YUM(Yellow dog Updater, Modified)为多个Linux发行版的前端软件包管理器,例如 Redhat RHEL, CentOS & Fedora. YUM通过调 ...
- linux包之procps之sysctl命令
概述 [root@localhost ~]# rpm -qf /sbin/sysctlprocps-3.2.8-25.el6.x86_64 我们常常在 Linux 的 /proc/sys 目录下,手动 ...
随机推荐
- hdu - 2083 - 简易版之最短距离
找到中位数 , 根据对称性 , 当中位数需要两个数取中值的时候不需要取 , 只需要其中的任意一个数几个 例如四个数 1 , 2 , 3 , 4 . 这四个数 , 其中的 2 和 3 都可以 . 然后求 ...
- vijos 1776 关押罪犯
带权并查集+贪心. #include<iostream> #include<cstdio> #include<cstring> #include<algori ...
- Palindrome Number ---- LeetCode 009
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negativ ...
- ERP部门的添加(十一)
功能需求: 1.有部门管理权限的人员进行添加部门基本信息. 2.有部门权限管理的人员查询部门基本信息. 3.有部门权限管理的人员进行修改部门基本信息. 4.在一个页面中实现,使用弹出对话框方式 存储过 ...
- Bash简介
Bash(GNU bourne-Again Shell)是一个为GNU计划编写的Unix shell,它是很多Linux平台默认的使用的shell. shell是一个命令解析器,是介于操作系统内核与用 ...
- HDU 5784 (计算几何)
Problem How Many Triangles (HDU 5784) 题目大意 给定平面上的n个点(n<2000),询问可以组成多少个锐角三角形. 解题分析 直接统计锐角三角形较困难,考虑 ...
- HDU 1300
http://acm.hdu.edu.cn/showproblem.php?pid=1300 这题大一就看到过,当时没读懂题目,今天再做就容易多了 题意:升序给出n个珍珠的的数量和价值,问买这些珍珠的 ...
- magento缓存系列详解:clean cache
cache是一个很大的概念,涉及的内容方方面面,magento cache是基于zend的,如果你对zend cache理解很深的话,相信magento cache也不再话下,本篇文章着重介绍Flus ...
- HDU 1001 Sum Problem(AC代码)
#include <stdio.h> int main(){ int k,sum; while(scanf("%d",&k)!=EOF){ ==){ sum=( ...
- PHP字符串——编码与转义
因为PHP程序经常与HTML页.Web地址(URL)以及数据库交互,所以PHP提供一些函数来帮助你处理这些类型的数据.HTML.Web页地址和数据库命令都是字符串,但是它们每个都要求不同的字符以不同的 ...