Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux dmidecode 指令詳解:跨機房查詢硬體資訊(CPU、記憶體、主機板、BIOS)

編輯:關於 Linux

dmidecode 解讀 SMBIOS/DMI 資料庫,以文字輸出硬體資訊,讓管理員無需進機房即可查詢伺服器型號、序號、記憶體規格等關鍵資料。

一、DMI/SMBIOS 簡介

  • DMI (Desktop Management Interface):管理工具與系統層介面,資料庫為 MIF 格式。
  • SMBIOS (System Management BIOS):主機板廠商遵循的標準格式,由 DMTF 制定。
  • dmidecode 將 DMI 資料庫解碼為可讀文本,但資訊可被人為修改,不保證 100% 準確。

二、輸出格式解析

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
    Manufacturer: Intel
    Product Name: C440GX+
    Version: 727281-0001
    Serial Number: INCY92700942
  • Handle:記錄唯一識別碼
  • DMI type:類型代碼(Type 2 = Base Board)
  • Size:記錄大小(不含文字描述)
  • 其後為解碼後的屬性值

三、安裝方式

# Debian/Ubuntu
apt-get install dmidecode

# 原始碼編譯
wget https://download.savannah.gnu.org/releases/dmidecode/dmidecode-3.x.tar.xz
tar xf dmidecode-3.x.tar.xz && cd dmidecode-3.x && make && make install

# Windows 版
https://gnuwin32.sourceforge.net/packages/dmidecode.htm

四、常用查詢範例

需求指令
CPU 資訊dmidecode -t processor
記憶體插槽與規格dmidecode -t memory
主機板資訊dmidecode -t baseboard
BIOS 版本dmidecode -t bios
機箱資訊dmidecode -t chassis

善用 dmidecode 可大幅降低硬體資產盤點成本。

Copyright © Windows教程網 All Rights Reserved