perun.backend.hwmon_grace

Defines Linux Hardware Monitoring (hwmon) backend classes.

Attributes

Classes

HWMonGraceBackend

Hardware Monitoring (hwmon) backend for reading system sensors.

Module Contents

perun.backend.hwmon_grace.log[source]
perun.backend.hwmon_grace.HWMON_PATH = '/sys/class/hwmon/'
perun.backend.hwmon_grace.POWER_AVERAGE_RGX = 'power(\\d+)_average$'
class perun.backend.hwmon_grace.HWMonGraceBackend[source]

Bases: perun.backend.backend.Backend

Hardware Monitoring (hwmon) backend for reading system sensors.

Uses the Linux hwmon sysfs interface to gather power measurements from device subdirectories.

Docs: https://docs.nvidia.com/dccpu/grace-perf-tuning-guide/power-thermals.html

id = 'hwmon-grace'
name = 'Hardware Monitor (Grace)'
description = 'Reads power measurements from hwmon sysfs device subdirectories for Grace systems.'
setup() → None[source]

Initialize hwmon backend and discover available sensors.

Return type:

None

close() → None[source]

Backend shutdown code, closes all open sensor files.

Return type:

None

availableSensors() → dict[str, tuple[str, perun.data_model.sensor.DeviceType, perun.data_model.measurement_type.Unit]][source]

Return string id set of visible devices.

Returns:

Set with visible device ids.

Return type:

set[str]

getSensors(deviceList: set[str]) → list[perun.data_model.sensor.Sensor][source]

Gather device objects based on a set of device ids.

Parameters:

deviceList (set[str]) – Set of device ids.

Returns:

Device objects.

Return type:

list[Sensor]