강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

dmidecode 사용법

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

dmidecode

0.개요


흔하게 사용하지않는 명령어중 하나이다
dmidecode는 DMI테이블 내용을 읽어와서 사람이
확인할 수 있는 형태로 보여준다
즉 명령어 그대로 DMI table 을 decoding 해주는 명령어다

이걸로 무엇을 할 수 있을까?
마더보더의 모델 시리얼을 알수 있으며
각 칩셋에 대해 알수 있으며
메모리 뱅크가 몇개 이고 몇개를 사용중인지
어느회사의 서버인지(vender서버만 가능 ) 시리얼넘버가 어떻게 되는지
어떤 CPU를 사용하는지 어떤 메모리를 사용하는지 등

하드웨어 즉 BIOS에서 확인 가능한 하드웨어 정보를
리눅스 콘솔상에서 확인이 가능하다

이는 급하게 파트를 확인하거나 장비를 내릴수 없을 경우
필요한 파트 번호등을 확인하거나 업그래이드 계획을 세울때
유용하게 사용되며 문서와 서버사양을 확인시에
보다 유용하게 사용된다

1. 설치
대부분의 linux 배포판에서는 기본적으로 설치가 되어있으며
만약 설치되어 있지 않은 경우 아래와 같이 설치 하면 된다

redhat 계열
# yum install dmidcode*
debian 계열
# apt-get install  dmidcode*
suse 계열
# zypper install dmidcode*


2. 사용법

dmidecode [options]
위와 같이 사용이 가능하다

몇몇가기 옵션이 있지만 주로 -t , -s를 사용한다

-t 는 type을 지정하여 지정된 형태를 가져오며
-s 는 dmi 에서 주어지는 값을 보여준다


-s 옵션에서 사용되는 키워드는 아래와 같다
  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


예를 들어 bios release 날짜를 알고 싶으면 아래와 같이 하면 된다
#  dmidecode -s bios-release-date
01/01/2007


-t 옵션에서 사용되는 키워드는 아래와 같다

       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

    keyword는 해당 정보의 집합을 나타내는 것은 Types의 숫자이다

    
        그러면 단위 정보인 Types는 아래와 같은 정보를 출력해준다
       Type   Information
       ----------------------------------------
          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
         40   Additional Information
         41   Onboard Device

예를 들어 bios정보를 보려면 아래와 같이 하면 된다

먼저 keyword 를 이용해서 보는 경우 2가지 type의 정보가 동시에 출력된다
# dmidecode -t bios
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Intel Corp.
        Version: S1200RP.86B.01.03.0004.082120131450
        Release Date: 08/21/2013
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16384 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
        BIOS Revision: 4.6

Handle 0x0040, DMI type 13, 22 bytes
BIOS Language Information
        Language Description Format: Long
        Installable Languages: 1
                en|US|iso8859-1
        Currently Installed Language: en|US|iso8859-1


아래는 type을 이용하여 단위 정보를 출력한 결과이다
# dmidecode -t 0
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Intel Corp.
        Version: S1200RP.86B.01.03.0004.082120131450
        Release Date: 08/21/2013
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16384 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
        BIOS Revision: 4.6

# dmidecode -t 13
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0040, DMI type 13, 22 bytes
BIOS Language Information
        Language Description Format: Long
        Installable Languages: 1
                en|US|iso8859-1
        Currently Installed Language: en|US|iso8859-1


3. 마무리

dmidecode는 앞서 말한 것과같이 dmi tables에 저장된 정보를 보여주는 것이며
이는 현제 장치와 칩셋의 정보를 의미한다
그렇게 많이 쓰일 일은 없지만 알고 있으면 귀찮음을 줄여주고 (장비를 직접 뜯어서 확인하는 )
관리자에게 시간을 선물한다
그리고 업그레이드 및 파트 수급시 보다 유연하게 대처할 수 있도록 도와준다

이런내용을 다알고 있을 필요는 없지만
이런 명령어가 있다는 것을 알고 있는 것 만으로도 많은 도움이 될수 있다

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,035 명
  • 현재 강좌수 :  35,791 개
  • 현재 접속자 :  180 명