← Documents Documentation/ABI/testing/sysfs-class-thermal GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Thermal class sysfs ABI

Thermal zone의 temperature·governor·trip point·PID 설정과 cooling device state·transition statistics ABI를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-class-thermal
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Thermal zone identity and policy

sysfs-class-thermal:1-47

Thermal zone은 type과 millidegree Celsius temperature를 제공하고 kernel/userspace management mode, active governor policy와 available policy 목록을 노출합니다.

Trip-point threshold, type and hysteresis

sysfs-class-thermal:49-73

각 trip point는 발동 temperature, critical·hot·passive·active type과 재진입 동작을 안정시키는 hysteresis를 가질 수 있습니다.

Cooling-device binding

sysfs-class-thermal:75-98

Zone의 cdevY link는 cooling device를 가리키고 연결된 trip point와 다른 cooling device 대비 상대 weight를 제공합니다.

Emulated sensor temperature

sysfs-class-thermal:100-117

emul_temp는 threshold와 cooling action debugging용 write-only temperature override이며 0으로 해제합니다. Production에서 낮은 값을 반복해 쓰면 thermal policy를 무력화할 수 있습니다.

Power-allocator PID and thermal model

sysfs-class-thermal:120-198

Power allocator는 derivative·integral·overshoot/undershoot proportional term, integral cutoff와 sustainable power를 사용하며 slope·offset은 raw sensor에서 hotspot temperature를 추정합니다.

Cooling-device type and state

sysfs-class-thermal:200-224

Cooling device는 type, maximum state와 current state를 제공하며 0은 no cooling, max_state는 maximum cooling입니다.

Cooling-state statistics

sysfs-class-thermal:226-259

Statistics는 reset trigger, state별 체류 시간, total transition 수와 State_i에서 State_j로 이동한 횟수 matrix를 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/class/thermal/thermal_zoneX/type
2 Description:
3 Strings which represent the thermal zone type.
4 This is given by thermal zone driver as part of registration.
5 E.g: "acpitz" indicates it's an ACPI thermal device.
6 In order to keep it consistent with hwmon sys attribute; this
7 should be a short, lowercase string, not containing spaces nor
8 dashes.
9
10 RO, Required
11
12 What: /sys/class/thermal/thermal_zoneX/temp
13 Description:
14 Current temperature as reported by thermal zone (sensor).
15
16 Unit: millidegree Celsius
17
18 RO, Required
19
20 What: /sys/class/thermal/thermal_zoneX/mode
21 Description:
22 One of the predefined values in [enabled, disabled].
23 This file gives information about the algorithm that is
24 currently managing the thermal zone. It can be either default
25 kernel based algorithm or user space application.
26
27 enabled
28 enable Kernel Thermal management.
29 disabled
30 Preventing kernel thermal zone driver actions upon
31 trip points so that user application can take full
32 charge of the thermal management.
33
34 RW, Optional
35
36 What: /sys/class/thermal/thermal_zoneX/policy
37 Description:
38 One of the various thermal governors used for a particular zone.
39
40 RW, Required
41
42 What: /sys/class/thermal/thermal_zoneX/available_policies
43 Description:
44 Available thermal governors which can be used for a
45 particular zone.
46
47 RO, Required
48
49 What: /sys/class/thermal/thermal_zoneX/trip_point_Y_temp
50 Description:
51 The temperature above which trip point will be fired.
52
53 Unit: millidegree Celsius
54
55 RO, Optional
56
57 What: /sys/class/thermal/thermal_zoneX/trip_point_Y_type
58 Description:
59 Strings which indicate the type of the trip point.
60
61 E.g. it can be one of critical, hot, passive, `active[0-*]`
62 for ACPI thermal zone.
63
64 RO, Optional
65
66 What: /sys/class/thermal/thermal_zoneX/trip_point_Y_hyst
67 Description:
68 The hysteresis value for a trip point, represented as an
69 integer.
70
71 Unit: Celsius
72
73 RW, Optional
74
75 What: /sys/class/thermal/thermal_zoneX/cdevY
76 Description:
77 Sysfs link to the thermal cooling device node where the sys I/F
78 for cooling device throttling control represents.
79
80 RO, Optional
81
82 What: /sys/class/thermal/thermal_zoneX/cdevY_trip_point
83 Description:
84 The trip point in this thermal zone which `cdev[0-*]` is
85 associated with; -1 means the cooling device is not
86 associated with any trip point.
87
88 RO, Optional
89
90 What: /sys/class/thermal/thermal_zoneX/cdevY_weight
91 Description:
92 The influence of `cdev[0-*]` in this thermal zone. This value
93 is relative to the rest of cooling devices in the thermal
94 zone. For example, if a cooling device has a weight double
95 than that of other, it's twice as effective in cooling the
96 thermal zone.
97
98 RW, Optional
99
100 What: /sys/class/thermal/thermal_zoneX/emul_temp
101 Description:
102 Interface to set the emulated temperature method in thermal zone
103 (sensor). After setting this temperature, the thermal zone may
104 pass this temperature to platform emulation function if
105 registered or cache it locally. This is useful in debugging
106 different temperature threshold and its associated cooling
107 action. This is write only node and writing 0 on this node
108 should disable emulation.
109
110 Unit: millidegree Celsius
111
112 WO, Optional
113
114 WARNING:
115 Be careful while enabling this option on production systems,
116 because userland can easily disable the thermal policy by simply
117 flooding this sysfs node with low temperature values.
118
119
120 What: /sys/class/thermal/thermal_zoneX/k_d
121 Description:
122 The derivative term of the power allocator governor's PID
123 controller. For more information see
124 Documentation/driver-api/thermal/power_allocator.rst
125
126 RW, Optional
127
128 What: /sys/class/thermal/thermal_zoneX/k_i
129 Description:
130 The integral term of the power allocator governor's PID
131 controller. This term allows the PID controller to compensate
132 for long term drift. For more information see
133 Documentation/driver-api/thermal/power_allocator.rst
134
135 RW, Optional
136
137 What: /sys/class/thermal/thermal_zoneX/k_po
138 Description:
139 The proportional term of the power allocator governor's PID
140 controller during temperature overshoot. Temperature overshoot
141 is when the current temperature is above the "desired
142 temperature" trip point. For more information see
143 Documentation/driver-api/thermal/power_allocator.rst
144
145 RW, Optional
146
147 What: /sys/class/thermal/thermal_zoneX/k_pu
148 Description:
149 The proportional term of the power allocator governor's PID
150 controller during temperature undershoot. Temperature undershoot
151 is when the current temperature is below the "desired
152 temperature" trip point. For more information see
153 Documentation/driver-api/thermal/power_allocator.rst
154
155 RW, Optional
156
157 What: /sys/class/thermal/thermal_zoneX/integral_cutoff
158 Description:
159 Temperature offset from the desired temperature trip point
160 above which the integral term of the power allocator
161 governor's PID controller starts accumulating errors. For
162 example, if integral_cutoff is 0, then the integral term only
163 accumulates error when temperature is above the desired
164 temperature trip point. For more information see
165 Documentation/driver-api/thermal/power_allocator.rst
166
167 Unit: millidegree Celsius
168
169 RW, Optional
170
171 What: /sys/class/thermal/thermal_zoneX/slope
172 Description:
173 The slope constant used in a linear extrapolation model
174 to determine a hotspot temperature based off the sensor's
175 raw readings. It is up to the device driver to determine
176 the usage of these values.
177
178 RW, Optional
179
180 What: /sys/class/thermal/thermal_zoneX/offset
181 Description:
182 The offset constant used in a linear extrapolation model
183 to determine a hotspot temperature based off the sensor's
184 raw readings. It is up to the device driver to determine
185 the usage of these values.
186
187 RW, Optional
188
189 What: /sys/class/thermal/thermal_zoneX/sustainable_power
190 Description:
191 An estimate of the sustained power that can be dissipated by
192 the thermal zone. Used by the power allocator governor. For
193 more information see
194 Documentation/driver-api/thermal/power_allocator.rst
195
196 Unit: milliwatts
197
198 RW, Optional
199
200 What: /sys/class/thermal/cooling_deviceX/type
201 Description:
202 String which represents the type of device, e.g:
203
204 - for generic ACPI: should be "Fan", "Processor" or "LCD"
205 - for memory controller device on intel_menlow platform:
206 should be "Memory controller".
207
208 RO, Required
209
210 What: /sys/class/thermal/cooling_deviceX/max_state
211 Description:
212 The maximum permissible cooling state of this cooling device.
213
214 RO, Required
215
216 What: /sys/class/thermal/cooling_deviceX/cur_state
217 Description:
218 The current cooling state of this cooling device.
219 The value can any integer numbers between 0 and max_state:
220
221 - cur_state == 0 means no cooling
222 - cur_state == max_state means the maximum cooling.
223
224 RW, Required
225
226 What: /sys/class/thermal/cooling_deviceX/stats/reset
227 Description:
228 Writing any value resets the cooling device's statistics.
229
230 WO, Required
231
232 What: /sys/class/thermal/cooling_deviceX/stats/time_in_state_ms:
233 Description:
234 The amount of time spent by the cooling device in various
235 cooling states. The output will have "<state> <time>" pair
236 in each line, which will mean this cooling device spent <time>
237 msec of time at <state>.
238
239 Output will have one line for each of the supported states.
240
241 RO, Required
242
243 What: /sys/class/thermal/cooling_deviceX/stats/total_trans
244 Description:
245 A single positive value showing the total number of times
246 the state of a cooling device is changed.
247
248 RO, Required
249
250 What: /sys/class/thermal/cooling_deviceX/stats/trans_table
251 Description:
252 This gives fine grained information about all the cooling state
253 transitions. The cat output here is a two dimensional matrix,
254 where an entry <i,j> (row i, column j) represents the number
255 of transitions from State_i to State_j. If the transition
256 table is bigger than PAGE_SIZE, reading this will return
257 an -EFBIG error.
258
259 RO, Required
260

