근황 토크 및 자유게시판

리눅스 시스템 모니터링 feat GPU 상태 확인 (watch)

scone 2023. 3. 3. 13:51

https://www.sharedit.co.kr/posts/2000

실습 환경

  • Ubuntu 22.04

Option

  • -d : highlite the differences
  • -n : interval (second)

Example

  • 0.5 초 간격으로 변화하는 값 하이라이트 ( GPU 상태 확인 )
    • 우측 volatile GPU-Utill 이 GPU 사용량
watch -d -n 0.5 nvidia-smi

If you want to quit, press the 'ctrl C'

 

watch uptime

 

  • command가 들어갈 때는 ' ' 로 묶어 띄어쓰기와 같이 표기하여 준다.
watch -d -n 5 'cat /proc/uptime'

 

  • 1초 간격으로 Apache process monitering
watch -d -n 1 'ps -ef | grep httpd | grep -v grep'

 

  • df : 디스크 사용량
  • w : 현재 접속자, loadaverage, uptime 확인
  • free : memory 사용량
watch -d 'w; echo; df -h; echo; free -m'