본문 바로가기
Linux/CentOS 9 Stream

명령어 사용법 (df, dmesg, iostat, netstat, free, log모니터링)

by 찌로릭 2024. 9. 3.

System Monitoring cmd

  • df [option]
    >디스크의 여유공간을 보여줌.
      ex) df -h  //사람이 보기 쉬운 형태로 보여줌.

  • dmesg
       >시스템 하드웨어 관련 오류 메시지들이 저장되어 있는 곳

  • iostat [number]
       >input, output 상태를 보여줌.
         ex) iostat 5  //5초마다 새로고침하여 상태 보여줌.

  • netstat
       >네트워크 관련 상태를 보여줌
         ex) netstat | more
         ex) netstat -rnv  //Destation, Gateway, Genmask 등 보여줌.

  • free
       >메모리 사용 현황을 알려줌. 실제 메모리와 가상 메모리
         ex) free -h  //사람이 보기 쉬운 형태로 보여줌.

  • cat /proc/cpuinfo
       >cpu
    관련 정보가 저장되어 있음.

  • cat /proc/meminfo
       >memory
    관련 정보가 저장되어 있음.

 

Log Monitoring cmd

  • cd /var/log로 이동한 후, boot.log / chronyd / cron / maillog / secure / messages / httpd 등의 파일을 통해 저장된 log를 분석한다.

댓글