3. 한국어 전문 번역

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

Thermal zone type

1-10
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/type
DescriptionThermal zone type을 나타내는 string입니다. Thermal zone driver가 registration의 일부로 제공합니다. 예를 들어 "acpitz"는 ACPI thermal device를 뜻합니다. hwmon sys attribute와 일관성을 유지하기 위해 space나 dash가 없는 짧은 lowercase string이어야 합니다.
AccessRO, Required

Current thermal-zone temperature

12-18
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/temp
DescriptionThermal zone(sensor)이 보고한 current temperature입니다.
UnitMillidegree Celsius
AccessRO, Required

Kernel or userspace thermal management

20-34
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/mode
DescriptionPredefined value enabled 또는 disabled 중 하나입니다. Thermal zone을 현재 관리하는 algorithm이 기본 kernel-based algorithm인지 userspace application인지 알려 줍니다. enabled는 Kernel Thermal management를 enable합니다. disabled는 trip point에 대한 kernel thermal zone driver action을 막아 userspace application이 thermal management를 완전히 담당하게 합니다.
AccessRW, Optional
Thermal zone mode
Thermal management owner
enabledKernel Thermal management
disabledKernel trip action 중지, userspace가 전담

Trip-point action의 제어 주체를 구분합니다.

Selected thermal governor

36-40
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/policy
Description특정 zone에 사용하는 여러 thermal governor 중 하나입니다.
AccessRW, Required

Available thermal governors

42-47
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/available_policies
Description특정 zone에 사용할 수 있는 thermal governor 목록입니다.
AccessRO, Required
Thermal zone management surface
type: zone identitytemp: current sensor readingmode: kernel 또는 userspace controlavailable_policies에서 governor 선택policy에 active governor 설정

Sensor identity와 temperature를 바탕으로 mode와 governor가 zone action을 관리합니다.

Trip-point firing temperature

49-55
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/trip_point_Y_temp
Description이 temperature를 넘으면 trip point가 fire됩니다.
UnitMillidegree Celsius
AccessRO, Optional

