Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OpenBSD-5.7)
Apropos / Subsearch:
optional field

SENSORSD.CONF(5)            BSD File Formats Manual           SENSORSD.CONF(5)

     sensorsd.conf -- configuration file for sensorsd

     The sensorsd.conf file is read by sensorsd(8) to configure hardware sen-
     sor monitoring.  Each sensor registered in the system is matched by at
     most one entry in sensorsd.conf, which may specify high and low limits,
     and whether sensor status changes provided by the driver should be
     ignored.  If the limits are crossed or if the status provided by the
     driver changes, sensorsd(8)'s alert functionality is triggered and a com-
     mand, if specified, is executed.

     sensorsd.conf follows the syntax of configuration databases as documented
     in getcap(3).  Sensors may be specified by their full hw.sensors
     sysctl(8) variable name or by type, with the full name taking precedence.
     For example, if an entry ``hw.sensors.lm0.temp1'' is not found, then an
     entry for ``temp'' will instead be looked for.

     The following attributes may be used:

           command    Specify a command to be executed on state change.
           high       Specify an upper limit.
           low        Specify a lower limit.
           istatus    Ignore status provided by the driver.

     The values for temperature sensors can be given in degrees Celsius or
     Fahrenheit, for voltage sensors in volts, and fan speed sensors take a
     unit-less number representing RPM.  Values for all other types of sensors
     can be specified in the same units as they appear under the sysctl(8)
     hw.sensors tree.

     Sensors that provide status (such as those from bio(4), esm(4), or
     ipmi(4)) do not require boundary values specified and simply trigger on
     status transitions.  If boundaries are specified nonetheless, then they
     are used in addition to automatic status monitoring, unless the
     ``istatus'' attribute is specified to ignore status values that are pro-
     vided by the drivers.

     The command is executed when there is any change in sensor state.  Tokens
     in the command are substituted as follows:

           %l      Whether the value exceeds or is within the user specified
                   limits.  Can be one of: "below", "above", "within",
                   "invalid", or "uninitialised".
           %n      The sensor number.
           %s      The sensor status.
           %x      The xname of the device the sensor sits on.
           %t      The type of sensor.
           %2      The sensor's current value.
           %3      The sensor's low limit.
           %4      The sensor's high limit.

     By default, sensorsd(8) monitors status changes on all sensors that keep
     their state.  This behaviour may be altered by using the ``istatus''
     attribute to ignore status changes of sensors of a certain type or indi-
     vidual sensors.

     /etc/sensorsd.conf  Configuration file for sensorsd(8).

     In the following configuration file, if hw.sensors.ipmi0.temp0 transi-
     tions 80C or if its status as provided by ipmi(4) changes, the command
     /etc/sensorsd/log_warning will be executed, with the sensor type, number
     and current value passed to it.  Alerts will be sent if hw.sen-
     sors.lm0.volt3 transitions to being within or outside a range of 4.8V and
     5.2V; if the speed of the fan attached to hw.sensors.lm0.fan1 transitions
     to being below or above 1000RPM; if any RAID volume drive changes its
     status from, for example, ``OK'', such as in the case of drive failure,
     rebuild, or a complete failure, the command /etc/sensorsd/drive will be
     executed, with the sensor number passed to it; however, no alerts will be
     generated for status changes on timedelta sensors.  For all other sensors
     whose drivers automatically provide sensor status updates, alerts will be
     generated each time those sensors undergo status transitions.

           # Comments are allowed
           hw.sensors.ipmi0.temp0:high=80C:command=/etc/sensorsd/log_warning %t %n %2
           drive:command=/etc/sensorsd/drive %n
           timedelta:istatus       #ignore status changes for timedelta

     getcap(3), bio(4), ipmi(4), sensorsd(8), sysctl(8)

     The sensorsd.conf file format first appeared in OpenBSD 3.5.  The format
     was altered in OpenBSD 4.1 to accommodate hierarchical device-based sen-
     sor addressing.  The ``istatus'' attribute was introduced in OpenBSD 4.2.

     Alert functionality is triggered every time there is a change in sensor
     state; for example, when sensorsd(8) is started, the status of each moni-
     tored sensor changes from undefined to whatever it is.  One must keep
     this in mind when using commands that may unconditionally perform adverse
     actions (e.g. shutdown(8)), as they will be executed even when all sen-
     sors perform to specification.  If this is undesirable, then a wrapper
     shell script should be used instead.

BSD                             March 30, 2017                             BSD