1 .\" $OpenBSD: sensorsd.conf.5,v 1.18 2007/08/14 17:10:02 cnst Exp $
2 .\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.conf.5,v 1.2 2007/10/26 08:22:01 swildner Exp $
4 .\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
5 .\" Copyright (c) 2005 Matthew Gream <matthew.gream@pobox.com>
6 .\" Copyright (c) 2007 Constantine A. Murenin <cnst@FreeBSD.org>
8 .\" Permission to use, copy, modify, and distribute this software for any
9 .\" purpose with or without fee is hereby granted, provided that the above
10 .\" copyright notice and this permission notice appear in all copies.
12 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 .Nd configuration file for sensorsd
31 to configure hardware sensor monitoring.
32 Each sensor registered in the system
33 is matched by at most one entry in
35 which may specify high and low limits,
36 and whether sensor status changes provided by the driver should be ignored.
37 If the limits are crossed or if the status provided by the driver changes,
39 alert functionality is triggered and a command, if specified, is
44 file follows the syntax of configuration databases as documented in
46 Sensors may be specified by their full
49 variable name or by type,
50 with the full name taking precedence.
51 For example, if an entry
52 .Va hw.sensors.lm0.temp1
53 is not found, then an entry for
55 will instead be looked for.
57 The following attributes may be used:
59 .Bl -tag -width ".Li command" -offset indent -compact
61 Specify a command to be executed on state change.
63 Specify an upper limit.
65 Specify a lower limit.
67 Ignore status provided by the driver.
70 The values for temperature sensors can be given in degrees Celsius or
71 Fahrenheit, for voltage sensors in volts, and fan speed sensors take a
72 unit-less number representing RPM.
73 Values for all other types of sensors can be specified
74 in the same units as they appear under the
79 Sensors that provide status (such as those from
84 do not require boundary values specified
85 and simply trigger on status transitions.
86 If boundaries are specified nonetheless,
87 then they are used in addition to automatic status monitoring,
90 attribute is specified to ignore status values that are provided by the drivers.
92 The command is executed when there is any change in sensor state.
93 Tokens in the command are substituted as follows:
95 .Bl -tag -width indent -offset indent -compact
99 of the device the sensor sits on
105 the sensor's current value
107 the sensor's low limit
109 the sensor's high limit
114 monitors status changes on all sensors that keep their state.
115 This behaviour may be altered by using the
118 status changes of sensors of a certain type
119 or individual sensors.
121 .Bl -tag -width ".Pa /etc/sensorsd.conf"
122 .It Pa /etc/sensorsd.conf
123 Configuration file for
127 In the following configuration file,
129 .Va hw.sensors.ipmi0.temp0
131 if its status as provided by
134 .Pa /etc/sensorsd/log_warning
136 with the sensor type, number and current value passed to it.
139 .Va hw.sensors.lm0.volt3
140 transitions to being within or outside
141 a range of 4.8V and 5.2V;
142 if the speed of the fan attached to
143 .Va hw.sensors.lm0.fan1
144 transitions to being below or above 1000RPM;
145 if any RAID volume drive
146 changes its status from, for example,
148 such as in the case of drive failure, rebuild, or a complete failure,
150 .Pa /etc/sensorsd/drive
151 will be executed, with the sensor number passed to it; however,
152 no alerts will be generated for status changes on timedelta sensors.
153 For all other sensors whose drivers automatically provide
154 sensor status updates, alerts will be generated
155 each time those sensors undergo status transitions.
156 .Bd -literal -offset indent
157 # Comments are allowed
158 hw.sensors.ipmi0.temp0:high=80C:command=/etc/sensorsd/log_warning %t %n %2
159 hw.sensors.lm0.volt3:low=4.8V:high=5.2V
160 hw.sensors.lm0.fan1:low=1000
161 drive:command=/etc/sensorsd/drive %n
162 timedelta:istatus #ignore status changes for timedelta
174 file format first appeared in
176 The format was altered in
178 to accommodate hierarchical device-based sensor addressing.
181 attribute was introduced in
184 Alert functionality is triggered every time there is a change in sensor state;
188 the status of each monitored sensor changes
189 from undefined to whatever it is.
190 One must keep this in mind when using commands
191 that may unconditionally perform adverse actions (e.g.\&
193 as they will be executed even when all sensors perform to specification.
194 If this is undesirable, then a wrapper shell script should be used instead.