- A Hardware reader for reading hardware built-in sensors, hardware usage and memory usage.
- Currently, only support Nvidia-GPU and CPU.
- Use Proto3 as the interchange object.
from monitor.reader import NVGPUReader
reader = NVGPUReader(idx=0)
reader_proto = reader.to_proto(basic_info=True, matrix_info=True)
Using monitor:
from monitor.reader import NVGPUReader
from monitor import BasicMonitor
gpu_reader = NVGPUReader(idx=0)
monitor = BasicMonitor(gpu_reader)
monitor.start()
while True:
if monitor.proto_que.qsize():
proto = monitor.proto_que.get()
print(proto)