xref: /netbsd-src/usr.sbin/envstat/envstat.8 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\"	$NetBSD: envstat.8,v 1.36 2007/12/12 20:27:30 xtraeme Exp $
2.\"
3.\" Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Juan Romero Pardines and Bill Squier.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"        This product includes software developed by the NetBSD
20.\"        Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"
37.Dd December 12, 2007
38.Dt ENVSTAT 8
39.Os
40.Sh NAME
41.Nm envstat
42.Nd utility to handle environmental sensors
43.Sh SYNOPSIS
44.Nm
45.Op Fl DfIlSx
46.Op Fl c Ar file
47.Op Fl d Ar device
48.Op Fl i Ar interval
49.Op Fl s Ar "sensor,..."
50.Op Fl w Ar width
51.Sh DESCRIPTION
52.Nm
53is a utility that handles various aspects of the sensors
54registered with the
55.Xr envsys 4
56framework.
57It is capable of displaying sensor values as well as
58changing parameters and setting critical limits for the sensors.
59.Pp
60In display mode, column widths as well as displayed sensors
61are fully customizable.
62Critical limits or other properties can be set via the configuration file.
63If critical limits were set previously, the display mode will show
64the critical limits in addition to the current values.
65.Pp
66The following options are available:
67.Bl -tag -width flag
68.It Fl c
69Accepts a file as argument to set properties for sensors in
70devices registered with the framework. See the
71.Xr envsys.conf 5
72manual page for more information.
73.It Fl D
74Display the names of the drivers that were registered with
75the
76.Xr envsys 4
77framework, one per line and some properties for the driver: refresh timeout
78value, for example.
79.It Fl d Ar device
80Display only the sensors for the given
81.Ar device .
82This is useful when there are multiple devices registered and
83you want to only see results from a specific device.
84.It Fl f
85Display temperature values in degrees Fahrenheit.
86The default is to display temperature values in degrees Celsius.
87.It Fl I
88This flag skips the sensors with invalid state, these are normally
89shown using the
90.Qq N/A
91string by default.
92.It Fl i Ar interval
93Repeat the display every
94.Ar interval
95seconds.
96Note that some devices do not provide fresh values on demand.
97See the individual devices manual page for meaningful values for
98.Ar interval .
99If not specified, or specified as 0,
100.Nm
101produces one round of values and exits.
102.It Fl l
103List the names of all supported sensors, one per line.
104Use of this flag causes
105.Nm
106to ignore all other option flags.
107.It Fl r
108This flag is provided for compatibility reasons and there's no need
109to use it. In the previous implementation, it was used to enable the
110row mode; this mode is now the default.
111.It Fl S
112This flag is used to restore defaults to all devices registered with
113the framework. This will remove all properties that were set in
114the configuration file to the setting that the drivers use by
115default.
116.It Fl s Ar "sensor,..."
117Restrict the display to the named sensors.
118The sensor names must be supplied as a comma separated list.
119Sensor names are case sensitive. Note that it's mandatory to use the
120.Fl d
121flag to specify the device that has the sensor.
122.It Fl w Ar width
123Use
124.Ar width
125as the column width for the output.
126Each column is additionally separated by a single space.
127The default is the length of the longest sensor name.
128.It Fl x
129Shows the property list used by the
130.Xr sysmon_envsys 9
131framework that contains details about all registered drivers
132and sensors.
133.El
134.Sh EXAMPLES
135To display the
136.Dq acpibat0 charge
137sensor on one line every ten seconds:
138.Pp
139.Dl $ envstat -s \*qacpibat0 charge\*q -d acpibat0 -i 10
140.Pp
141To list the drivers that are currently registered with
142.Xr envsys 4 :
143.Pp
144.Dl $ envstat -D
145.Pp
146To display the sensors of the driver
147.Ar aiboost0 :
148.Pp
149.Dl $ envstat -d aiboost0
150.Pp
151To set all properties specified in the configuration file:
152.Pp
153.Dl $ envstat -c /etc/envsys.conf
154.Pp
155To remove all properties that were previously set by the configuration
156file:
157.Dl $ envstat -S
158.Sh SEE ALSO
159.Xr proplib 3 ,
160.Xr acpiacad 4 ,
161.Xr acpibat 4 ,
162.Xr acpitz 4 ,
163.Xr adt7467c 4 ,
164.Xr aiboost 4 ,
165.Xr aps 4 ,
166.Xr battery_pmu 4 ,
167.Xr coretemp 4 ,
168.Xr sparc64/envctrl 4 ,
169.Xr envsys 4 ,
170.Xr ipmi 4 ,
171.Xr itesio 4 ,
172.Xr lm 4 ,
173.Xr lmtemp 4 ,
174.Xr mfi 4 ,
175.Xr nsclpcsio 4 ,
176.Xr owtemp 4 ,
177.Xr smsc 4 ,
178.Xr sparc/tctrl 4 ,
179.Xr tm121temp 4 ,
180.Xr ug 4 ,
181.Xr viaenv 4 ,
182.Xr envsys.conf 5
183.Sh HISTORY
184.Nm
185appeared in
186.Nx 1.5 .
187It was completely rewritten from scratch for
188.Nx 5.0 .
189.Sh AUTHORS
190.An -nosplit
191The
192.Nm
193utility that appeared in
194.Nx 5.0
195was written by
196.An Juan Romero Pardines .
197The previous version was written by
198.An Bill Squier .
199