Debian Codegraph @

lib/sensors.conf.5

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 .\" Copyright (C) 1998, 1999 Adrian Baugh <[email protected]> and
2 .\" Frodo Looijaard <[email protected]>
3 .\" Copyright (C) 2008--2012 Jean Delvare <[email protected]>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.
18 .\"
19 .\" Formatted or processed versions of this manual, if unaccompanied by
20 .\" the source, must acknowledge the copyright and authors of this work.
21 .\"
22 .\" References consulted:
23 .\" sensors.conf.eg by Frodo Looijaard
24 .TH sensors.conf 5 "November 2012" "lm-sensors 3" "Linux User's Manual"
25 .SH NAME
26 sensors.conf \- libsensors configuration file
27
28 .SH DESCRIPTION
29 sensors.conf describes how libsensors, and so all programs using it, should
30 translate the raw readings from the kernel modules to real\-world values.
31
32 .SH SEMANTICS
33
34 On a given system, there may be one or more hardware monitoring chips.
35 Each chip may have several features. For example, the LM78 monitors 7
36 voltage inputs, 3 fans and one temperature. Feature names are
37 standardized. Typical feature names are in0, in1, in2... for voltage
38 inputs, fan1, fan2, fan3... for fans and temp1, temp2, temp3... for
39 temperature inputs.
40
41 Each feature may in turn have one or more sub\-features, each
42 representing an attribute of the feature: input value, low limit, high
43 limit, alarm, etc. Sub\-feature names are standardized as well. For
44 example, the first voltage input (in0) would typically have
45 sub\-features in0_input (measured value), in0_min (low limit), in0_max
46 (high limit) and in0_alarm (alarm flag). Which sub\-features are
47 actually present depend on the exact chip type.
48
49 The
50 .I sensors.conf
51 configuration file will let you configure each chip, feature and
52 sub\-feature in a way that makes sense for your system.
53
54 The rest of this section describes the meaning of each configuration
55 statement.
56
57 .SS CHIP STATEMENT
58
59 A
60 .I chip
61 statement selects for which chips all following
62 .IR compute ,
63 .IR label ,
64 .I ignore
65 and
66 .I set
67 statements are meant. A chip
68 selection remains valid until the next
69 .I chip
70 statement. Example:
71
72 .RS
73 chip "lm78\-*" "lm79\-*"
74 .RE
75
76 If a chip matches at least one of the chip descriptions, the following
77 configuration lines are examined for it, otherwise they are ignored.
78
79 A chip description is built from several elements, separated by
80 dashes. The first element is the chip type, the second element is
81 the name of the bus, and the third element is the hexadecimal address
82 of the chip. Such chip descriptions are printed by sensors(1) as the
83 first line for every chip.
84
85 The name of the bus is either
86 .IR isa ,
87 .IR pci ,
88 .IR virtual ,
89 .I spi-*,
90 .I i2c-N
91 or
92 .I mdio
93 with
94 .I N
95 being a bus number as bound with a
96 .I bus
97 statement. This list isn't necessarily exhaustive as support for other
98 bus types may be added in the future.
99
100 You may substitute the wildcard operator
101 .I *
102 for every element. Note however that it wouldn't make any sense to specify
103 the address without the bus type, so the address part is plain omitted
104 when the bus type isn't specified.
105 Here is how you would express the following matches:
106
107 .TS
108 l l.
109 LM78 chip at address 0x2d on I2C bus 1 lm78\-i2c\-1\-2d
110 LM78 chip at address 0x2d on any I2C bus lm78\-i2c\-*\-2d
111 LM78 chip at address 0x290 on the ISA bus lm78\-isa\-0290
112 Any LM78 chip on I2C bus 1 lm78\-i2c\-1\-*
113 Any LM78 on any I2C bus lm78\-i2c\-*\-*
114 Any LM78 chip on the ISA bus lm78\-isa\-*
115 Any LM78 chip lm78\-*
116 Any chip at address 0x2d on I2C bus 1 *\-i2c\-1\-2d
117 Any chip at address 0x290 on the ISA bus *\-isa\-0290
118 .TE
119
120 If several chip statements match a specific chip, they are all considered.
121
122 .SS LABEL STATEMENT
123
124 A
125 .I label
126 statement describes how a feature should be called. Features without a
127 .I label
128 statement are just called by their feature name. Applications can use this
129 to label the readings they present. Example:
130
131 .RS
132 label in3 "+5V"
133 .RE
134
135 The first argument is the feature name. The second argument is the feature
136 description.
137
138 Note that you must use the raw feature name, which is not necessarily the
139 one displayed by "sensors" by default. Use "sensors \-u" to see the raw
140 feature names. Same applies to all other statement types below.
141
142 .SS IGNORE STATEMENT
143
144 An
145 .I ignore
146 statement is a hint that a specific feature should be ignored - probably
147 because it returns bogus values (for example, because a fan or temperature
148 sensor is not connected). Example:
149
150 .RS
151 ignore fan1
152 .RE
153
154 The only argument is the feature name. Please note that this does not disable
155 anything in the actual sensor chip; it simply hides the feature in question
156 from libsensors users.
157
158 .SS COMPUTE STATEMENT
159
160 A
161 .I compute
162 statement describes how a feature's raw value should be translated to a
163 real\-world value, and how a real\-world value should be translated back
164 to a raw value again. This is most useful for voltage sensors, because
165 in general sensor chips have a limited range and voltages outside this
166 range must be divided (using resistors) before they can be monitored.
167 Example:
168
169 .RS
170 compute in3 ((6.8/10)+1)*@, @/((6.8/10)+1)
171 .RE
172
173 The example above expresses the fact that the voltage input is divided
174 using two resistors of values 6.8 Ohm and 10 Ohm, respectively. See the
175 .B VOLTAGE COMPUTATION DETAILS
176 section below for details.
177
178 The first argument is the feature name. The second argument is an expression
179 which specifies how a raw value must be translated to a real\-world value;
180 `@' stands here for the raw value. This is the formula which will be applied
181 when reading values from the chip. The third argument is an expression that
182 specifies how a real\-world value should be translated back to a raw value;
183 `@' stands here for the real\-world value. This is the formula which will be
184 applied when writing values to the chip. The two formulas are obviously
185 related, and are separated by a comma.
186
187 A
188 .I compute
189 statement applies to all sub\-features of the target feature for which
190 it makes sense. For example, the above example would affect sub\-features
191 in3_min and in3_max (which are voltage values) but not in3_alarm
192 (which is a boolean flag.)
193
194 The following operators are supported in
195 .I compute
196 statements:
197 .RS
198 + \- * / ( ) ^ `
199 .RE
200 ^x means exp(x) and `x means ln(x).
201
202 You may use the name of sub\-features in these expressions; current readings
203 are substituted. You should be careful though to avoid circular references.
204
205 If at any moment a translation between a raw and a real\-world value is
206 called for, but no
207 .I compute
208 statement applies, a one\-on\-one translation is used instead.
209
210 .SS SET STATEMENT
211
212 A
213 .I set
214 statement is used to write a sub\-feature value to the chip. Of course not
215 all sub\-feature values can be set that way, in particular input values
216 and alarm flags can not. Valid sub\-features are usually min/max limits.
217 Example:
218
219 .RS
220 set in3_min 5 * 0.95
221 .RE
222 .RS
223 set in3_max 5 * 1.05
224 .RE
225
226 The example above basically configures the chip to allow a 5% deviance
227 for the +5V power input.
228
229 The first argument is the feature name. The second argument is an expression
230 which determines the written value. If there is an applying
231 .I compute
232 statement, this value is fed to its third argument to translate it to a
233 raw value.
234
235 You may use the name of sub\-features in these expressions; current readings
236 are substituted. You should be careful though to avoid circular references.
237
238 Please note that
239 .I set
240 statements are only executed by sensors(1) when you use the
241 .B \-s
242 option. Typical graphical sensors applications do not care about these
243 statements at all.
244
245 .SS BUS STATEMENT
246
247 A
248 .I bus
249 statement binds the description of an I2C or SMBus adapter to a bus number.
250 This makes it possible to refer to an adapter in the configuration file,
251 independent of the actual correspondence of bus numbers and actual
252 adapters (which may change from moment to moment). Example:
253
254 .RS
255 bus "i2c\-0" "SMBus PIIX4 adapter at e800"
256 .RE
257
258 The first argument is the bus number. It is the literal text
259 .IR i2c\- ,
260 followed by a number. As there is a dash in this argument, it must
261 always be quoted.
262
263 The second argument is the adapter name, it must match exactly the
264 adapter name as it appears in
265 .IR /sys/class/i2c\-adapter/i2c\-*/name .
266 It should always be quoted as well as it will most certainly contain
267 spaces or dashes.
268
269 The
270 .I bus
271 statements may be scattered randomly throughout the configuration file;
272 there is no need to place the bus line before the place where its binding
273 is referred to. Still, as a matter of good style, we suggest you place
274 all
275 .I bus
276 statements together at the top of your configuration file.
277
278 Running
279 .B sensors --bus-list
280 will generate these lines for you.
281
282 In the case where multiple configuration files are used, the scope
283 of each
284 .I bus
285 statement is the configuration file it was defined in. This makes it
286 possible to have bus statements in all configuration files which will
287 not unexpectedly interfere with each other.
288
289 .SS STATEMENT ORDER
290
291 Statements can go in any order, however it is recommended to put
292 `set fanX_div' statements before `set fanX_min' statements, in case
293 a driver doesn't preserve the fanX_min setting when the fanX_div
294 value is changed. Even if the driver does, it's still better to put
295 the statements in this order to avoid accuracy loss.
296
297 .SH VOLTAGE COMPUTATION DETAILS
298
299 Most voltage sensors in sensor chips have a range of 0 to 4.08 V.
300 This is generally sufficient for the +3.3V and CPU supply voltages, so
301 the sensor chip reading is the actual voltage.
302
303 Other supply voltages must be scaled with an external resistor network.
304 The driver reports the value at the chip's pin (0 \- 4.08 V), and the
305 userspace application must convert this raw value to an actual voltage.
306 The
307 .I compute
308 statements provide this facility.
309
310 Unfortunately the resistor values vary among motherboard types.
311 Therefore you have to figure out the correct resistor values for your
312 own motherboard.
313
314 For positive voltages (typically +5V and +12V), two resistors are used,
315 with the following formula:
316 R1 = R2 * (Vs/Vin \- 1)
317
318 where:
319 R1 and R2 are the resistor values
320 Vs is the actual voltage being monitored
321 Vin is the voltage at the pin
322
323 This leads to the following compute formula:
324 compute inX @*((R1/R2)+1), @/(((R1/R2)+1)
325
326 Real\-world formula for +5V and +12V would look like:
327 compute in3 @*((6.8/10)+1), @/((6.8/10)+1)
328 compute in4 @*((28/10)+1), @/((28/10)+1)
329
330 For negative voltages (typically \-5V and \-12V), two resistors are used
331 as well, but different boards use different strategies to bring the
332 voltage value into the 0 \- 4.08 V range. Some use an inverting
333 amplifier, others use a positive reference voltage. This leads to
334 different computation formulas. Note that most users won't have to care
335 because most modern motherboards make little use of \-12V and no use of
336 \-5V so they do not bother monitoring these voltage inputs.
337
338 Real\-world examples for the inverting amplifier case:
339 compute in5 \-@*(240/60), \-@/(240/60)
340 compute in6 \-@*(100/60), \-@/(100/60)
341
342 Real\-world examples for the positive voltage reference case:
343 compute in5 @*(1+232/56) \- 4.096*232/56, (@ + 4.096*232/56)/(1+232/56)
344 compute in6 @*(1+120/56) \- 4.096*120/56, (@ + 4.096*120/56)/(1+120/56)
345
346 Many recent monitoring chips have a 0 \- 2.04 V range, so scaling resistors
347 are even more needed, and resistor values are different.
348
349 There are also a few chips out there which have internal scaling
350 resistors, meaning that their value is known and doesn't change from
351 one motherboard to the next. For these chips, the driver usually
352 handles the scaling so it is transparent to the user and no
353 .I compute
354 statements are needed.
355
356 .SH TEMPERATURE CONFIGURATION
357
358 On top of the usual features, temperatures can have two specific
359 sub\-features: temperature sensor type (tempX_type) and hysteresis
360 values (tempX_max_hyst, tempX_crit_hyst etc.).
361
362 .SS THERMAL SENSOR TYPES
363
364 Available thermal sensor types:
365 .TS
366 r l.
367 1 PII/Celeron Diode
368 2 3904 transistor
369 3 thermal diode
370 4 thermistor
371 5 AMD AMDSI
372 6 Intel PECI
373 .TE
374
375 For example, to set temp1 to thermistor type, use:
376
377 .RS
378 set temp1_type 4
379 .RE
380
381 Only certain chips support thermal sensor type change, and even these
382 usually only support some of the types above. Please refer to the
383 specific driver documentation to find out which types are supported
384 by your chip.
385
386 In theory, the BIOS should have configured the sensor types correctly,
387 so you shouldn't have to touch them, but sometimes it isn't the case.
388
389 .SS THERMAL HYSTERESIS MECHANISM
390
391 Many monitoring chips do not handle the high and critical temperature
392 limits as simple limits. Instead, they have two values for each
393 limit, one which triggers an alarm when the temperature rises and another
394 one which clears the alarm when the temperature falls. The latter is
395 typically a few degrees below the former. This mechanism is known as
396 hysteresis.
397
398 The reason for implementing things that way is that high temperature
399 alarms typically trigger an action to attempt to cool the system down,
400 either by scaling down the CPU frequency, or by kicking in an extra
401 fan. This should normally let the temperature fall in a timely manner.
402 If this was clearing the alarm immediately, then the system would be
403 back to its original state where the temperature rises and the alarm
404 would immediately trigger again, causing an undesirable tight fan on,
405 fan off loop. The hysteresis mechanism ensures that the system is
406 really cool before the fan stops, so that it will not have to kick in
407 again immediately.
408
409 So, in addition to tempX_max, many chips have a tempX_max_hyst
410 sub-feature. Likewise, tempX_crit often comes with tempX_crit_hyst.
411 tempX_emerg_hyst, tempX_min_hyst and tempX_lcrit_hyst exist too but
412 aren't as common.
413 Example:
414
415 .RS
416 set temp1_max 60
417 .RE
418 .RS
419 set temp1_max_hyst 56
420 .RE
421
422 The hysteresis mechanism can be disabled by giving both limits the same
423 value.
424
425 Note that it is strongly recommended to set the hysteresis value after
426 the limit value it relates to in the configuration file. Implementation
427 details on the hardware or driver side may cause unexpected results if
428 the hysteresis value is set first.
429
430 .SH BEEPS
431
432 Some chips support alarms with beep warnings. When an alarm is triggered
433 you can be warned by a beeping signal through your computer speaker. On
434 top of per\-feature beep flags, there is usually a master beep control
435 switch to enable or disable beeping globally. Enable beeping using:
436
437 .RS
438 set beep_enable 1
439 .RE
440
441 or disable it using:
442
443 .RS
444 set beep_enable 0
445 .RE
446
447 .SH WHICH STATEMENT APPLIES
448
449 If more than one statement of the same kind applies at a certain moment,
450 the last one in the configuration file is used. So usually, you should
451 put more general
452 .I chip
453 statements at the top, so you can overrule them below.
454
455 .SH SYNTAX
456 Comments are introduced by hash marks. A comment continues to the end of the
457 line. Empty lines, and lines containing only whitespace or comments are
458 ignored. Other lines have one of the below forms. There must be whitespace
459 between each element, but the amount of whitespace is unimportant. A line
460 may be continued on the next line by ending it with a backslash; this does
461 not work within a comment,
462 .B NAME
463 or
464 .BR NUMBER .
465
466 .RS
467 bus
468 .B NAME NAME
469 .sp 0
470 chip
471 .B NAME\-LIST
472 .sp 0
473 label
474 .B NAME NAME
475 .sp 0
476 compute
477 .B NAME EXPR
478 ,
479 .B EXPR
480 .sp 0
481 ignore
482 .B NAME
483 .sp 0
484 set
485 .B NAME EXPR
486 .RE
487 .sp
488 A
489 .B NAME
490 is a string. If it only contains letters, digits and underscores, it does not
491 have to be quoted; in all other cases, you must use double quotes around it.
492 Within quotes, you can use the normal escape\-codes from C.
493
494 A
495 .B NAME\-LIST
496 is one or more
497 .B NAME
498 items behind each other, separated by whitespace.
499
500 A
501 .B EXPR
502 is of one of the below forms:
503
504 .RS
505 .B NUMBER
506 .sp 0
507 .B NAME
508 .sp 0
509 @
510 .sp 0
511 .B EXPR
512 +
513 .B EXPR
514 .sp 0
515 .B EXPR
516 \-
517 .B EXPR
518 .sp 0
519 .B EXPR
520 *
521 .B EXPR
522 .sp 0
523 .B EXPR
524 /
525 .B EXPR
526 .sp 0
527 \-
528 .B EXPR
529 .sp 0
530 ^
531 .B EXPR
532 .sp 0
533 `
534 .B EXPR
535 .sp 0
536 (
537 .B EXPR
538 )
539 .RE
540
541 A
542 .B NUMBER
543 is a floating\-point number. `10', `10.4' and `.4' are examples of valid
544 floating\-point numbers; `10.' or `10E4' are not valid.
545
546 .SH FILES
547 .I /etc/sensors3.conf
548 .br
549 .I /etc/sensors.conf
550 .RS
551 The system-wide
552 .BR libsensors (3)
553 configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,
554 /etc/sensors.conf is used instead.
555 .RE
556
557 .I /etc/sensors.d
558 .RS
559 A directory where you can put additional libsensors configuration files.
560 Files found in this directory will be processed in alphabetical order after
561 the default configuration file. Files with names that start with a dot are
562 ignored.
563 .RE
564
565 .SH SEE ALSO
566 libsensors(3)
567
568 .SH AUTHOR
569 Frodo Looijaard and the lm_sensors group
570 https://hwmon.wiki.kernel.org/lm_sensors