Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 644 Bytes

readme.md

File metadata and controls

28 lines (22 loc) · 644 Bytes

Monitor

  1. A Hardware reader for reading hardware built-in sensors, hardware usage and memory usage.
  2. Currently, only support Nvidia-GPU and CPU.
  3. Use Proto3 as the interchange object.

Usage

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)