SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from OpenSuSE libsensors5-3.5.0.git20190123-1.1.x86_64.rpm

sensors.conf

Section: Linux User's Manual (5)
Updated: November 2012
Index 

NAME

sensors.conf - libsensors configuration file

 

DESCRIPTION

sensors.conf describes how libsensors, and so all programs using it, shouldtranslate the raw readings from the kernel modules to real-world values.

 

SEMANTICS

On a given system, there may be one or more hardware monitoring chips.Each chip may have several features. For example, the LM78 monitors 7voltage inputs, 3 fans and one temperature. Feature names arestandardized. Typical feature names are in0, in1, in2... for voltageinputs, fan1, fan2, fan3... for fans and temp1, temp2, temp3... fortemperature inputs.

Each feature may in turn have one or more sub-features, eachrepresenting an attribute of the feature: input value, low limit, highlimit, alarm, etc. Sub-feature names are standardized as well. Forexample, the first voltage input (in0) would typically havesub-features in0_input (measured value), in0_min (low limit), in0_max(high limit) and in0_alarm (alarm flag). Which sub-features areactually present depend on the exact chip type.

Thesensors.confconfiguration file will let you configure each chip, feature andsub-feature in a way that makes sense for your system.

The rest of this section describes the meaning of each configurationstatement.

 

CHIP STATEMENT

Achipstatement selects for which chips all followingcompute,label,ignoreandsetstatements are meant. A chipselection remains valid until the nextchipstatement. Example:

chip "lm78-*" "lm79-*"

If a chip matches at least one of the chip descriptions, the followingconfiguration lines are examined for it, otherwise they are ignored.

A chip description is built from several elements, separated bydashes. The first element is the chip type, the second element isthe name of the bus, and the third element is the hexadecimal addressof the chip. Such chip descriptions are printed by sensors(1) as thefirst line for every chip.

The name of the bus is eitherisa,pci,virtual,spi-*,i2c-NormdiowithNbeing a bus number as bound with abusstatement. This list isn't necessarily exhaustive as support for otherbus types may be added in the future.

You may substitute the wildcard operator*for every element. Note however that it wouldn't make any sense to specifythe address without the bus type, so the address part is plain omittedwhen the bus type isn't specified.Here is how you would express the following matches:

LM78 chip at address 0x2d on I2C bus 1lm78-i2c-1-2d
LM78 chip at address 0x2d on any I2C buslm78-i2c-*-2d
LM78 chip at address 0x290 on the ISA buslm78-isa-0290
Any LM78 chip on I2C bus 1lm78-i2c-1-*
Any LM78 on any I2C buslm78-i2c-*-*
Any LM78 chip on the ISA buslm78-isa-*
Any LM78 chiplm78-*
Any chip at address 0x2d on I2C bus 1*-i2c-1-2d
Any chip at address 0x290 on the ISA bus*-isa-0290

If several chip statements match a specific chip, they are all considered.

 

LABEL STATEMENT

Alabelstatement describes how a feature should be called. Features without alabelstatement are just called by their feature name. Applications can use thisto label the readings they present. Example:

label in3 "+5V"

The first argument is the feature name. The second argument is the featuredescription.

Note that you must use the raw feature name, which is not necessarily theone displayed by "sensors" by default. Use "sensors -u" to see the rawfeature names. Same applies to all other statement types below.

 

IGNORE STATEMENT

Anignorestatement is a hint that a specific feature should be ignored - probablybecause it returns bogus values (for example, because a fan or temperaturesensor is not connected). Example:

ignore fan1

The only argument is the feature name. Please note that this does not disableanything in the actual sensor chip; it simply hides the feature in questionfrom libsensors users.

 

COMPUTE STATEMENT

Acomputestatement describes how a feature's raw value should be translated to areal-world value, and how a real-world value should be translated backto a raw value again. This is most useful for voltage sensors, becausein general sensor chips have a limited range and voltages outside thisrange must be divided (using resistors) before they can be monitored.Example:

compute in3 ((6.8/10)+1)*@, @/((6.8/10)+1)

The example above expresses the fact that the voltage input is dividedusing two resistors of values 6.8 Ohm and 10 Ohm, respectively. See theVOLTAGE COMPUTATION DETAILSsection below for details.

The first argument is the feature name. The second argument is an expressionwhich specifies how a raw value must be translated to a real-world value;`@' stands here for the raw value. This is the formula which will be appliedwhen reading values from the chip. The third argument is an expression thatspecifies how a real-world value should be translated back to a raw value;`@' stands here for the real-world value. This is the formula which will beapplied when writing values to the chip. The two formulas are obviouslyrelated, and are separated by a comma.

Acomputestatement applies to all sub-features of the target feature for whichit makes sense. For example, the above example would affect sub-featuresin3_min and in3_max (which are voltage values) but not in3_alarm(which is a boolean flag.)

The following operators are supported incomputestatements:

