linux包之dmidecode

來源:互聯網
上載者:User

標籤:des   style   blog   http   io   ar   color   os   使用   

 http://www.dmtf.org/standards/smbios

Dmidecode 這款軟體允許你在 Linux 系統下擷取有關硬體方面的資訊。Dmidecode 遵循 SMBIOS/DMI 標準,其輸出的資訊包括 BIOS、系統、主板、處理器、記憶體、緩衝等等。[[email protected] ~]# which dmidecode/usr/sbin/dmidecode[[email protected] ~]# rpm -qf /usr/sbin/dmidecodedmidecode-2.11-2.el6.x86_64[[email protected] ~]# 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.8.gz/usr/share/man/man8/dmidecode.8.gz/usr/share/man/man8/ownership.8.gz/usr/share/man/man8/vpddecode.8.gz[[email protected] ~]# biosdebiosdecode   biosdevname[[email protected] ~]# biosdecode# biosdecode 2.11SMBIOS 2.4 present.        Structure Table Length: 15950 bytes        Structure Table Address: 0x000E0010        Number Of Structures: 364        Maximum Structure Size: 98 bytesBIOS32 Service Directory present.        Revision: 0        Calling Interface Address: 0x000FD780ACPI 2.0 present.        OEM Identifier: PTLTD        RSD Table 32-bit Address: 0xBFEE3C7D        XSD Table 64-bit Address: 0x00000000BFEE3C21PNP BIOS 1.0 present.        Event Notification: Not Supported        Real Mode 16-bit Code Address: F000:9675        Real Mode 16-bit Data Address: 0040:0000        16-bit Protected Mode Code Address: 0x000F9693        16-bit Protected Mode Data Address: 0x00000400PCI Interrupt Routing 1.0 present.        Router ID: 00:07.0        Exclusive IRQs: None        Compatible Router: 8086:122e        Slot Entry 1: ID 00:0f, slot number 1        Slot Entry 2: ID 00:10, slot number 2        Slot Entry 3: ID 00:11, slot number 3        Slot Entry 4: ID 00:12, slot number 4        Slot Entry 5: ID 00:13, slot number 5        Slot Entry 6: ID 00:14, slot number 6        Slot Entry 7: ID 00:15, slot number 7        Slot Entry 8: ID 00:16, slot number 8        Slot Entry 9: ID 00:17, slot number 9        Slot Entry 10: ID 00:18, slot number 10        Slot Entry 11: ID 00:19, slot number 11        Slot Entry 12: ID 00:1a, slot number 12        Slot Entry 13: ID 00:1b, slot number 13        Slot Entry 14: ID 00:1c, slot number 14        Slot Entry 15: ID 00:1d, slot number 15        Slot Entry 16: ID 00:1e, slot number 16        Slot Entry 17: ID 00:1f, slot number 17        Slot Entry 18: ID 00:00, on-board        Slot Entry 19: ID 00:07, on-board        Slot Entry 20: ID 00:01, on-board[[email protected] ~]#

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 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.