Linux dmidecode备忘

dmidecode

 之前笔者在文章Linux下查看主板的相关信息中已经介绍了该命令查看主板信息的用法,这里进一步介绍


DMI,即DesktopManagement Interface。也有被称为SMBIOS,即System Management BIOS。DMI表的意义在于让我们在不探测硬件实体的情况下获取硬件的部分信息,方便了用户,但也同时表明,表中的信息可能是不可靠的。

dmidecode的作用则是将DMI表中的信息用人可以读懂的方式显示出来。

 

最简单的使用方法,它将显示dmidecode所能获取到的全部dmi信息:

# dmidecode

 

下面列几个表格:

常用参数

-q 或 --quiet

不显示太多信息,比如某条数据是从哪里读来的等等,为了得到简洁的信息,此条很有用。

-t 或 --type TYPE

指定要显示哪方面的内容,很重要,随后介绍。

-s 或 --string KEYWORD

显示特定的关键字,下面会有介绍。

-u 或 --dump

直接显示DMI表信息而不解码,将以16进制的文本方式显示,对普通用户意义不大。

 

-t 或 --type后的文本参数

bios

bios的各项信息

system

系统信息,在我的笔记本上可以看到版本、型号、序号等信息。

baseboard

主板信息

chassis

“底板”,不太理解其含意,期待大家补充

processor

CPU的详细信息

memory

内存信息,包括目前插的内存条数及大小,支持的单条最大内存和总内存大小等等。

cache

缓存信息,似乎是CPU的缓存信息

connector

在我的电脑是PCI设备的信息

slot

插槽信息


之前笔者由于对该命令不是很熟悉,当时使用的是dmidecode结合grep获取主板信息的,现在获取就比较方便了

[root@www ~]# dmidecode -t

dmidecode: option requires anargument -- 't'

Type number or keyword expected

Valid type keywords are:

  bios

  system

  baseboard

  chassis

  processor

  memory

  cache

  connector

  slot

[root@www ~]# dmidecode -t baseboard

# dmidecode 2.11

SMBIOS 2.4 present.

 

Handle 0x0002, DMI type 2, 15bytes

Base Board Information

         Manufacturer: Intel Corporation

         Product Name: 440BX Desktop Reference Platform

         Version: None

         Serial Number: None

         Asset Tag: Not Specified

         Features: None

         Location In Chassis: Not Specified

         Chassis Handle: 0x0000

         Type: Unknown

         Contained Object Handles: 0

 

Handle 0x00DF, DMI type 10, 8bytes

On Board Device 1 Information

         Type: Video

         Status: Disabled

         Description: VMware SVGA II

On Board Device 2 Information

         Type: Sound

         Status: Disabled

         Description: ES1371

 

[root@www ~]#


1、查看服务器型号:dmidecode | grep 'Product Name'

2、查看主板的序列号:dmidecode |grep 'Serial Number'

3、查看系统序列号:dmidecode -s system-serial-number

4、查看内存信息:dmidecode -t memory

5、查看OEM信息:dmidecode -t 11

参考:http://linux-wiki.cn/wiki/zh-hans/Dmidecode

http://www.ha97.com/4120.html

   

posted @ 2012-10-15 00:46  枯木-Linux  阅读(271)  评论(0编辑  收藏  举报