系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux Dmidecode命令

Linux系統(tǒng)Dmidecode命令的用法

時間:2015-12-30 15:30:38 作者:zhijie 來源:系統(tǒng)之家 1. 掃描二維碼隨時看資訊 2. 請使用手機瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20151230/64608.html 手機查看 評論

  Dmidecode命令在Linux系統(tǒng)中的主要作用是獲取硬件的信息,包括內(nèi)存、CPU、主板還有系統(tǒng)等等。如果沒有Dmidecode命令就只能去機房查看服務(wù)器的型號,Dmidecode命令可以幫助我們實現(xiàn)跨地域查詢。下面就來詳細(xì)介紹一下Linux系統(tǒng)Dmidecode命令的用法。

Linux系統(tǒng)Dmidecode命令的用法

  一、Dmidecode簡介

  DMI (Desktop Management Interface, DMI)就是幫助收集電腦系統(tǒng)信息的管理系統(tǒng),DMI信息的收集必須在嚴(yán)格遵照SMBIOS規(guī)范的前提下進(jìn)行。 SMBIOS(System Management BIOS)是主板或系統(tǒng)制造者以標(biāo)準(zhǔn)格式顯示產(chǎn)品管理信息所需遵循的統(tǒng)一規(guī)范。SMBIOS和DMI是由行業(yè)指導(dǎo)機構(gòu)Desktop Management Task Force (DMTF)起草的開放性的技術(shù)標(biāo)準(zhǔn),其中DMI設(shè)計適用于任何的平臺和操作系統(tǒng)。

  DMI充當(dāng)了管理工具和系統(tǒng)層之間接口的角色。它建立了標(biāo)準(zhǔn)的可管理系統(tǒng)更加方便了電腦廠商和用戶對系統(tǒng)的了解。DMI的主要組成部分是Management Information Format (MIF)數(shù)據(jù)庫。這個數(shù)據(jù)庫包括了所有有關(guān)電腦系統(tǒng)和配件的信息。通過DMI,用戶可以獲取序列號、電腦廠商、串口信息以及其它系統(tǒng)配件信息。

  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表中的記錄標(biāo)識符,這是唯一的,比如上例中的Handle 0×0002。

  dmi type id: 記錄的類型,譬如說:BIOS,Memory,上例是type 2,即”Base Board Information”

  recode size: DMI表中對應(yīng)記錄的大小,上例為8 bytes.(不包括文本信息,所有實際輸出的內(nèi)容比這個size要更大。)記錄頭之后就是記錄的值

  decoded values: 記錄值可以是多行的,比如上例顯示了主板的制造商(manufacturer)、model、version以及serial Number。

  二、Dmidecode的作用

  dmidecode的作用是將DMI數(shù)據(jù)庫中的信息解碼,以可讀的文本方式顯示。由于DMI信息可以人為修改,因此里面的信息不一定是系統(tǒng)準(zhǔn)確的信息。

  三、安裝Dmidecode

  Dmidecode 在主流的 Linux 發(fā)行版中都可以找到,只需通過所用發(fā)行版的包管理器安裝即可,如:

  apt-get install dmidecode

  或者使用官方包安裝:

  Dmidecode源碼包下載地址:https://download.savannah.GNU.org/releases/dmidecode/

  Win版本下載地址:https://gnuwin32.sourceforge.net/packages/dmidecode.htm

  四、dmidecode命令用法詳解

  不帶選項執(zhí)行 dmidecode 通常會輸出所有的硬件信息。Dmidecode 有個很有用的選項 -t,可以按指定類型輸出相關(guān)信息,假如要獲得處理器方面的信息,則可以執(zhí)行

  dmidecode -t processor

  輸出:

  # dmidecode 2.10

  SMBIOS 2.6 present.

  Handle 0x0004, DMI type 4, 40 bytes

  Processor Information

  Socket Designation: CPU 1

  Type: Central Processor

  Family: Xeon

  Manufacturer: Intel

  ID: A5 06 01 00 FF FB EB BF

  Signature: Type 0, Family 6, Model 26, Stepping 5

  Flags:

  FPU (Floating-point unit on-chip)

  VME (Virtual mode extension)

  DE (Debugging extension)

  ------

  Usage: dmidecode [OPTIONS]

  Options are:

  -d, --dev-mem FILE Read memory from device FILE (default: /dev/mem)

  從設(shè)備文件讀信息,輸出內(nèi)容與不加參數(shù)標(biāo)準(zhǔn)輸出相同

  -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

  顯示未解碼的原始條目內(nèi)容

  --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參數(shù)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

  六、命令用法示例

  查看服務(wù)器型號:dmidecode | grep ‘Product Name’

  查看主板的序列號:dmidecode |grep ‘Serial Number’

  查看系統(tǒng)序列號:dmidecode -s system-serial-number

  查看內(nèi)存信息:dmidecode -t memory

  查看OEM信息:dmidecode -t 11

  關(guān)于 Dmidecode 的更多用法,你可以通過指定 -h 選項查詢。

  以上就是Linux系統(tǒng)中Dmidecode命令的用法了,其實你還可以對Dmidecode進(jìn)行升級,這樣一來就可以看到更詳細(xì)的硬件信息了。

標(biāo)簽 命令

發(fā)表評論

0

沒有更多評論了

評論就這些咯,讓大家也知道你的獨特見解

立即評論

以上留言僅代表用戶個人觀點,不代表系統(tǒng)之家立場

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