Skip to content

General design: Component can gather more Hardware Monitor on Linux #826

Open
@darnuria

Description

@darnuria

On Linux at least /sys/class/hwmon know as Hwmon or Hardware Monitoring sub system is able to gather data from various places in the kernel through loadable modules like amdgpu, drivetemp or thinkpad module.

Nowadays we limit the reading to CPU and GPU monitor. The schema description of what can be read in hwmon files is somewhat "loose", the numeric values are defined as long * kernel side, and can include fan Rotation Per Minute, Volts, Temperature in mili celcius; read value from hardware, critical value and Max-value and also minimal functionally working value.

Exemple from hwmon interface:

HWMON_C_xxxx Chip attributes, for use with hwmon_chip.
HWMON_T_xxxx Temperature attributes, for use with hwmon_temp.
HWMON_I_xxxx Voltage attributes, for use with hwmon_in.
HWMON_C_xxxx Current attributes, for use with hwmon_curr. Notice the prefix overlap with chip attributes.
HWMON_P_xxxx Power attributes, for use with hwmon_power.
HWMON_E_xxxx Energy attributes, for use with hwmon_energy.
HWMON_H_xxxx Humidity attributes, for use with hwmon_humidity.
HWMON_F_xxxx Fan speed attributes, for use with hwmon_fan.
HWMON_PWM_xxxx PWM control attributes, for use with hwmon_pwm.

It may be interesting to design a way to expose this data in two form one low level with Components

The design may retain the "optional" availability of these data since, if the kernel module is not loaded files will not exists and must support a way to make a difference between "no data" and a default value. Aka failing to read shall return None, so the user may get this data for his own purpose (prometheus or something else).

And maybe (not now) a unified view to monitor physical info about for example a Disk or a Network Interface Card without relying on too much vendor specific API.

Kernel Documentation

End of the day goal

Have something like sensors display, may need breaking Component API or doing an other.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions