k80-linux-cooling/gpu_temp_demo.py

10 lines
135 B
Python
Raw Normal View History

2022-09-30 23:02:31 -05:00
import GPUtil
import time
gpus = GPUtil.getGPUs()
gpu = gpus[0]
while True:
print(str(gpu.temperature) + " C")
time.sleep(3)