在操作系统中查看BIOS的DMI(SMBIOS)信息
本文可自由转载,但请遵循“署名-非商业用途-保持一致”的创作共用协议。 永久链接:JoeCen's 小猫窝-----------------------------
先看一些概念:
SMBIOS (System Management BIOS)是是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。
DMI (Desktop Management Interface, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。
SMBIOS和DMI是由行业指导机构Desktop Management Task Force (DMTF)起草的开放性的技术标准,其中,DMI设计适用于任何的平台和操作系统。DMI充当了管理工具和系统层之间接口的角色。它建立了标准的可管理系统更加方便了电脑厂商和用户对系统的了解。
概念到此结束,那么我们为什么要查找DMI或者SMBIOS信息呢?
最简单的一个原因,就是要查找一台服务器的system information。比如远程连接上一台在外地的服务器上面,但是需要知道这台服务器是什么公司的机器、什么型号或者保修的序列号是什么的时候。 一般来说我们可以有几种解决方法:
一是可以打电话给机房,让机房帮你查;
二是根据这台机器的硬件信息去推断是什么服务器;
但是最准确的方法其实查看BOIS信息了,因为正规的厂家都会在BOIS中写入服务器的信息。
在linux上,我们可以使用dmidecode来查找DMI信息,其中的“system information”就包含了这些系统信息,如:
# dmidecode -t 1
dmidecode 2.8
SMBIOS 2.3 present.Handle 0x0100, DMI type 1, 25 bytes
System Information
Manufacturer: Dell Computer Corporation
Product Name: PowerEdge 1750
Version: Not Specified
Serial Number: 74XXXXX
UUID: 444XXXX-XXXX-XXXX-XXXX-B7C0XXXX158
Wake-up Type: Power Switch
可以看到这台服务器是DELL的PowerEdge 1750。
如果是使用debian的话,直接使用apt来安装dmidecode这个包就可以了。不过有点奇怪的是,如果source是使用了
http://mirrors.kernel.org/debian/
的话,会报404的错误。我们可以使用其他的source,比如cn99之类的mirror。
如果是windows的话,可以使用“DMIScope”这个工具来查看。(网上有很多教程教别人使用这个工具来修改BIOS信息,从而安装一些OEM版本的XP的。)
如:
当然,DMI中也不止包含system信息的,man一下dmidecode可以看到,包含的信息非常多:
Type Information
----------------------------------------
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 Data37 Memory Channel
38 IPMI Device
39 Power Supply
使用dmidecode的-t option可以指定要显示的信息,如果不带option的话默认显示所有信息。