Remove references to drivers which don't exist in DragonFly.
[dragonfly.git] / usr.sbin / sensorsd / sensorsd.conf.5
CommitLineData
eb3a3472 1.\" $OpenBSD: sensorsd.conf.5,v 1.18 2007/08/14 17:10:02 cnst Exp $
461f128b 2.\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.conf.5,v 1.3 2007/12/25 12:54:50 hasso Exp $
eb3a3472
HT
3.\"
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>
7.\"
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.
11.\"
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.
19.\"
461f128b 20.Dd December 25, 2007
eb3a3472
HT
21.Dt SENSORSD.CONF 5
22.Os
23.Sh NAME
24.Nm sensorsd.conf
25.Nd configuration file for sensorsd
26.Sh DESCRIPTION
27The
28.Nm
29file is read by
30.Xr sensorsd 8
31to configure hardware sensor monitoring.
32Each sensor registered in the system
33is matched by at most one entry in
34.Nm ,
35which may specify high and low limits,
36and whether sensor status changes provided by the driver should be ignored.
37If the limits are crossed or if the status provided by the driver changes,
7dcbe396 38.Xr sensorsd 8 Ap s
eb3a3472
HT
39alert functionality is triggered and a command, if specified, is
40executed.
41.Pp
7dcbe396 42The
eb3a3472 43.Nm
7dcbe396 44file follows the syntax of configuration databases as documented in
eb3a3472
HT
45.Xr getcap 3 .
46Sensors may be specified by their full
47.Va hw.sensors
48.Xr sysctl 8
49variable name or by type,
50with the full name taking precedence.
51For example, if an entry
7dcbe396 52.Va hw.sensors.lm0.temp1
eb3a3472 53is not found, then an entry for
7dcbe396 54.Dq Li temp
eb3a3472
HT
55will instead be looked for.
56.Pp
57The following attributes may be used:
58.Pp
7dcbe396 59.Bl -tag -width ".Li command" -offset indent -compact
eb3a3472
HT
60.It Li command
61Specify a command to be executed on state change.
62.It Li high
63Specify an upper limit.
64.It Li low
65Specify a lower limit.
66.It Li istatus
67Ignore status provided by the driver.
68.El
69.Pp
70The values for temperature sensors can be given in degrees Celsius or
71Fahrenheit, for voltage sensors in volts, and fan speed sensors take a
72unit-less number representing RPM.
73Values for all other types of sensors can be specified
74in the same units as they appear under the
75.Xr sysctl 8
76.Va hw.sensors
77tree.
78.Pp
461f128b 79Sensors that provide status
eb3a3472
HT
80do not require boundary values specified
81and simply trigger on status transitions.
82If boundaries are specified nonetheless,
83then they are used in addition to automatic status monitoring,
84unless the
7dcbe396 85.Dq Li istatus
eb3a3472
HT
86attribute is specified to ignore status values that are provided by the drivers.
87.Pp
88The command is executed when there is any change in sensor state.
89Tokens in the command are substituted as follows:
90.Pp
7dcbe396
SW
91.Bl -tag -width indent -offset indent -compact
92.It Li %x
93the
94.Va xname
95of the device the sensor sits on
96.It Li %t
eb3a3472 97the type of sensor
7dcbe396 98.It Li %n
eb3a3472 99the sensor number
7dcbe396 100.It Li %2
eb3a3472 101the sensor's current value
7dcbe396 102.It Li %3
eb3a3472 103the sensor's low limit
7dcbe396 104.It Li %4
eb3a3472
HT
105the sensor's high limit
106.El
107.Pp
108By default,
109.Xr sensorsd 8
110monitors status changes on all sensors that keep their state.
111This behaviour may be altered by using the
7dcbe396 112.Dq Li istatus
eb3a3472
HT
113attribute to ignore
114status changes of sensors of a certain type
115or individual sensors.
116.Sh FILES
7dcbe396
SW
117.Bl -tag -width ".Pa /etc/sensorsd.conf"
118.It Pa /etc/sensorsd.conf
eb3a3472
HT
119Configuration file for
120.Xr sensorsd 8 .
121.El
122.Sh EXAMPLES
123In the following configuration file,
7dcbe396 124if
461f128b
HT
125.Va hw.sensors.lm0.temp0
126transitions 80C, the command
eb3a3472
HT
127.Pa /etc/sensorsd/log_warning
128will be executed,
129with the sensor type, number and current value passed to it.
130Alerts will be sent
7dcbe396
SW
131if
132.Va hw.sensors.lm0.volt3
133transitions to being within or outside
eb3a3472 134a range of 4.8V and 5.2V;
7dcbe396
SW
135if the speed of the fan attached to
136.Va hw.sensors.lm0.fan1
eb3a3472 137transitions to being below or above 1000RPM;
461f128b
HT
138however, no alerts will be generated for status changes on
139timedelta sensors.
eb3a3472
HT
140For all other sensors whose drivers automatically provide
141sensor status updates, alerts will be generated
142each time those sensors undergo status transitions.
143.Bd -literal -offset indent
144# Comments are allowed
461f128b 145hw.sensors.lm0.temp0:high=80C:command=/etc/sensorsd/log_warning %t %n %2
eb3a3472
HT
146hw.sensors.lm0.volt3:low=4.8V:high=5.2V
147hw.sensors.lm0.fan1:low=1000
eb3a3472
HT
148timedelta:istatus #ignore status changes for timedelta
149.Ed
150.Sh SEE ALSO
151.Xr getcap 3 ,
461f128b 152.Xr lm 4 ,
eb3a3472
HT
153.Xr sensorsd 8 ,
154.Xr sysctl 8
155.Sh HISTORY
156The
157.Nm
158file format first appeared in
159.Ox 3.5 .
160The format was altered in
161.Ox 4.1
162to accommodate hierarchical device-based sensor addressing.
163The
7dcbe396 164.Dq Li istatus
eb3a3472
HT
165attribute was introduced in
166.Ox 4.2 .
167.Sh CAVEATS
168Alert functionality is triggered every time there is a change in sensor state;
169for example, when
170.Xr sensorsd 8
171is started,
172the status of each monitored sensor changes
173from undefined to whatever it is.
174One must keep this in mind when using commands
175that may unconditionally perform adverse actions (e.g.\&
176.Xr shutdown 8 ) ,
177as they will be executed even when all sensors perform to specification.
178If this is undesirable, then a wrapper shell script should be used instead.