https://eungbean.github.io/2018/08/23/gpu-monitoring-tool-ubuntu/
GPU benchmarking in Linux
GPU의 스트레스 상태를 확인하기 위한 툴을 몇가지 소개합니다.
Nvidia Visual Profiler같은 복잡한 것 말고, 간단하게 터미널에서 현재 상태만 모니터링 할 수 있는 것을 원했습니다.
간단한 구글링을 통해 알아 낸 Reddit, Stackoverflow등에서 인기있는 몇가지 툴들을 소개합니다.
1) nvidia-smi

- 실행
watch -d -n 0.5 nvidia-smi
2) gpustat

- 설치
pip install gpustat - 실행
sudo nvidia-smi daemon gpustat -i - 옵션
--color : Force colored output (even when stdout is not a tty) --no-color : Suppress colored output -u, --show-user : Display username of the process owner -c, --show-cmd : Display the process name -p, --show-pid : Display PID of the process -P, --show-power : Display GPU power usage and/or limit (draw or draw,limit) -i, --interval : Run in watch mode (equivalent to watch gpustat) if given. Denotes interval between updates. --json : JSON Output (Experimental, #10)
3) gpumonitor

- 설치
- 실행
\# use default
gmonitor
\# Monitor the most recent state only
gmonitor -d 1
\# Monitor current and history states for 4 GPUs.
gmonitor -d 0 -g 0123
\# Monitor both current and previous states for all GPUs, refresh every 3 seconds.
gmonitor -d 0 -r 3
4) glance

glance 도 상당히 멋진 툴입니다. CPU, disk IO, disk space, network 등도 볼 수 있습니다.
- 설치
sudo apt-get install -y python-pip; sudo pip install glances[gpu] - 실행
sudo glances
마치며
이상 제가 잘 사용하고 있는 리눅스 모니터링 툴 4가지였습니다.
말씀드리자면, 위 4가지 툴이 최고는 물론 아닙니다.
더 좋고 쉽고 멋진 방법은 얼마든지 많습니다
저도 아직 리눅스 초보니깐요 :)
만약 더 좋은 방법을 사용하고 계신다면, 주저없이 댓글로 공유해주세요!!
읽어주셔서 감사합니다.