← Documents Documentation/hwmon/hp-wmi-sensors.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Linux HP WMI Sensors Driver

HP business-class system의 WMI numeric sensor·platform event를 hwmon과 debugfs로 제공합니다.

Source pathDocumentation/hwmon/hp-wmi-sensors.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

hp-wmi-sensors.rst:1-140

표준 current·fan·voltage·temperature와 raw WMI object, alarm reset 차이를 다룹니다.

문서 개요
항목
SourceDocumentation/hwmon/hp-wmi-sensors.rst
분량140 source lines
Interfacesysfs·debugfs
Alarmread-to-clear·write-to-clear

원문 분량과 핵심 범위입니다.

핵심 흐름
WMI object 탐색Hwmon attribute 생성Alarm 소비Debugfs 원형 확인

장치 동작의 기본 순서입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-or-later
2
3 .. include:: <isonum.txt>
4
5 ===========================
6 Linux HP WMI Sensors Driver
7 ===========================
8
9 :Copyright: |copy| 2023 James Seo <[email protected]>
10
11 Description
12 ===========
13
14 Hewlett-Packard (and some HP Compaq) business-class computers report hardware
15 monitoring information via Windows Management Instrumentation (WMI).
16 This driver exposes that information to the Linux hwmon subsystem, allowing
17 userspace utilities like ``sensors`` to gather numeric sensor readings.
18
19 sysfs interface
20 ===============
21
22 When the driver is loaded, it discovers the sensors available on the
23 system and creates the following sysfs attributes as necessary within
24 ``/sys/class/hwmon/hwmon[X]``:
25
26 (``[X]`` is some number that depends on other system components.)
27
28 ======================= ======= ===================================
29 Name Perm Description
30 ======================= ======= ===================================
31 ``curr[X]_input`` RO Current in milliamperes (mA).
32 ``curr[X]_label`` RO Current sensor label.
33 ``fan[X]_input`` RO Fan speed in RPM.
34 ``fan[X]_label`` RO Fan sensor label.
35 ``fan[X]_fault`` RO Fan sensor fault indicator.
36 ``fan[X]_alarm`` RO Fan sensor alarm indicator.
37 ``in[X]_input`` RO Voltage in millivolts (mV).
38 ``in[X]_label`` RO Voltage sensor label.
39 ``temp[X]_input`` RO Temperature in millidegrees Celsius
40 (m\ |deg|\ C).
41 ``temp[X]_label`` RO Temperature sensor label.
42 ``temp[X]_fault`` RO Temperature sensor fault indicator.
43 ``temp[X]_alarm`` RO Temperature sensor alarm indicator.
44 ``intrusion[X]_alarm`` RW Chassis intrusion alarm indicator.
45 ======================= ======= ===================================
46
47 ``fault`` attributes
48 Reading ``1`` instead of ``0`` as the ``fault`` attribute for a sensor
49 indicates that it has encountered some issue during operation such that
50 measurements from it should not be trusted. If a sensor with the fault
51 condition recovers later, reading this attribute will return ``0`` again.
52
53 ``alarm`` attributes
54 Reading ``1`` instead of ``0`` as the ``alarm`` attribute for a sensor
55 indicates that one of the following has occurred, depending on its type:
56
57 - ``fan``: The fan has stalled or has been disconnected while running.
58 - ``temp``: The sensor reading has reached a critical threshold.
59 The exact threshold is system-dependent.
60 - ``intrusion``: The system's chassis has been opened.
61
62 After ``1`` is read from an ``alarm`` attribute, the attribute resets itself
63 and returns ``0`` on subsequent reads. As an exception, an
64 ``intrusion[X]_alarm`` can only be manually reset by writing ``0`` to it.
65
66 debugfs interface
67 =================
68
69 .. warning:: The debugfs interface is subject to change without notice
70 and is only available when the kernel is compiled with
71 ``CONFIG_DEBUG_FS`` defined.
72
73 The standard hwmon interface in sysfs exposes sensors of several common types
74 that are connected as of driver initialization. However, there are usually
75 other sensors in WMI that do not meet these criteria. In addition, a number of
76 system-dependent "platform events objects" used for ``alarm`` attributes may
77 be present. A debugfs interface is therefore provided for read-only access to
78 all available HP WMI sensors and platform events objects.
79
80 ``/sys/kernel/debug/hp-wmi-sensors-[X]/sensor``
81 contains one numbered entry per sensor with the following attributes:
82
83 =============================== =======================================
84 Name Example
85 =============================== =======================================
86 ``name`` ``CPU0 Fan``
87 ``description`` ``Reports CPU0 fan speed``
88 ``sensor_type`` ``12``
89 ``other_sensor_type`` (an empty string)
90 ``operational_status`` ``2``
91 ``possible_states`` ``Normal,Caution,Critical,Not Present``
92 ``current_state`` ``Normal``
93 ``base_units`` ``19``
94 ``unit_modifier`` ``0``
95 ``current_reading`` ``1008``
96 ``rate_units`` ``0`` (only exists on some systems)
97 =============================== =======================================
98
99 If platform events objects are available,
100 ``/sys/kernel/debug/hp-wmi-sensors-[X]/platform_events``
101 contains one numbered entry per object with the following attributes:
102
103 =============================== ====================
104 Name Example
105 =============================== ====================
106 ``name`` ``CPU0 Fan Stall``
107 ``description`` ``CPU0 Fan Speed``
108 ``source_namespace`` ``root\wmi``
109 ``source_class`` ``HPBIOS_BIOSEvent``
110 ``category`` ``3``
111 ``possible_severity`` ``25``
112 ``possible_status`` ``5``
113 =============================== ====================
114
115 These represent the properties of the underlying ``HPBIOS_BIOSNumericSensor``
116 and ``HPBIOS_PlatformEvents`` WMI objects, which vary between systems.
117 See [#]_ for more details and Managed Object Format (MOF) definitions.
118
119 Known issues and limitations
120 ============================
121
122 - If the existing hp-wmi driver for non-business-class HP systems is already
123 loaded, ``alarm`` attributes will be unavailable even on systems that
124 support them. This is because the same WMI event GUID used by this driver
125 for ``alarm`` attributes is used on those systems for e.g. laptop hotkeys.
126 - Dubious sensor hardware and inconsistent BIOS WMI implementations have been
127 observed to cause inaccurate readings and peculiar behavior, such as alarms
128 failing to occur or occurring only once per boot.
129 - Only temperature, fan speed, and intrusion sensor types have been seen in
130 the wild so far. Support for voltage and current sensors is therefore
131 provisional.
132 - Although HP WMI sensors may claim to be of any type, any oddball sensor
133 types unknown to hwmon will not be supported.
134
135 References
136 ==========
137
138 .. [#] Hewlett-Packard Development Company, L.P.,
139 "HP Client Management Interface Technical White Paper", 2005. [Online].
140 Available: https://h20331.www2.hp.com/hpsub/downloads/cmi_whitepaper.pdf
141

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

HP WMI sensor driver 개요

1-18

GPL-2.0-or-later인 Linux HP WMI Sensors Driver의 저작권은 2023 James Seo에게 있습니다.

Hewlett-Packard 및 일부 HP Compaq business-class computer는 Windows Management Instrumentation(WMI)을 통해 hardware monitoring 정보를 보고합니다. 이 드라이버는 해당 정보를 Linux hwmon subsystem에 노출하여 `sensors` 같은 userspace utility가 숫자 sensor reading을 수집할 수 있게 합니다.

HP WMI 경로
계층역할
HP BIOSWMI numeric sensor·event 제공
hp-wmi-sensorsWMI object 탐색·변환
Linux hwmon표준 sysfs attribute 게시
Userspacesensors 등으로 읽기

Firmware의 WMI 값을 표준 hwmon consumer에 연결합니다.

HP sensor 노출
Business-class HP system 확인WMI sensor object 탐색Hwmon type mappingSysfs attribute 생성Userspace reading

WMI object를 발견해 hwmon type과 단위로 변환합니다.

.. SPDX-License-Identifier: GPL-2.0-or-later

.. include:: <isonum.txt>

===========================
Linux HP WMI Sensors Driver
===========================

:Copyright: |copy| 2023 James Seo <[email protected]>

Description
===========

Hewlett-Packard (and some HP Compaq) business-class computers report hardware
monitoring information via Windows Management Instrumentation (WMI).
This driver exposes that information to the Linux hwmon subsystem, allowing
userspace utilities like ``sensors`` to gather numeric sensor readings.

HP WMI sysfs attribute 표

19-45

Driver load 때 system의 sensor를 발견하고 필요한 attribute만 `/sys/class/hwmon/hwmon[X]`에 만듭니다. `[X]` 번호는 다른 system component에 따라 달라집니다.

Current는 `curr[X]_input`에서 mA로 읽고 `curr[X]_label`에서 label을 읽습니다. Fan은 `fan[X]_input` RPM, label, fault, alarm을 제공합니다. Voltage는 `in[X]_input` mV와 label을 제공합니다. Temperature는 `temp[X]_input` millidegree Celsius, label, fault, alarm을 제공합니다. `intrusion[X]_alarm`은 chassis intrusion indicator로 읽기·쓰기 가능합니다.

HP WMI sysfs
Attribute권한의미
curr[X]_inputROCurrent, mA
curr[X]_labelROCurrent sensor label
fan[X]_inputROFan speed, RPM
fan[X]_labelROFan sensor label
fan[X]_faultROFan fault
fan[X]_alarmROFan alarm
in[X]_inputROVoltage, mV
in[X]_labelROVoltage sensor label
temp[X]_inputROTemperature, millidegree C
temp[X]_labelROTemperature sensor label
temp[X]_faultROTemperature fault
temp[X]_alarmROTemperature alarm
intrusion[X]_alarmRWChassis intrusion alarm

원문의 ASCII 표를 sensor type·단위·권한별로 구조화했습니다.

동적 attribute 생성
Driver loadWMI sensor inventory 조회Current·fan·voltage·temperature 분류필요 attribute 생성Hwmon index 할당

발견된 sensor type에 해당하는 파일만 만듭니다.

sysfs interface
===============

When the driver is loaded, it discovers the sensors available on the
system and creates the following sysfs attributes as necessary within
``/sys/class/hwmon/hwmon[X]``:

(``[X]`` is some number that depends on other system components.)

======================= ======= ===================================
Name                    Perm    Description
======================= ======= ===================================
``curr[X]_input``       RO      Current in milliamperes (mA).
``curr[X]_label``       RO      Current sensor label.
``fan[X]_input``        RO      Fan speed in RPM.
``fan[X]_label``        RO      Fan sensor label.
``fan[X]_fault``        RO      Fan sensor fault indicator.
``fan[X]_alarm``        RO      Fan sensor alarm indicator.
``in[X]_input``         RO      Voltage in millivolts (mV).
``in[X]_label``         RO      Voltage sensor label.
``temp[X]_input``       RO      Temperature in millidegrees Celsius
                                (m\ |deg|\ C).
``temp[X]_label``       RO      Temperature sensor label.
``temp[X]_fault``       RO      Temperature sensor fault indicator.
``temp[X]_alarm``       RO      Temperature sensor alarm indicator.
``intrusion[X]_alarm``  RW      Chassis intrusion alarm indicator.
======================= ======= ===================================

Fault·alarm 의미와 reset

46-65

Sensor의 `fault` attribute가 0 대신 1이면 동작 중 문제가 발생해 측정값을 신뢰하면 안 됩니다. Sensor가 이후 회복하면 다시 0을 반환합니다.

`alarm=1`의 의미는 type에 따라 다릅니다. Fan은 회전 중 stall 또는 disconnect, temperature는 system별 critical threshold 도달, intrusion은 chassis가 열린 상태를 뜻합니다.

Alarm attribute에서 1을 읽으면 스스로 reset되어 이후 read는 0을 반환합니다. 예외로 `intrusion[X]_alarm`은 0을 직접 써야만 reset됩니다.

Fault·alarm
Type1의 의미Reset
fault측정 신뢰 불가Sensor recovery 시 0
fan alarmStall 또는 disconnect1 read 후 자동
temp alarmCritical threshold 도달1 read 후 자동
intrusion alarmChassis open0 write로 수동

상태의 지속 방식과 복구 조건입니다.

Alarm 소비
Alarm event 발생Attribute 1 반환Type 판별일반 alarm은 read 후 clearIntrusion은 0 write

일반 event는 read-to-clear이고 intrusion만 write-to-clear입니다.


``fault`` attributes
  Reading ``1`` instead of ``0`` as the ``fault`` attribute for a sensor
  indicates that it has encountered some issue during operation such that
  measurements from it should not be trusted. If a sensor with the fault
  condition recovers later, reading this attribute will return ``0`` again.

``alarm`` attributes
  Reading ``1`` instead of ``0`` as the ``alarm`` attribute for a sensor
  indicates that one of the following has occurred, depending on its type:

  - ``fan``: The fan has stalled or has been disconnected while running.
  - ``temp``: The sensor reading has reached a critical threshold.
    The exact threshold is system-dependent.
  - ``intrusion``: The system's chassis has been opened.

  After ``1`` is read from an ``alarm`` attribute, the attribute resets itself
  and returns ``0`` on subsequent reads. As an exception, an
  ``intrusion[X]_alarm`` can only be manually reset by writing ``0`` to it.

Debugfs 전체 sensor object

66-98

Debugfs interface는 예고 없이 바뀔 수 있으며 kernel이 `CONFIG_DEBUG_FS`로 build된 경우에만 사용할 수 있습니다.

표준 hwmon sysfs는 driver 초기화 시 연결된 일반 type sensor만 노출합니다. WMI에는 이 조건을 충족하지 않는 다른 sensor와 alarm용 system-dependent platform events object가 있을 수 있으므로 debugfs는 사용 가능한 모든 HP WMI sensor와 platform event를 읽기 전용으로 제공합니다.

`/sys/kernel/debug/hp-wmi-sensors-[X]/sensor`에는 sensor마다 번호 entry가 있고 `name`, `description`, `sensor_type`, `other_sensor_type`, `operational_status`, `possible_states`, `current_state`, `base_units`, `unit_modifier`, `current_reading`, 일부 system의 `rate_units`가 있습니다.

Debugfs sensor 예
NameExample
nameCPU0 Fan
descriptionReports CPU0 fan speed
sensor_type12
other_sensor_typeempty string
operational_status2
possible_statesNormal,Caution,Critical,Not Present
current_stateNormal
base_units19
unit_modifier0
current_reading1008
rate_units0, 일부 system만

원문의 HPBIOS_BIOSNumericSensor 속성과 예시입니다.

Debugfs inventory
CONFIG_DEBUG_FS 확인hp-wmi-sensors-[X]/sensor 열기Numbered entry 선택WMI property 읽기Sysfs 값과 비교

표준 hwmon mapping 밖의 WMI sensor까지 원형 속성으로 확인합니다.

debugfs interface
=================

.. warning:: The debugfs interface is subject to change without notice
             and is only available when the kernel is compiled with
             ``CONFIG_DEBUG_FS`` defined.

The standard hwmon interface in sysfs exposes sensors of several common types
that are connected as of driver initialization. However, there are usually
other sensors in WMI that do not meet these criteria. In addition, a number of
system-dependent "platform events objects" used for ``alarm`` attributes may
be present. A debugfs interface is therefore provided for read-only access to
all available HP WMI sensors and platform events objects.

``/sys/kernel/debug/hp-wmi-sensors-[X]/sensor``
contains one numbered entry per sensor with the following attributes:

=============================== =======================================
Name                            Example
=============================== =======================================
``name``                        ``CPU0 Fan``
``description``                 ``Reports CPU0 fan speed``
``sensor_type``                 ``12``
``other_sensor_type``           (an empty string)
``operational_status``          ``2``
``possible_states``             ``Normal,Caution,Critical,Not Present``
``current_state``               ``Normal``
``base_units``                  ``19``
``unit_modifier``               ``0``
``current_reading``             ``1008``
``rate_units``                  ``0`` (only exists on some systems)
=============================== =======================================

Debugfs platform event object

99-118

Platform events object가 있으면 `/sys/kernel/debug/hp-wmi-sensors-[X]/platform_events`에 object마다 번호 entry가 생성됩니다. 각 entry는 `name`, `description`, `source_namespace`, `source_class`, `category`, `possible_severity`, `possible_status`를 제공합니다.

예시는 `CPU0 Fan Stall`, `CPU0 Fan Speed`, namespace `root\wmi`, class `HPBIOS_BIOSEvent`, category 3, possible severity 25, possible status 5입니다.

이 값들은 system마다 달라지는 underlying `HPBIOS_BIOSNumericSensor`와 `HPBIOS_PlatformEvents` WMI object의 property입니다. 자세한 내용과 Managed Object Format(MOF) 정의는 참조 문서를 확인해야 합니다.

Platform event 예
NameExample
nameCPU0 Fan Stall
descriptionCPU0 Fan Speed
source_namespaceroot\wmi
source_classHPBIOS_BIOSEvent
category3
possible_severity25
possible_status5

원문의 object 속성을 같은 구조로 다시 그렸습니다.

Event object 해석
platform_events entry 선택Source namespace·class 확인Category·severity 읽기관련 sensor name 연결MOF 정의 참조

Raw WMI property를 alarm source와 severity metadata로 읽습니다.

If platform events objects are available,
``/sys/kernel/debug/hp-wmi-sensors-[X]/platform_events``
contains one numbered entry per object with the following attributes:

=============================== ====================
Name                            Example
=============================== ====================
``name``                        ``CPU0 Fan Stall``
``description``                 ``CPU0 Fan Speed``
``source_namespace``            ``root\wmi``
``source_class``                ``HPBIOS_BIOSEvent``
``category``                    ``3``
``possible_severity``           ``25``
``possible_status``             ``5``
=============================== ====================

These represent the properties of the underlying ``HPBIOS_BIOSNumericSensor``
and ``HPBIOS_PlatformEvents`` WMI objects, which vary between systems.
See [#]_ for more details and Managed Object Format (MOF) definitions.

알려진 제한과 참고 문서

119-140

Non-business-class HP용 기존 `hp-wmi` driver가 이미 load되어 있으면 지원 system에서도 alarm attribute를 사용할 수 없습니다. 두 driver가 같은 WMI event GUID를 사용하며 다른 system에서는 laptop hotkey 등에 쓰이기 때문입니다.

의심스러운 sensor hardware와 일관되지 않은 BIOS WMI 구현은 부정확한 reading, alarm 미발생, boot당 한 번만 발생하는 alarm 같은 이상 동작을 일으킬 수 있습니다.

실제 관찰된 type은 temperature, fan speed, intrusion뿐이어서 voltage와 current 지원은 잠정적입니다. HP WMI sensor가 어떤 type을 주장할 수 있더라도 hwmon이 모르는 특수 sensor type은 지원하지 않습니다.

참고 자료는 Hewlett-Packard Development Company의 2005년 `HP Client Management Interface Technical White Paper`이며 원문 URL에서 제공합니다.

HP WMI 제한
영역제한
WMI GUID기존 hp-wmi와 충돌 시 alarm 없음
BIOS·hardware부정확하거나 일회성 alarm 가능
검증 typeTemperature·fan·intrusion
잠정 지원Voltage·current
Unknown typeHwmon에서 미지원

충돌·firmware 품질·type coverage를 구분합니다.

문제 진단
기존 hp-wmi load 여부 확인Alarm attribute 존재 확인Debugfs raw object 비교BIOS behavior 재현지원 type 범위 확인

Driver 충돌과 firmware 문제를 차례로 분리합니다.

Known issues and limitations
============================

- If the existing hp-wmi driver for non-business-class HP systems is already
  loaded, ``alarm`` attributes will be unavailable even on systems that
  support them. This is because the same WMI event GUID used by this driver
  for ``alarm`` attributes is used on those systems for e.g. laptop hotkeys.
- Dubious sensor hardware and inconsistent BIOS WMI implementations have been
  observed to cause inaccurate readings and peculiar behavior, such as alarms
  failing to occur or occurring only once per boot.
- Only temperature, fan speed, and intrusion sensor types have been seen in
  the wild so far. Support for voltage and current sensors is therefore
  provisional.
- Although HP WMI sensors may claim to be of any type, any oddball sensor
  types unknown to hwmon will not be supported.

References
==========

.. [#] Hewlett-Packard Development Company, L.P.,
       "HP Client Management Interface Technical White Paper", 2005. [Online].
       Available: https://h20331.www2.hp.com/hpsub/downloads/cmi_whitepaper.pdf