︿
Top

1、前言

dmidecode 為一套可輕鬆顯示您目前主機的各項硬體資訊套件,它查詢在您主機 BIOS 當中 SMBIOS/DMI 資訊查達到查詢各項硬體資訊的目的,例如您可查詢 CPU 類型、Cache、Memory Module、Slots、I/O Ports...等。


Dmidecode 支援作業系統類型如下:
  • FreeBSD i386, x86-64
  • NetBSD i386, x86-64
  • OpenBSD i386
  • BeOS i386
  • Cygwin i386
  • Linux i386, x86-64, ia64
  • Solaris x86





文章目錄

1、前言
2、實作環境
3、安裝及設定
          步驟1.安裝 dmidecode 套件
          步驟2.開始使用 dmidecode
4、補充1:硬體資訊號碼及關鍵字
5、補充2:硬體 序號/版本/製造商 關鍵字
6、參考





2、實作環境

  • FreeBSD 5.4-RELEASE
  • dmidecode-2.9





3、安裝及設定

步驟1.安裝 dmidecode 套件

切換至 Ports Tree 路徑安裝 dmidecode 套件。
cd /usr/ports/sysutils/dmidecode   //切換到安裝路徑
make install clean                   //安裝套件並清除暫存檔案




步驟2.開始使用 dmidecode

安裝完成後即可開始使用:
  • -t (--type) Type_Number or Keyword: 參數加上硬體資訊號碼或關鍵字進行查詢 (ex. 4 = CPU、39 = Power Supply、bios、memory ...etc)。
  • -s (--string) Keyword: 參數加上關鍵字進行查詢 (ex. bios-vendor、baseboard-serial-number ...etc)。
  • 顯示最詳細及完整的 BIOS 硬體資訊。
dmidecode
搭配 Type Number 查詢指定的硬體資訊。
dmidecode -t 4                 //查詢 CPU 資訊
dmidecode -t 39                //查詢 Power Supply 資訊
dmidecode -t 4,39              //查詢 CPU 及 Power Supply 資訊

搭配關鍵字查詢指定的硬體資訊。
dmidecode -t                     //顯示所有可用關鍵字
dmidecode -t processor          //查詢 CPU 資訊
dmidecode -t memory             //查詢 Memory 資訊
dmidecode -t processor memory  //查詢 CPU 及 Memory 資訊

搭配關鍵字查詢指定的硬體資訊。
dmidecode -s                             //顯示所有可用關鍵字
dmidecode -s bios-vendor                //查詢 BIOS 製造商
dmidecode -s baseboard-serial-number  //查詢主機版序號 (Serial Number)






4、補充1:硬體資訊號碼及關鍵字

硬體資訊號碼如下:

  • 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

硬體資訊關鍵字如下: (顯示關鍵字輸出硬體資訊等於對應的 Type Number)

  • bios: 0, 13
  • system: 1, 12, 15, 23, 32
  • baseboard: 2, 10
  • chassis: 3
  • processor: 4
  • memory: 5, 6, 16, 17
  • cache: 7
  • connector: 8
  • slot: 9





5、補充2:硬體 序號/版本/製造商 關鍵字

BIOS

  • bios-vendor: 查詢 BIOS 製造商
  • bios-version: 查詢 BIOS 版本
  • bios-release-date: 查詢 BIOS Release 日期

System

  • system-manufacturer: 查詢系統製造商
  • system-product-name: 查詢系統產品名稱
  • system-version: 查詢系統版本
  • system-serial-number: 查詢系統序號 (Serial Number)
  • system-uuid: 查詢系統 UUID

MontherBoard

  • baseboard-manufacturer: 查詢主機板製造商
  • baseboard-product-name: 查詢主機板產品名稱
  • baseboard-version: 查詢主機板版本
  • baseboard-serial-number: 查詢主機板序號 (Serial Number)
  • baseboard-asset-tag: 查詢主機板資產標籤

Chassis

  • chassis-manufacturer: 查詢基座製造商
  • chassis-type: 查詢基座類型
  • chassis-version: 查詢基座版本
  • chassis-serial-number: 查詢基座序號 (Serial Number)
  • chassis-asset-tag: 查詢基座資產標籤

CPU

  • processor-family: 查詢 CPU 種類/系列
  • processor-manufacturer: 查詢 CPU 製造商
  • processor-version: 查詢 CPU 版本/速度
  • processor-frequency: 查詢 CPU 處理時脈





6、參考

文章標籤: