Linux命令筆記之dmidecode用法

Dmidecode 用來查看設備硬件信息,包括設備型號、BIOS、系統、主板、處理器、內存、緩存詳細信息等等。

常用參數:

# dmidecode -h

Usage: dmidecode [OPTIONS]

Options are:

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

                       從設備文件中讀取信息,輸出文件內容與不加參數相同

 -h,--help             Display this help textand exit

                       顯示幫助信息

 -q,--quiet            Less verbose output

                       簡化信息輸出

 -s,--string KEYWORD   Only display the valueof the given DMI string

     只顯示指定DMI字符串的信息(DMIDesktopManagement Interface, 就是幫助      收集電腦系統信息的管理系統)

 -t,--type TYPE        Only display theentries of given type

                       只顯示指定類型的條目

 -u,--dump             Do not decode theentries

                       顯示不解碼的條目

  --dump-bin FILE      Dump the DMIdata to a binary file

  --from-dump FILE     Read the DMIdata from a binary file

 -V,--version          Display the version andexit

                       顯示版本信息

示例:

# dmidecode   將會輸出所有硬件及系統信息

# dmidecode -d /dev/mem       同上

# dmidecode –q        簡化輸出信息

BIOS Information

         Vendor:Dell Inc.

         Version:6.1.0

         ReleaseDate: 10/18/2011

         Address:0xF0000

         RuntimeSize: 64 kB

         ROMSize: 4096 kB

         Characteristics:

…………………..

IPMI Device Information

         InterfaceType: KCS (Keyboard Control Style)

         SpecificationVersion: 2.0

         I2CSlave Address: 0x10

         NVStorage Device: Not Present

         BaseAddress: 0x0000000000000CA8 (I/O)

         RegisterSpacing: 32-bit Boundaries

# dmidecode –s                將檢索出來的DMI加入到s參數後面即可看到具體信息

dmidecode: option requires an argument --'s'

String keyword expected

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

# dmidecode -s system-product-name

PowerEdge R710

#服務器型號爲DELL R710

 

# dmidecode –t                  將檢索出的條目加入t參數即可查看該條目詳細信息

dmidecode: option requires an argument --'t'

Type number or keyword expected

Valid type keywords are:

  bios

 system

 baseboard

 chassis

 processor

 memory

 cache

 connector

 slot

# dmidecode -t bios

# dmidecode 2.11

SMBIOS 2.6 present.

 

Handle 0x0000, DMI type 0, 24 bytes

BIOS Information

         Vendor:Dell Inc.

         Version:6.1.0

         ReleaseDate: 10/18/2011

         Address:0xF0000

         RuntimeSize: 64 kB

         ROMSize: 4096 kB

         Characteristics:

                   ISAis supported

                   PCIis supported

                   PNPis supported

                   BIOSis upgradeable

                   BIOSshadowing is allowed

                   Bootfrom CD is supported

                   Selectableboot is supported

                   EDDis supported

                   Japanesefloppy for Toshiba 1.2 MB is supported (int 13h)

                   5.25"/360kB floppy services are supported (int 13h)

                   5.25"/1.2MB floppy services are supported (int 13h)

                   3.5"/720kB floppy services are supported (int 13h)

                   8042keyboard services are supported (int 9h)

                   Serialservices are supported (int 14h)

                   CGA/monovideo services are supported (int 10h)

                   ACPIis supported

                   USBlegacy is supported

                   BIOSboot specification is supported

                   Functionkey-initiated network boot is supported

                   Targetedcontent distribution is supported

         BIOSRevision: 6.1

 

Handle 0x0D00, DMI type 13, 22 bytes

BIOS Language Information

         LanguageDescription Format: Long

         InstallableLanguages: 1

                   en|US|iso8859-1

         CurrentlyInstalled Language: en|US|iso8859-1

有木有很強大的趕腳,我使用該命令的背景是需要統計生產環境服務器硬件信息,因服務器託管在機房,即不想來回跑機房,又不想翻閱當初採購清單,故通過查閱資料瞭解了這個dmidecode強大的命令。

感謝http://www.ibm.com/developerworks/cn/linux/l-10sysadtips/

再分享一個統計硬件設備信息的腳本

http://blog.chinaunix.net/uid-26495963-id-3032523.html 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章