Linux

CPU/MEM 등 하드웨어 정보 확인

비번변경 2021. 5. 19. 00:32

사용량 외의 정보를 확인해보는 방법을 적어둔다.

 

1. /proc/cpuinfo

/proc/cpuinfo은 CPU 코어 개별 세부사항 정보가 저장되어 있는 파일

cat /proc/cpuinfo
view /proc/cpuinfo

 

cat; concatenate OR catenate
파일 내용을 터미널에 출력하는 명령어
view
파일을 읽기 전용 모드로 여는 vi 명령어

 

아래 명령어와 같이 파일 내의 processor가 몇 개인지 확인하면, 몇 코어 인지도 확인할 수 있다. 물리 코어 수는 아니라고 알고 있다.

grep -c processor /proc/cpuinfo
grep
파일 내용에서 특정 문자열을 검색하는 명령어
-c : 패턴이 일치하는 라인 수 출력

 

2. dmidecode

컴퓨터의 DMI 테이블을 인간이 읽을 수 있는 형식으로 덤프하는 도구

root 권한이 필요하며 서버를 내리지 않아도 여러 하드웨어 정보를 확인할 수 있다.

아래의 명령어로는 메모리 정보를 확인할 수 있다.

dmidecode -t 17
# -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

 

 

 

728x90