Tue Jun 7 17:29:00 2011 UTC ()
Add a BUGS section to point out that the statistic "average" is an
average only of the current, minimum, and maximum values, and not a
running average of all displayed current values.


(pgoyette)
diff -r1.58 -r1.59 src/usr.sbin/envstat/envstat.8

cvs diff -r1.58 -r1.59 src/usr.sbin/envstat/envstat.8 (switch to unified diff)

--- src/usr.sbin/envstat/envstat.8 2010/10/05 10:03:53 1.58
+++ src/usr.sbin/envstat/envstat.8 2011/06/07 17:28:59 1.59
@@ -1,249 +1,255 @@ @@ -1,249 +1,255 @@
1.\" $NetBSD: envstat.8,v 1.58 2010/10/05 10:03:53 njoly Exp $ 1.\" $NetBSD: envstat.8,v 1.59 2011/06/07 17:28:59 pgoyette Exp $
2.\" 2.\"
3.\" Copyright (c) 2000, 2007, 2008, 2009 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2000, 2007, 2008, 2009 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Juan Romero Pardines and Bill Squier. 7.\" by Juan Romero Pardines and Bill Squier.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd October 5, 2010 30.Dd June 7, 2011
31.Dt ENVSTAT 8 31.Dt ENVSTAT 8
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm envstat 34.Nm envstat
35.Nd utility to handle environmental sensors 35.Nd utility to handle environmental sensors
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.Nm 37.Nm
38.Op Fl DfIklSTWx 38.Op Fl DfIklSTWx
39.Op Fl c Ar file 39.Op Fl c Ar file
40.Op Fl d Ar device 40.Op Fl d Ar device
41.Op Fl i Ar interval 41.Op Fl i Ar interval
42.Op Fl s Ar "device:sensor,..." 42.Op Fl s Ar "device:sensor,..."
43.Op Fl w Ar width 43.Op Fl w Ar width
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45.Nm 45.Nm
46is a utility that handles various aspects of the sensors 46is a utility that handles various aspects of the sensors
47registered with the 47registered with the
48.Xr envsys 4 48.Xr envsys 4
49framework. 49framework.
50It is capable of displaying sensor values as well as 50It is capable of displaying sensor values as well as
51changing parameters and setting critical limits for the sensors. 51changing parameters and setting critical limits for the sensors.
52.Pp 52.Pp
53In display mode, column widths as well as displayed sensors 53In display mode, column widths as well as displayed sensors
54are fully customizable. 54are fully customizable.
55Critical limits or other properties can be set via the configuration file. 55Critical limits or other properties can be set via the configuration file.
56If critical limits were set previously, the display mode will show 56If critical limits were set previously, the display mode will show
57the critical limits in addition to the current values. 57the critical limits in addition to the current values.
58.Pp 58.Pp
59The following options are available: 59The following options are available:
60.Bl -tag -width flag 60.Bl -tag -width flag
61.It Fl c 61.It Fl c
62Accepts a file as argument to set properties for sensors in 62Accepts a file as argument to set properties for sensors in
63devices registered with the framework. 63devices registered with the framework.
64See the 64See the
65.Xr envsys.conf 5 65.Xr envsys.conf 5
66manual page for more information. 66manual page for more information.
67.It Fl D 67.It Fl D
68Display the names of the drivers that were registered with 68Display the names of the drivers that were registered with
69the 69the
70.Xr envsys 4 70.Xr envsys 4
71framework, one per line and some properties for the driver: refresh timeout 71framework, one per line and some properties for the driver: refresh timeout
72value, for example. 72value, for example.
73.It Fl d Ar device 73.It Fl d Ar device
74Display only the sensors for the given 74Display only the sensors for the given
75.Ar device . 75.Ar device .
76This is useful when there are multiple devices registered and 76This is useful when there are multiple devices registered and
77you want to only see results from a specific device. 77you want to only see results from a specific device.
78.It Fl f 78.It Fl f
79Display temperature values in degrees Fahrenheit. 79Display temperature values in degrees Fahrenheit.
80The default is to display temperature values in degrees Celsius. 80The default is to display temperature values in degrees Celsius.
81.It Fl I 81.It Fl I
82This flag skips the sensors with invalid state, these are normally 82This flag skips the sensors with invalid state, these are normally
83shown using the 83shown using the
84.Qq N/A 84.Qq N/A
85string by default. 85string by default.
86.It Fl i Ar interval 86.It Fl i Ar interval
87Repeat the display every 87Repeat the display every
88.Ar interval 88.Ar interval
89seconds. 89seconds.
90Note that some devices do not provide fresh values on demand. 90Note that some devices do not provide fresh values on demand.
91See the individual device's manual page for meaningful values for 91See the individual device's manual page for meaningful values for
92.Ar interval . 92.Ar interval .
93If not specified, or specified as 0, 93If not specified, or specified as 0,
94.Nm 94.Nm
95produces one round of values and exits. 95produces one round of values and exits.
96.It Fl k 96.It Fl k
97Display temperature values in Kelvin. 97Display temperature values in Kelvin.
98The default is to display temperature values in degrees Celsius. 98The default is to display temperature values in degrees Celsius.
99.It Fl l 99.It Fl l
100List the names of all supported sensors, one per line. 100List the names of all supported sensors, one per line.
101Use of this flag causes 101Use of this flag causes
102.Nm 102.Nm
103to ignore all other option flags. 103to ignore all other option flags.
104.It Fl r 104.It Fl r
105This flag is provided for compatibility reasons and there's no need 105This flag is provided for compatibility reasons and there's no need
106to use it. 106to use it.
107In the previous implementation, it was used to enable the 107In the previous implementation, it was used to enable the
108row mode; this mode is now the default. 108row mode; this mode is now the default.
109.It Fl S 109.It Fl S
110This flag is used to restore defaults to all devices registered with 110This flag is used to restore defaults to all devices registered with
111the framework. 111the framework.
112This will remove all properties that were set in 112This will remove all properties that were set in
113the configuration file to the setting that the drivers use by 113the configuration file to the setting that the drivers use by
114default. 114default.
115.It Fl s Ar "device:sensor,..." 115.It Fl s Ar "device:sensor,..."
116Restrict the display to the named sensors. 116Restrict the display to the named sensors.
117The pair device and sensor description must be supplied as a comma separated list. 117The pair device and sensor description must be supplied as a comma separated list.
118Device as well as sensor descriptions are case sensitive. 118Device as well as sensor descriptions are case sensitive.
119.It Fl T 119.It Fl T
120Create and display max, min and average statistics for a sensor. 120Create and display max, min and average statistics for a sensor.
121Must be used with an 121Must be used with an
122.Ar interval , 122.Ar interval ,
123otherwise statistics cannot be collected up. 123otherwise statistics cannot be collected up.
124Please note that to get realistic 124Please note that to get realistic
125values a lower interval value should be used, but that will also increase 125values a lower interval value should be used, but that will also increase
126overhead. 126overhead.
127.It Fl w Ar width 127.It Fl w Ar width
128Use 128Use
129.Ar width 129.Ar width
130as the column width for the output. 130as the column width for the output.
131Each column is additionally separated by a single space. 131Each column is additionally separated by a single space.
132The default is the length of the longest sensor name. 132The default is the length of the longest sensor name.
133.It Fl W 133.It Fl W
134This option has no effect. 134This option has no effect.
135It is retained for historical reasons. 135It is retained for historical reasons.
136.It Fl x 136.It Fl x
137Shows the property list used by the 137Shows the property list used by the
138.Xr sysmon_envsys 9 138.Xr sysmon_envsys 9
139framework that contains details about all registered drivers 139framework that contains details about all registered drivers
140and sensors. 140and sensors.
141.El 141.El
142.Sh UNITS 142.Sh UNITS
143The display mode may show some values with abbreviated units; 143The display mode may show some values with abbreviated units;
144for example: 144for example:
145.Bl -tag -width "12345678" -compact -offset indent 145.Bl -tag -width "12345678" -compact -offset indent
146.It A 146.It A
147Amperes 147Amperes
148.It Ah 148.It Ah
149Ampere-hours 149Ampere-hours
150.It degC 150.It degC
151degrees Celsius 151degrees Celsius
152.It degF 152.It degF
153degrees Fahrenheit 153degrees Fahrenheit
154.It K 154.It K
155Kelvin 155Kelvin
156.It Ohms 156.It Ohms
157Ohms 157Ohms
158.It RPM 158.It RPM
159Revolutions per minute 159Revolutions per minute
160.It V 160.It V
161Volts DC 161Volts DC
162.It VAC 162.It VAC
163Volts AC 163Volts AC
164.It W 164.It W
165Watts 165Watts
166.It Wh 166.It Wh
167Watt-hours 167Watt-hours
168.El 168.El
169.Sh EXAMPLES 169.Sh EXAMPLES
170To display the 170To display the
171.Dq charge 171.Dq charge
172sensor of the driver 172sensor of the driver
173.Ar acpibat0 173.Ar acpibat0
174in one line every ten seconds: 174in one line every ten seconds:
175.Pp 175.Pp
176.Dl $ envstat -s \*qacpibat0:charge\*q -i 10 176.Dl $ envstat -s \*qacpibat0:charge\*q -i 10
177.Pp 177.Pp
178To list the drivers that are currently registered with 178To list the drivers that are currently registered with
179.Xr envsys 4 : 179.Xr envsys 4 :
180.Pp 180.Pp
181.Dl $ envstat -D 181.Dl $ envstat -D
182.Pp 182.Pp
183To display the sensors of the driver 183To display the sensors of the driver
184.Ar aibs0 : 184.Ar aibs0 :
185.Pp 185.Pp
186.Dl $ envstat -d aibs0 186.Dl $ envstat -d aibs0
187.Pp 187.Pp
188To set all properties specified in the configuration file: 188To set all properties specified in the configuration file:
189.Pp 189.Pp
190.Dl $ envstat -c /etc/envsys.conf 190.Dl $ envstat -c /etc/envsys.conf
191.Pp 191.Pp
192To remove all properties that were set previously in the configuration 192To remove all properties that were set previously in the configuration
193file: 193file:
194.Pp 194.Pp
195.Dl $ envstat -S 195.Dl $ envstat -S
196.Pp 196.Pp
197To display statistics for all sensors and ignoring sensors with 197To display statistics for all sensors and ignoring sensors with
198invalid states every second: 198invalid states every second:
199.Pp 199.Pp
200.Dl $ envstat -ITi1 200.Dl $ envstat -ITi1
201.Sh SEE ALSO 201.Sh SEE ALSO
202.Xr units 1 , 202.Xr units 1 ,
203.Xr proplib 3 , 203.Xr proplib 3 ,
204.Xr acpiacad 4 , 204.Xr acpiacad 4 ,
205.Xr acpibat 4 , 205.Xr acpibat 4 ,
206.Xr acpitz 4 , 206.Xr acpitz 4 ,
207.Xr admtemp 4 , 207.Xr admtemp 4 ,
208.Xr aibs 4 , 208.Xr aibs 4 ,
209.Xr amdtemp 4 , 209.Xr amdtemp 4 ,
210.Xr aps 4 , 210.Xr aps 4 ,
211.Xr arcmsr 4 , 211.Xr arcmsr 4 ,
212.Xr battery_pmu 4 , 212.Xr battery_pmu 4 ,
213.Xr cac 4 , 213.Xr cac 4 ,
214.Xr coretemp 4 , 214.Xr coretemp 4 ,
215.Xr dbcool 4 , 215.Xr dbcool 4 ,
216.Xr envctrl 4 , 216.Xr envctrl 4 ,
217.Xr envsys 4 , 217.Xr envsys 4 ,
218.Xr finsio 4 , 218.Xr finsio 4 ,
219.Xr ipmi 4 , 219.Xr ipmi 4 ,
220.Xr itesio 4 , 220.Xr itesio 4 ,
221.Xr lm 4 , 221.Xr lm 4 ,
222.Xr lmtemp 4 , 222.Xr lmtemp 4 ,
223.Xr mfi 4 , 223.Xr mfi 4 ,
224.Xr nsclpcsio 4 , 224.Xr nsclpcsio 4 ,
225.Xr owtemp 4 , 225.Xr owtemp 4 ,
226.Xr pic16lc 4 , 226.Xr pic16lc 4 ,
227.Xr smsc 4 , 227.Xr smsc 4 ,
228.Xr tctrl 4 , 228.Xr tctrl 4 ,
229.Xr thinkpad 4 , 229.Xr thinkpad 4 ,
230.Xr tm121temp 4 , 230.Xr tm121temp 4 ,
231.Xr ug 4 , 231.Xr ug 4 ,
232.Xr viaenv 4 , 232.Xr viaenv 4 ,
233.Xr envsys.conf 5 233.Xr envsys.conf 5
 234.Sh BUGS
 235When displaying statistics using the
 236.Fl T
 237option, the average value is an average of the minimum, maximum, and
 238current sensor values.
 239It is not an average of all current values displayed during the session.
234.Sh HISTORY 240.Sh HISTORY
235.Nm 241.Nm
236appeared in 242appeared in
237.Nx 1.5 . 243.Nx 1.5 .
238It was completely rewritten from scratch for 244It was completely rewritten from scratch for
239.Nx 5.0 . 245.Nx 5.0 .
240.Sh AUTHORS 246.Sh AUTHORS
241.An -nosplit 247.An -nosplit
242The 248The
243.Nm 249.Nm
244utility that appeared in 250utility that appeared in
245.Nx 5.0 251.Nx 5.0
246was written by 252was written by
247.An Juan Romero Pardines . 253.An Juan Romero Pardines .
248The previous version was written by 254The previous version was written by
249.An Bill Squier . 255.An Bill Squier .