개발일반
[Ubuntu 20.04] GPU 모니터링
monad
2021. 8. 12. 11:47
1. nvidia driver 설치
Ubuntu 데스크톱에서 이하의 순서대로 Nvidia Driver를 설치합니다.
1) Application Icon(좌하단)
2) Software & Update
3) Additional Drivers
4) NVIDIA Corporation: Unknown
5) Using NVIDIA driver metapackage from nvidia-driver-470(proprietary, tested)
6) Apply Change 버튼을 클릭
cf. 기존에는 Using X.Org X server --Nouveau display from xserver-xorg-video-nouveau(open source)가 선택되어 있음
2. nvidia-smi를 이용 (nvidia driver가 설치 완료 후)
watch -d -n 0.7 nvidia-smi
3. glances 이용
sudo pip install glances[gpu]
sudo glances
glances의 웹 모듈을 이용
sudo apt-get install python3-bottle
sudo glances -w
# 이하 나의 경우 발생하는 에러
starseed@innobim:~$ sudo glances -w
Glances Web User Interface started on http://0.0.0.0:61208/
Traceback (most recent call last):
File "/usr/lib/python3.8/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.8/wsgiref/handlers.py", line 184, in finish_response
self.write(data)
File "/usr/lib/python3.8/wsgiref/handlers.py", line 288, in write
self.send_headers()
File "/usr/lib/python3.8/wsgiref/handlers.py", line 347, in send_headers
self._write(bytes(self.headers))
File "/usr/lib/python3.8/wsgiref/headers.py", line 142, in __bytes__
return str(self).encode('iso-8859-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\ubaa9' in position 78: ordinal not in range(256)
Traceback (most recent call last):
File "/usr/lib/python3.8/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.8/wsgiref/handlers.py", line 184, in finish_response
self.write(data)
File "/usr/lib/python3.8/wsgiref/handlers.py", line 288, in write
self.send_headers()
File "/usr/lib/python3.8/wsgiref/handlers.py", line 347, in send_headers
self._write(bytes(self.headers))
File "/usr/lib/python3.8/wsgiref/headers.py", line 142, in __bytes__
return str(self).encode('iso-8859-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\ubaa9' in position 77: ordinal not in range(256)