+ - * / ( ) ^ `
^x means exp(x) and `x means ln(x).

You may use the name of sub-features in these expressions; current readingsare substituted. You should be careful though to avoid circular references.

If at any moment a translation between a raw and a real-world value iscalled for, but nocomputestatement applies, a one-on-one translation is used instead.

 

SET STATEMENT

Asetstatement is used to write a sub-feature value to the chip. Of course notall sub-feature values can be set that way, in particular input valuesand alarm flags can not. Valid sub-features are usually min/max limits.Example:

set in3_min 5 * 0.95
set in3_max 5 * 1.05

The example above basically configures the chip to allow a 5% deviancefor the +5V power input.

The first argument is the feature name. The second argument is an expressionwhich determines the written value. If there is an applyingcomputestatement, this value is fed to its third argument to translate it to araw value.

You may use the name of sub-features in these expressions; current readingsare substituted. You should be careful though to avoid circular references.

Please note thatsetstatements are only executed by sensors(1) when you use the-soption. Typical graphical sensors applications do not care about thesestatements at all.

 

BUS STATEMENT

Abusstatement binds the description of an I2C or SMBus adapter to a bus number.This makes it possible to refer to an adapter in the configuration file,independent of the actual correspondence of bus numbers and actualadapters (which may change from moment to moment). Example:

bus "i2c-0" "SMBus PIIX4 adapter at e800"

The first argument is the bus number. It is the literal texti2c-,followed by a number. As there is a dash in this argument, it mustalways be quoted.

The second argument is the adapter name, it must match exactly theadapter name as it appears in/sys/class/i2c-adapter/i2c-*/name.It should always be quoted as well as it will most certainly containspaces or dashes.

Thebusstatements may be scattered randomly throughout the configuration file;there is no need to place the bus line before the place where its bindingis referred to. Still, as a matter of good style, we suggest you placeallbusstatements together at the top of your configuration file.

Runningsensors --bus-listwill generate these lines for you.

In the case where multiple configuration files are used, the scopeof eachbusstatement is the configuration file it was defined in. This makes itpossible to have bus statements in all configuration files which willnot unexpectedly interfere with each other.

 

STATEMENT ORDER

Statements can go in any order, however it is recommended to put`set fanX_div' statements before `set fanX_min' statements, in casea driver doesn't preserve the fanX_min setting when the fanX_divvalue is changed. Even if the driver does, it's still better to putthe statements in this order to avoid accuracy loss.

 

VOLTAGE COMPUTATION DETAILS

Most voltage sensors in sensor chips have a range of 0 to 4.08 V.This is generally sufficient for the +3.3V and CPU supply voltages, sothe sensor chip reading is the actual voltage.

Other supply voltages must be scaled with an external resistor network.The driver reports the value at the chip's pin (0 - 4.08 V), and theuserspace application must convert this raw value to an actual voltage.Thecomputestatements provide this facility.

Unfortunately the resistor values vary among motherboard types.Therefore you have to figure out the correct resistor values for yourown motherboard.

For positive voltages (typically +5V and +12V), two resistors are used,with the following formula:
        R1 = R2 * (Vs/Vin - 1)

where:
        R1 and R2 are the resistor values
        Vs is the actual voltage being monitored
        Vin is the voltage at the pin

This leads to the following compute formula:
        compute inX @*((R1/R2)+1),  @/(((R1/R2)+1)

Real-world formula for +5V and +12V would look like:
        compute in3 @*((6.8/10)+1), @/((6.8/10)+1)
        compute in4 @*((28/10)+1),  @/((28/10)+1)

For negative voltages (typically -5V and -12V), two resistors are usedas well, but different boards use different strategies to bring thevoltage value into the 0 - 4.08 V range. Some use an invertingamplifier, others use a positive reference voltage. This leads todifferent computation formulas. Note that most users won't have to carebecause most modern motherboards make little use of -12V and no use of-5V so they do not bother monitoring these voltage inputs.

Real-world examples for the inverting amplifier case:
        compute in5 -@*(240/60), -@/(240/60)
        compute in6 -@*(100/60), -@/(100/60)

Real-world examples for the positive voltage reference case:
        compute in5 @*(1+232/56) - 4.096*232/56, (@ + 4.096*232/56)/(1+232/56)
        compute in6 @*(1+120/56) - 4.096*120/56, (@ + 4.096*120/56)/(1+120/56)

Many recent monitoring chips have a 0 - 2.04 V range, so scaling resistorsare even more needed, and resistor values are different.

There are also a few chips out there which have internal scalingresistors, meaning that their value is known and doesn't change fromone motherboard to the next. For these chips, the driver usuallyhandles the scaling so it is transparent to the user and nocomputestatements are needed.

 

TEMPERATURE CONFIGURATION

On top of the usual features, temperatures can have two specificsub-features: temperature sensor type (tempX_type) and hysteresisvalues (tempX_max_hyst, tempX_crit_hyst etc.).

 

THERMAL SENSOR TYPES

Available thermal sensor types:
1PII/Celeron Diode
23904 transistor
3thermal diode
4thermistor
5AMD AMDSI
6Intel PECI

For example, to set temp1 to thermistor type, use:

set temp1_type 4

Only certain chips support thermal sensor type change, and even theseusually only support some of the types above. Please refer to thespecific driver documentation to find out which types are supportedby your chip.

In theory, the BIOS should have configured the sensor types correctly,so you shouldn't have to touch them, but sometimes it isn't the case.

 

THERMAL HYSTERESIS MECHANISM

Many monitoring chips do not handle the high and critical temperaturelimits as simple limits. Instead, they have two values for eachlimit, one which triggers an alarm when the temperature rises and anotherone which clears the alarm when the temperature falls. The latter istypically a few degrees below the former. This mechanism is known ashysteresis.

The reason for implementing things that way is that high temperaturealarms typically trigger an action to attempt to cool the system down,either by scaling down the CPU frequency, or by kicking in an extrafan. This should normally let the temperature fall in a timely manner.If this was clearing the alarm immediately, then the system would beback to its original state where the temperature rises and the alarmwould immediately trigger again, causing an undesirable tight fan on,fan off loop. The hysteresis mechanism ensures that the system isreally cool before the fan stops, so that it will not have to kick inagain immediately.

So, in addition to tempX_max, many chips have a tempX_max_hystsub-feature. Likewise, tempX_crit often comes with tempX_crit_hyst.tempX_emerg_hyst, tempX_min_hyst and tempX_lcrit_hyst exist too butaren't as common.Example:

set temp1_max 60
set temp1_max_hyst 56

The hysteresis mechanism can be disabled by giving both limits the samevalue.

Note that it is strongly recommended to set the hysteresis value afterthe limit value it relates to in the configuration file. Implementationdetails on the hardware or driver side may cause unexpected results ifthe hysteresis value is set first.

 

BEEPS

Some chips support alarms with beep warnings. When an alarm is triggeredyou can be warned by a beeping signal through your computer speaker. Ontop of per-feature beep flags, there is usually a master beep controlswitch to enable or disable beeping globally. Enable beeping using:

set beep_enable 1

or disable it using:

set beep_enable 0

 

WHICH STATEMENT APPLIES

If more than one statement of the same kind applies at a certain moment,the last one in the configuration file is used. So usually, you shouldput more generalchipstatements at the top, so you can overrule them below.

 

SYNTAX

Comments are introduced by hash marks. A comment continues to the end of theline. Empty lines, and lines containing only whitespace or comments areignored. Other lines have one of the below forms. There must be whitespacebetween each element, but the amount of whitespace is unimportant. A linemay be continued on the next line by ending it with a backslash; this doesnot work within a comment,NAMEorNUMBER.

busNAME NAME NAME

chipNAME-LIST

labelNAME NAME

computeNAME EXPR,EXPR

ignoreNAME

setNAME EXPR

ANAMEis a string. If it only contains letters, digits and underscores, it does nothave to be quoted; in all other cases, you must use double quotes around it.Within quotes, you can use the normal escape-codes from C.

ANAME-LISTis one or moreNAMEitems behind each other, separated by whitespace.

AEXPRis of one of the below forms:

NUMBER

NAME

@

EXPR+EXPR

EXPR-EXPR

EXPR*EXPR

EXPR/EXPR

-EXPR

^EXPR

`EXPR

(EXPR)

ANUMBERis a floating-point number. `10', `10.4' and `.4' are examples of validfloating-point numbers; `10.' or `10E4' are not valid.

 

FILES

/etc/sensors3.conf
/etc/sensors.conf
The system-widelibsensors(3)configuration file. /etc/sensors3.conf is tried first, and if it doesn't exist,/etc/sensors.conf is used instead.

/etc/sensors.d

A directory where you can put additional libsensors configuration files.Files found in this directory will be processed in alphabetical order afterthe default configuration file. Files with names that start with a dot areignored.

 

SEE ALSO

libsensors(3)

 

AUTHOR

Frodo Looijaard and the lm_sensors grouphttps://hwmon.wiki.kernel.org/lm_sensors


 

Index

NAME
DESCRIPTION
SEMANTICS
CHIP STATEMENT
LABEL STATEMENT
IGNORE STATEMENT
COMPUTE STATEMENT
SET STATEMENT
BUS STATEMENT
STATEMENT ORDER
VOLTAGE COMPUTATION DETAILS
TEMPERATURE CONFIGURATION
THERMAL SENSOR TYPES
THERMAL HYSTERESIS MECHANISM
BEEPS
WHICH STATEMENT APPLIES
SYNTAX
FILES
SEE ALSO
AUTHOR

This document was created byman2html,using the manual pages.