Trip-point type

57-64
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/trip_point_Y_type
DescriptionTrip point type을 나타내는 string입니다. ACPI thermal zone에서는 예를 들어 critical, hot, passive 또는 active[0-*] 중 하나일 수 있습니다.
AccessRO, Optional

Trip-point hysteresis

66-73
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/trip_point_Y_hyst
DescriptionInteger로 표현한 trip point hysteresis value입니다.
UnitCelsius
AccessRW, Optional
Thermal trip-point fields
Field내용단위
trip_point_Y_tempFire thresholdMillidegree Celsius
trip_point_Y_typecritical, hot, passive, active[0-*]String
trip_point_Y_hystHysteresis valueCelsius

Trip point의 threshold, semantic type과 hysteresis를 함께 해석합니다.

Cooling-device trip-point association

82-88
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/cdevY_trip_point
Description이 thermal zone에서 cdev[0-*]가 연결된 trip point입니다. -1은 cooling device가 어떤 trip point에도 연결되지 않았다는 뜻입니다.
AccessRO, Optional

Relative cooling-device influence

90-98
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/cdevY_weight
Description이 thermal zone에서 cdev[0-*]의 influence입니다. 값은 zone 안의 나머지 cooling device에 상대적입니다. 예를 들어 한 cooling device의 weight가 다른 device의 두 배면 thermal zone을 cooling하는 효과도 두 배입니다.
AccessRW, Optional
Thermal zone to cooling-device binding
thermal_zoneXcdevY symlinkcooling_deviceY control surfacecdevY_trip_point로 trigger 연결cdevY_weight로 relative influence 설정

Zone은 link, associated trip과 relative weight를 통해 cooling device의 역할을 정의합니다.

Emulated thermal-zone temperature

100-117
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/emul_temp
DescriptionThermal zone(sensor)의 emulated temperature method를 설정하는 interface입니다. Temperature를 설정하면 thermal zone은 등록된 platform emulation function에 이를 전달하거나 local cache에 보관할 수 있습니다. 서로 다른 temperature threshold와 연결된 cooling action을 debug할 때 유용합니다. Write-only node이며 0을 쓰면 emulation을 disable해야 합니다. 경고: production system에서 이 option을 enable할 때 주의하십시오. Userland가 낮은 temperature value로 이 sysfs node를 flood하면 thermal policy를 쉽게 disable할 수 있습니다.
UnitMillidegree Celsius
AccessWO, Optional
Emulated temperature path
emul_temp에 test temperature writeRegistered platform emulation function 또는 local cacheTrip threshold evaluationAssociated cooling action0 write로 emulation disable

Debug override가 platform callback 또는 local cache를 거쳐 threshold action에 사용됩니다.

PID derivative term

120-126
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/k_d
DescriptionPower allocator governor PID controller의 derivative term입니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
AccessRW, Optional

PID integral term

128-135
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/k_i
DescriptionPower allocator governor PID controller의 integral term입니다. 이 term은 PID controller가 long-term drift를 보상할 수 있게 합니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
AccessRW, Optional

PID overshoot proportional term

137-145
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/k_po
DescriptionTemperature overshoot 동안 사용하는 power allocator governor PID controller의 proportional term입니다. Temperature overshoot는 current temperature가 "desired temperature" trip point보다 높은 상태입니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
AccessRW, Optional

PID undershoot proportional term

147-155
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/k_pu
DescriptionTemperature undershoot 동안 사용하는 power allocator governor PID controller의 proportional term입니다. Temperature undershoot는 current temperature가 "desired temperature" trip point보다 낮은 상태입니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
AccessRW, Optional

PID integral accumulation cutoff

157-169
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/integral_cutoff
DescriptionDesired temperature trip point로부터의 temperature offset이며, 이 offset을 넘으면 power allocator governor PID controller의 integral term이 error를 accumulate하기 시작합니다. 예를 들어 integral_cutoff가 0이면 temperature가 desired temperature trip point보다 높을 때만 integral term이 error를 accumulate합니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
UnitMillidegree Celsius
AccessRW, Optional
Power-allocator PID terms
Attribute역할
k_dDerivative term
k_iIntegral term, long-term drift compensation
k_poProportional term during overshoot
k_puProportional term during undershoot
integral_cutoffIntegral error accumulation 시작 offset

Temperature relation에 따라 적용되는 controller term입니다.

Hotspot extrapolation slope

171-178
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/slope
DescriptionSensor raw reading을 바탕으로 hotspot temperature를 정하는 linear extrapolation model의 slope constant입니다. 이 value를 어떻게 사용할지는 device driver가 결정합니다.
AccessRW, Optional

Hotspot extrapolation offset

180-187
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/offset
DescriptionSensor raw reading을 바탕으로 hotspot temperature를 정하는 linear extrapolation model의 offset constant입니다. 이 value를 어떻게 사용할지는 device driver가 결정합니다.
AccessRW, Optional

Sustainable thermal-zone power

189-198
항목한국어 전문 번역
What/sys/class/thermal/thermal_zoneX/sustainable_power
DescriptionThermal zone이 지속적으로 dissipate할 수 있는 power의 estimate입니다. Power allocator governor가 사용합니다. 자세한 내용은 Documentation/driver-api/thermal/power_allocator.rst를 참조하십시오.
UnitMilliwatts
AccessRW, Optional
Power-allocator thermal model
Sensor raw readingslope와 offset으로 hotspot temperature 추정Desired trip point와 비교PID terms 적용sustainable_power 범위에서 cooling power allocation

Raw sensor model과 sustainable power estimate가 PID controller의 power allocation을 보조합니다.

Cooling-device type

200-208
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/type
DescriptionDevice type을 나타내는 string입니다. Generic ACPI에서는 "Fan", "Processor" 또는 "LCD"여야 합니다. intel_menlow platform의 memory controller device에서는 "Memory controller"여야 합니다.
AccessRO, Required

Maximum cooling state

210-214
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/max_state
Description이 cooling device에 허용되는 maximum cooling state입니다.
AccessRO, Required

Current cooling state

216-224
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/cur_state
Description이 cooling device의 current cooling state입니다. 값은 0부터 max_state 사이의 정수일 수 있습니다. cur_state == 0은 no cooling, cur_state == max_state는 maximum cooling을 뜻합니다.
AccessRW, Required
Cooling-state range
cur_stateCooling effect
0No cooling
1 .. max_state-1Intermediate cooling state
max_stateMaximum cooling

Current state는 inclusive range 0..max_state 안에 있습니다.

Reset cooling-device statistics

226-230
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/stats/reset
Description어떤 value든 write하면 cooling device statistics를 reset합니다.
AccessWO, Required

Time spent in each cooling state

232-241
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/stats/time_in_state_ms:
DescriptionCooling device가 여러 cooling state에서 보낸 time입니다. Output의 각 line은 "<state> <time>" pair이며, 이 cooling device가 <state>에서 <time> milliseconds를 보냈다는 뜻입니다. 지원하는 state마다 한 line을 출력합니다.
AccessRO, Required
<state> <time>

Total cooling-state transitions

243-248
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/stats/total_trans
DescriptionCooling device state가 변경된 total 횟수를 하나의 positive value로 표시합니다.
AccessRO, Required

Cooling-state transition matrix

250-259
항목한국어 전문 번역
What/sys/class/thermal/cooling_deviceX/stats/trans_table
Description모든 cooling state transition의 fine-grained information을 제공합니다. cat output은 two-dimensional matrix이며 entry <i,j>, 즉 row i와 column j는 State_i에서 State_j로 transition한 횟수를 나타냅니다. Transition table이 PAGE_SIZE보다 크면 read가 -EFBIG error를 반환합니다.
AccessRO, Required
Cooling statistics files
Attribute내용
resetAny write resets statistics
time_in_state_ms:각 state의 <state> <time-ms> line
total_transTotal state-change count
trans_tableState_i -> State_j transition-count matrix

Reset, residency, aggregate count와 transition matrix의 역할입니다.