NetBSD/usr.sbin/envstat/envstat.8

197 lines
6.0 KiB
Groff

.\" $NetBSD: envstat.8,v 1.33 2007/10/29 01:00:52 xtraeme Exp $
.\"
.\" Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Juan Romero Pardines and Bill Squier.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 29, 2007
.Dt ENVSTAT 8
.Os
.Sh NAME
.Nm envstat
.Nd utility to handle environmental sensors
.Sh SYNOPSIS
.Nm
.Op Fl DfIlSx
.Op Fl c Ar file
.Op Fl d Ar device
.Op Fl i Ar interval
.Op Fl s Ar "sensor,..."
.Op Fl w Ar width
.Sh DESCRIPTION
.Nm
is a utility that handles various aspects of the sensors
registered with the
.Xr envsys 4
framework.
It is capable of displaying sensor values as well as
changing parameters and setting critical limits for the sensors.
.Pp
In display mode, column widths as well as displayed sensors
are fully customizable.
Critical limits or other properties can be set via the configuration file.
If critical limits were set previously, the display mode will show
the critical limits in addition to the current values.
.Pp
The following options are available:
.Bl -tag -width flag
.It Fl c
Accepts a file as argument to set properties for sensors in
devices registered with the framework. See the
.Xr envsys.conf 5
manual page for more information.
.It Fl D
Display the names of the drivers that were registered with
the
.Xr envsys 4
framework, one per line.
.It Fl d Ar device
Display only the sensors for the given
.Ar device .
This is useful when there are multiple devices registered and
you want to only see results from a specific device.
.It Fl f
Display temperature values in degrees Fahrenheit.
The default is to display temperature values in degrees Celsius.
.It Fl I
This flag skips the sensors with invalid state, these are normally
shown using the
.Qq N/A
string by default.
.It Fl i Ar interval
Repeat the display every
.Ar interval
seconds.
Note that some devices do not provide fresh values on demand.
See the individual devices manual page for meaningful values for
.Ar interval .
If not specified, or specified as 0,
.Nm
produces one round of values and exits.
.It Fl l
List the names of all supported sensors, one per line.
Use of this flag causes
.Nm
to ignore all other option flags.
.It Fl r
This flag is provided for compatibility reasons and there's no need
to use it. In the previous implementation, it was used to enable the
row mode; this mode is now the default.
.It Fl S
This flag is used to restore defaults to all devices registered with
the framework. This will remove all properties that were set in
the configuration file to the setting that the drivers use by
default.
.It Fl s Ar "sensor,..."
Restrict the display to the named sensors.
The sensor names must be supplied as a comma separated list.
Sensor names are case sensitive. Note that it's mandatory to use the
.Fl d
flag to specify the device that has the sensor.
.It Fl w Ar width
Use
.Ar width
as the column width for the output.
Each column is additionally separated by a single space.
The default is the length of the longest sensor name.
.It Fl x
Shows the property list used by the
.Xr sysmon_envsys 9
framework that contains details about all registered drivers
and sensors.
.El
.Sh EXAMPLES
To display the
.Dq acpibat0 charge
sensor on one line every ten seconds:
.Pp
.Dl $ envstat -s \*qacpibat0 charge\*q -d acpibat0 -i 10
.Pp
To list the drivers that are currently registered with
.Xr envsys 4 :
.Pp
.Dl $ envstat -D
.Pp
To display the sensors of the driver
.Ar aiboost0 :
.Pp
.Dl $ envstat -d aiboost0
.Pp
To set all properties specified in the configuration file:
.Pp
.Dl $ envstat -c /etc/envsys.conf
.Pp
To remove all properties that were previously set by the configuration
file:
.Dl $ envstat -S
.Sh SEE ALSO
.Xr proplib 3 ,
.Xr acpiacad 4 ,
.Xr acpibat 4 ,
.Xr acpitz 4 ,
.Xr adt7467c 4 ,
.Xr aiboost 4 ,
.Xr aps 4 ,
.Xr coretemp 4 ,
.Xr envsys 4 ,
.Xr ipmi 4 ,
.Xr it 4 ,
.Xr lm 4 ,
.Xr lmtemp 4 ,
.Xr mfi 4 ,
.Xr nsclpcsio 4 ,
.Xr owtemp 4 ,
.Xr sparc/tctrl 4 ,
.Xr sparc64/envctrl 4 ,
.Xr smsc 4 ,
.Xr tm121temp 4 ,
.Xr ug 4 ,
.Xr viaenv 4 ,
.Xr envsys.conf 5
.Sh HISTORY
.Nm
appeared in
.Nx 1.5 .
It was completely rewritten from scratch for
.Nx 5.0 .
.Sh AUTHORS
.An -nosplit
The
.Nm
utility that appeared in
.Nx 5.0
was written by
.An Juan Romero Pardines .
The previous version was written by
.An Bill Squier .