1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
.\" $OpenBSD: sensorsd.conf.5,v 1.12 2007/05/29 06:04:41 jmc Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\" Copyright (c) 2005 Matthew Gream <matthew.gream@pobox.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 28, 2007
.Dt SENSORSD.CONF 5
.Os
.Sh NAME
.Nm sensorsd.conf
.Nd configuration file for sensorsd
.Sh SYNOPSIS
.Nm sensorsd.conf
.Sh DESCRIPTION
The
.Nm
file is read by
.Xr sensorsd 8
to configure hardware sensor monitoring.
Each valid sensor registered in the system
is matched by at most one entry in
.Nm ,
which may specify high and low limits.
If the limits are crossed,
.Xr sensorsd 8 's
alert functionality is triggered and a command, if specified, is
executed.
.Pp
.Nm
follows the syntax of configuration databases as documented in
.Xr getcap 3 .
Complete
.Va hw.sensors
.Xr sysctl 8
variable names are used to find entries,
with a fallback to sensor types.
For example, if an entry with a full name of a certain temperature
sensor is not present in
.Nm ,
then an entry
.Va temp
will be looked at to determine the limits.
The following attributes may be used:
.Pp
.Bl -tag -width "commandXX" -offset indent -compact
.It Li command
Specify a command to be executed if limits are crossed.
.It Li high
Specify an upper limit.
.It Li low
Specify a lower limit.
.El
.Pp
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.
.Pp
Sensors that provide status (such as from
.Xr bio 4 ,
.Xr esm 4 ,
or
.Xr ipmi 4 )
do not require boundary values specified (that otherwise will be
ignored) and simply trigger on status transitions.
.Pp
The command is executed on transitions out of, and back into, given limits.
Tokens in the command are substituted as follows:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It %x
the xname of the device the sensor sits on
.It %t
the type of sensor
.It %n
the sensor number
.It %2
the sensor's current value
.It %3
the sensor's low limit
.It %4
the sensor's high limit
.El
.Sh FILES
.Bl -tag -width "/etc/sensorsd.conf"
.It /etc/sensorsd.conf
Configuration file for
.Xr sensorsd 8 .
.El
.Sh EXAMPLES
In the following configuration file,
if hw.sensors.ipmi0.temp0 goes above 80C, the command
.Pa /etc/sensorsd/log_warning
will be executed,
with the sensor type, number and current value passed to it.
Alerts will be sent if hw.sensors.ipmi0.temp1 goes above 170F;
if hw.sensors.lm0.volt3 goes below 4.8V or above 5.2V;
if the speed of the fan attached to hw.sensors.lm0.fan1
goes below 1000RPM or above 8000RPM;
or if hw.sensors.ami0.drive0,
attached to raid volume sd0,
goes into a state other than
.Dq OK ,
such as drive failure, rebuild, or a complete failure.
.Bd -literal -offset indent
# Comments are allowed
hw.sensors.ipmi0.temp0:high=80C:command=/etc/sensorsd/log_warning %t %n %2
hw.sensors.ipmi0.temp1:high=170F
hw.sensors.lm0.volt3:low=4.8V:high=5.2V
hw.sensors.lm0.fan1:low=1000:high=8000
hw.sensors.ami0.drive0: # raid volume status changes
.Ed
.Sh SEE ALSO
.Xr getcap 3 ,
.Xr bio 4 ,
.Xr esm 4 ,
.Xr ipmi 4 ,
.Xr sensorsd 8 ,
.Xr sysctl 8
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 3.5 .
|