Linux dmidecode備忘

來源:互聯網
上載者:User

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

   

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.