반응형
안녕하세요.

리눅스의 쉘 명령어로 메모리 정보를 확인할 수 있는 방법을 소개합니다.



리눅스의 하드웨어 정보를 확인할 수 있는 'dmidecode' 명령어를 이용하면 됩니다.



먼저 dmidecode의 Usage 입니다.


Usage: dmidecode [OPTIONS]

Options are:

 -d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem)

 -h, --help             Display this help text and exit

 -q, --quiet            Less verbose output

 -s, --string KEYWORD   Only display the value of the given DMI string

 -t, --type TYPE        Only display the entries of given type

 -u, --dump             Do not decode the entries

     --dump-bin FILE    Dump the DMI data to a binary file

     --from-dump FILE   Read the DMI data from a binary file

 -V, --version          Display the version and exit



여기서 '-t' 옵션을 활용해 주면 됩니다.


-t 옵션 뒤에 확인 하고 싶은 디바이스 type을 입력해 주면 되는데,


man 페이지를 확인해보면 메모리 디바이스는 17 입니다.


(man 정보는 포스팅 제일 하단에 첨부합니다.)


다읍 명령어로 메모리 정보 확인이 가능합니다.


# dmidecode -t 17


위 명령어를 입력하면 모든 메모리슬롯의 정보를 확인 가능합니다. (빠져있는 것 까지도)


너무 많은 출력이 있기 때문에, grep 명령어를 활용하여 이름만, 혹은 용량만 확인도 가능합니다.



# dmidecode -t 17 | grep Part

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: M393A2G40EB1-CPB   

Part Number: NO DIMM

Part Number: M393A2G40EB1-CPB   

Part Number: NO DIMM

Part Number: M393A2G40EB1-CPB   

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM

Part Number: NO DIMM



# dmidecode -t 17 | grep Size

Size: No Module Installed

Size: No Module Installed

Size: 16384 MB

Size: No Module Installed

Size: 16384 MB

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

Size: No Module Installed

Size: No Module Installed



* 참고 : -t 옵션 값


       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



반응형
Posted by 해리팍
BLOG main image

Chanhyun Park (해리팍)
Software Engineer @ SK hynix

Contact Info.
parkch0708@hanmail.net
chanhyun0708@gmail.com
chanhyun.park@sk.com

카테고리

All (1501)
Profile (2)
Park's Life (599)
Computer System (165)
Computer Programming (39)
Computer Study (54)
Computer Etc. (189)
Scuba Diving (137)
Golf (8)
Traveling (245)
생활 정보 (12)
Pokemon GO (50)