드레스룸 시스템행거 인테리어

반응형

dmidecode 활용법

 

dmidecode 는 컴퓨터의 DMI (일부 SMBIOS ) 테이블 내용을 사람이 읽을 수 있는 형식으로 덤프하는 도구입니다

 

dmidecode를 사용하여 여러 가지 하드웨어 정보를 확인할 수 있습니다.

 

dmidecode의 장점은 서버를 shutdown시키지 않은 상태, 서버를 open하지 않은 상태에서 꽤 많은 정보를

확인할 수 있기 때문에 실무에서는 꽤나 많은 용도로 사용할 수 있습니다.

 

 

옵션 없이

# dmidecode 를 입력한다면 엄청나게 많은 정보가 나와서 확인할 수가 없습니다.  

 

dmidecode에 옵션은 -s -t 를 사용하게 됩니다.

 

root@ubuntu:~# dmidecode -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

 

root@ubuntu:~# dmidecode -s baseboard-serial-number
HM203S003096
root@ubuntu:~# dmidecode -s bios-version
3.3

 

위와 같이 보드의 시리얼 넘버 혹은 bios 버전과 같은 필요 한 정보를 획득할 수 있습니다.

 

 

-s 키워드를 통해 단순한 정보만은 취할 수 있지만 반대로

-t  type옵션을 통해서는 꽤나 많은 정보를 확인할 수 있습니다.

 

 

DMI TYPES
       The SMBIOS specification defines the following DMI types:

       Type   Information
       ────────────────────────────────────────────
          0   BIOS
          1   System
          2   Baseboard
          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
         40   Additional Information
         41   Onboard Devices Extended Information
         42   Management Controller Host Interface


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

 

위와 같이 type에 따라 메인보드의 정보를 확인하고 싶다면 아래와 같이 확인할 수 있습니다.

 

root@ubuntu:~# dmidecode -t 2
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.
# SMBIOS implementations newer than version 3.1.1 are not
# fully supported by this version of dmidecode.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: Supermicro
        Product Name: X11DPi-N
        Version: 2.00
        Serial Number: HM203S003096
        Asset Tag: Default string
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Default string
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

 


 

root@ubuntu:~# dmidecode -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

 

-t 의 옵션을 자세하게 본다면 bios, system, baseboard등 9가지 분류로 확인이 되고 각각 원하는 정보를 좀 더 세밀

하게 확인할 수 있습니다.

 

root@ubuntu:~# dmidecode -t memory |grep -i size
        Size: 16384 MB
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: 16384 MB
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
        Size: No Module Installed
root@ubuntu:~# dmidecode -t memory |grep -i locator
        Locator: P1-DIMMA1
        Bank Locator: P0_Node0_Channel0_Dimm0
        Locator: P1-DIMMA2
        Bank Locator: NO DIMM
        Locator: P1-DIMMB1
        Bank Locator: NO DIMM
        Locator: P1-DIMMC1
        Bank Locator: NO DIMM
        Locator: P1-DIMMD1
        Bank Locator: NO DIMM
        Locator: P1-DIMMD2
        Bank Locator: NO DIMM
        Locator: P1-DIMME1
        Bank Locator: NO DIMM
        Locator: P1-DIMMF1
        Bank Locator: NO DIMM
        Locator: P2-DIMMA1
        Bank Locator: P1_Node0_Channel0_Dimm0
        Locator: P2-DIMMA2
        Bank Locator: NO DIMM
        Locator: P2-DIMMB1
        Bank Locator: NO DIMM
        Locator: P2-DIMMC1
        Bank Locator: NO DIMM
        Locator: P2-DIMMD1
        Bank Locator: NO DIMM
        Locator: P2-DIMMD2
        Bank Locator: NO DIMM
        Locator: P2-DIMME1
        Bank Locator: NO DIMM
        Locator: P2-DIMMF1
        Bank Locator: NO DIMM

 

메인 보드에 몇 기가짜리 메모리가 몇 개 꽂혀 있는지 그리고, 현재 그 메모리는 메인보드 어떤 bank에 위치했는지

확인이 가능하며,

 

 

root@ubuntu:~# dmidecode -t memory |grep -i speed
        Speed: 2666 MT/s
        Configured Clock Speed: 2400 MT/s
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: 2666 MT/s
        Configured Clock Speed: 2400 MT/s
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown
root@ubuntu:~# dmidecode -t memory |grep -i manufacture
        Manufacturer: Samsung
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: Samsung
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
        Manufacturer: NO DIMM
root@ubuntu:~# dmidecode -t memory |grep -i assettag
        Asset Tag: P1-DIMMA1_AssetTag (Date:20/1)
        Asset Tag: P2-DIMMA1_AssetTag (Date:20/1)

 

clock, 제조사 등을 확인이 가능하며 tag 또한 가능합니다.

 

만약 메모리가 ecc error가 나오지 않았는데 시스템이 hang이 걸리거나 혹은 이상하다면 위와 같이 메모리 또는 cpu등에 정보가 제대로 기입되어있는지 확인하는 것 또한 좋은 방법입니다.

 

간혹 정보를 제대로 출력하지 않는 메모리가 원인 모를 시스템 down, hang 등을 발생시키도 합니다.

  

 

 

반응형

'linux' 카테고리의 다른 글

linux (centos, ubuntu) 모니터링 도구  (0) 2020.06.24
ubuntu 18.04 nvidia-docker 설치  (0) 2020.06.23
ubuntu 18.04.1 server 설치  (0) 2020.06.17
SNMP (Simple Network Management Protocol)  (0) 2020.06.13
nvidia-driver_RPM_update  (0) 2020.06.12

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band