コンテンツにスキップ

FreeBSD/dmidecode

出典: フリー教科書『ウィキブックス(Wikibooks)』

FreeBSD で dmidecode を利用する方法について説明します。

dmidecode は、システムの BIOS やハードウェアに関する情報を取得するためのツールです。具体的には、システムのメモリ、CPU、マザーボード、バージョン、製造元などのハードウェア関連の情報を表示します。こFreeBSD のベースシステムには含まれていないため、インストールが必要です。

dmidecode のインストール

[編集]

FreeBSD では、dmidecode をインストールするには、ports または pkg システムを使用します。ports システムを利用してインストールする方法は以下の通りです。

doas portmaster /usr/ports/sysutils/dmidecode

もし portmaster がインストールされていない場合、次のコマンドでインストールします。

doas pkg install portmaster

dmidecode のパッケージをインストールすることもできます。

doas pkg install dmidecode

dmidecode の使用方法

[編集]

dmidecode は、システムの DMI (Desktop Management Interface) テーブルに格納されたハードウェア情報を表示します。これにより、BIOS やその他のハードウェア構成に関する詳細な情報を取得できます。dmidecode を使用するためには管理者権限が必要です。

基本的な使用法

[編集]

dmidecode を実行するには、通常、doas を使用して管理者権限を与えます。

doas dmidecode

このコマンドを実行すると、システムの DMI 情報が一覧で表示されます。情報は非常に詳細で、各ハードウェアコンポーネントのモデル名、製造元、バージョンなどが確認できます。

特定の情報を取得する

[編集]

特定のハードウェアコンポーネントに関する情報を取得するには、-t オプションを使って種類を指定します。

  • メモリに関する情報を表示する
    doas dmidecode -t memory
    
  • CPU に関する情報を表示する
    doas dmidecode -t processor
    
  • BIOS に関する情報を表示する
    doas dmidecode -t bios
    

例: システム全体の情報を表示

[編集]
doas dmidecode

このコマンドを実行すると、次のような情報が得られます(出力例):

% doas dmidecode
# dmidecode 3.6
Scanning /dev/mem for entry point.
SMBIOS 2.6 present.
35 structures occupying 1141 bytes.
Table at 0x000FB330.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: HP
        Version: O41    
        Release Date: 10/01/2013
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 2 MB
        Characteristics:
                ISA is supported
                PCI is supported
                PNP is supported
                BIOS is upgradeable

Handle 0x0002, DMI type 3, 21 bytes
Chassis Information
        Manufacturer: HP
        Type: Tower
        Lock: Not Present
        Version:    
        Serial Number:  
        Asset Tag:  
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: 1
        Contained Elements: 0

Handle 0x0003, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU 1
        Type: Central Processor
        Family: Other
        Manufacturer: AMD              
        ID: 63 0F 10 00 FF FB 8B 17
        Version: AMD Turion(tm) II Neo N54L Dual-Core Processor      
        Voltage: 1.1 V
        External Clock: 200 MHz
        Max Speed: 2200 MHz
        Current Speed: 2200 MHz
        Status: Populated, Enabled
        Upgrade: Other
        L1 Cache Handle: 0x0004
        L2 Cache Handle: 0x0005
        L3 Cache Handle: 0x0006
        Serial Number: To Be Fille

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L3-Cache
        Configuration: Disabled, Not Socketed, Level 3
        Operational Mode: Unknown
        Location: Internal
        Installed Size: 0 kB
        Maximum Size: 0 kB
        Supported SRAM Types:
                Unknown
        Installed SRAM Type: Unknown
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x0007, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J13
        Internal Connector Type: None
        External Reference Designator: Front USB
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J14
        Internal Connector Type: None
        External Reference Designator: Front USB
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x0009, DMI type 8, 9 bytes

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J8 - MINISAS
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: SATA

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J20 -TPM
        Internal Connector Type: Other
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: Other

Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J22 -FAN
        Internal Connector Type: Other
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: Other

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: J24 - SATA ODD
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: Not Specified
        External Connector Type: None
        Port Type: SATA

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
        In
Memory Device
        Array Handle: 0x0014
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 4 GB
        Form Factor: DIMM
        Set: None
        Locator: DIMM0
        Bank Locator: BANK0
        Type: Other
        Type Detail: Synchronous
        Speed: 1333 MT/s
        Manufacturer: Manufacturer00
        Serial Number: SerNum00
        Asset Tag: Not Specified
        Part Number: ModulePartNumber00
        Rank: Unknown

Handle 0x0017, DMI type 126, 19 bytes
Inactive

Handle 0x0018, DMI type 17, 28 bytes
Memory Device
        Array Handle: 0x0014
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: 64 bits
        Size: No Module Installed
        Form Factor: Other
        Set: None
        Locator: DIMM1
        Bank Locator: BANK1
        Type: DDR3
        Type Detail: N
Handle 0x001C, DMI type 193, 7 bytes
OEM-specific Type
        Header and Data:
                C1 07 1C 00 00 01 02
        Strings:
                00/00/0000
                23/08/2010

Handle 0x001D, DMI type 208, 5 bytes
OEM-specific Type
        Header and Data:
                D0 05 1D 00 FF

Handle 0x001E, DMI type 208, 5 bytes
OEM-specific Type
        Header and Data:
                D0 05 1E 00 FF

Handle 0x001F, DMI type 209, 12 bytes
HP BIOS PXE NIC PCI and MAC Information
        NIC 1: PCI device 02:00.0, MAC address 9C:B6:54:07:DD:4F

Handle 0x0020, DMI type 224, 5 bytes
HP Trusted Module (TPM or TCM) Status
        Status: Not Present

Handle 0x0021, DMI type 225, 12 bytes
OEM-specific Type
        Header and Data:
                E1 0C 21 00 48 08 F1 FF 50 00 F0 FF

Handle 0x0022, DMI type 127, 4 bytes
End Of Table

dmidecode の利点

[編集]
  • システム情報の把握: dmidecode を使用すると、システムのハードウェア構成や BIOS の詳細な情報を簡単に取得できます。これにより、システムのトラブルシューティングやアップグレード計画が容易になります。
  • インベントリ管理: 特にサーバーやデータセンター環境では、dmidecode によって取得した情報を使って、ハードウェアのインベントリ管理を効率的に行うことができます。

dmidecode の制限

[編集]
  • FreeBSD の一部のハードウェアでは、dmidecode が全ての情報を正確に取得できないことがあります。特に、古いハードウェアや特殊な構成では、情報が不足している場合があります。
  • dmidecode が表示する情報は、システムの BIOS から取得されるため、古い BIOS バージョンでは最新のハードウェア情報が表示されないこともあります。

まとめ

[編集]

dmidecode は、FreeBSD でシステムのハードウェア情報を確認するための強力なツールです。doas を使用して安全に実行し、システムの構成や BIOS 情報を簡単に取得できます。dmidecode は特にハードウェアのインベントリ管理やトラブルシューティングに便利です。