head 1.15; access; symbols netbsd-9-4-RELEASE:1.15 netbsd-10-0-RELEASE:1.15 netbsd-10-0-RC6:1.15 netbsd-10-0-RC5:1.15 netbsd-10-0-RC4:1.15 netbsd-10-0-RC3:1.15 netbsd-10-0-RC2:1.15 netbsd-10-0-RC1:1.15 netbsd-10:1.15.0.16 netbsd-10-base:1.15 netbsd-9-3-RELEASE:1.15 cjep_sun2x-base1:1.15 cjep_sun2x:1.15.0.14 cjep_sun2x-base:1.15 cjep_staticlib_x-base1:1.15 netbsd-9-2-RELEASE:1.15 cjep_staticlib_x:1.15.0.12 cjep_staticlib_x-base:1.15 netbsd-9-1-RELEASE:1.15 phil-wifi-20200421:1.15 phil-wifi-20200411:1.15 is-mlppp:1.15.0.10 is-mlppp-base:1.15 phil-wifi-20200406:1.15 netbsd-8-2-RELEASE:1.14 netbsd-9-0-RELEASE:1.15 netbsd-9-0-RC2:1.15 netbsd-9-0-RC1:1.15 phil-wifi-20191119:1.15 netbsd-9:1.15.0.8 netbsd-9-base:1.15 phil-wifi-20190609:1.15 netbsd-8-1-RELEASE:1.14 netbsd-8-1-RC1:1.14 pgoyette-compat-merge-20190127:1.15 pgoyette-compat-20190127:1.15 pgoyette-compat-20190118:1.15 pgoyette-compat-1226:1.15 pgoyette-compat-1126:1.15 pgoyette-compat-1020:1.15 pgoyette-compat-0930:1.15 pgoyette-compat-0906:1.15 netbsd-7-2-RELEASE:1.14 pgoyette-compat-0728:1.15 netbsd-8-0-RELEASE:1.14 phil-wifi:1.15.0.6 phil-wifi-base:1.15 pgoyette-compat-0625:1.15 netbsd-8-0-RC2:1.14 pgoyette-compat-0521:1.15 pgoyette-compat-0502:1.15 pgoyette-compat-0422:1.15 netbsd-8-0-RC1:1.14 pgoyette-compat-0415:1.15 pgoyette-compat-0407:1.15 pgoyette-compat-0330:1.15 pgoyette-compat-0322:1.15 pgoyette-compat-0315:1.15 netbsd-7-1-2-RELEASE:1.14 pgoyette-compat:1.15.0.4 pgoyette-compat-base:1.15 netbsd-7-1-1-RELEASE:1.14 matt-nb8-mediatek:1.14.0.34 matt-nb8-mediatek-base:1.14 perseant-stdc-iso10646:1.15.0.2 perseant-stdc-iso10646-base:1.15 netbsd-8:1.14.0.32 netbsd-8-base:1.14 prg-localcount2-base3:1.14 prg-localcount2-base2:1.14 prg-localcount2-base1:1.14 prg-localcount2:1.14.0.30 prg-localcount2-base:1.14 pgoyette-localcount-20170426:1.14 bouyer-socketcan-base1:1.14 pgoyette-localcount-20170320:1.14 netbsd-7-1:1.14.0.28 netbsd-7-1-RELEASE:1.14 netbsd-7-1-RC2:1.14 netbsd-7-nhusb-base-20170116:1.14 bouyer-socketcan:1.14.0.26 bouyer-socketcan-base:1.14 pgoyette-localcount-20170107:1.14 netbsd-7-1-RC1:1.14 pgoyette-localcount-20161104:1.14 netbsd-7-0-2-RELEASE:1.14 localcount-20160914:1.14 netbsd-7-nhusb:1.14.0.24 netbsd-7-nhusb-base:1.14 pgoyette-localcount-20160806:1.14 pgoyette-localcount-20160726:1.14 pgoyette-localcount:1.14.0.22 pgoyette-localcount-base:1.14 netbsd-7-0-1-RELEASE:1.14 netbsd-7-0:1.14.0.20 netbsd-7-0-RELEASE:1.14 netbsd-7-0-RC3:1.14 netbsd-7-0-RC2:1.14 netbsd-7-0-RC1:1.14 netbsd-5-2-3-RELEASE:1.11 netbsd-5-1-5-RELEASE:1.11 netbsd-6-0-6-RELEASE:1.14 netbsd-6-1-5-RELEASE:1.14 netbsd-7:1.14.0.18 netbsd-7-base:1.14 yamt-pagecache-base9:1.14 yamt-pagecache-tag8:1.13.6.1 netbsd-6-1-4-RELEASE:1.14 netbsd-6-0-5-RELEASE:1.14 tls-earlyentropy:1.14.0.16 tls-earlyentropy-base:1.14 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.14 riastradh-drm2-base3:1.14 netbsd-6-1-3-RELEASE:1.14 netbsd-6-0-4-RELEASE:1.14 netbsd-5-2-2-RELEASE:1.11 netbsd-5-1-4-RELEASE:1.11 netbsd-6-1-2-RELEASE:1.14 netbsd-6-0-3-RELEASE:1.14 netbsd-5-2-1-RELEASE:1.11 netbsd-5-1-3-RELEASE:1.11 netbsd-6-1-1-RELEASE:1.14 riastradh-drm2-base2:1.14 riastradh-drm2-base1:1.14 riastradh-drm2:1.14.0.10 riastradh-drm2-base:1.14 netbsd-6-1:1.14.0.14 netbsd-6-0-2-RELEASE:1.14 netbsd-6-1-RELEASE:1.14 netbsd-6-1-RC4:1.14 netbsd-6-1-RC3:1.14 agc-symver:1.14.0.12 agc-symver-base:1.14 netbsd-6-1-RC2:1.14 netbsd-6-1-RC1:1.14 yamt-pagecache-base8:1.14 netbsd-5-2:1.11.0.2 netbsd-6-0-1-RELEASE:1.14 yamt-pagecache-base7:1.14 netbsd-5-2-RELEASE:1.11 netbsd-5-2-RC1:1.11 matt-nb6-plus-nbase:1.14 yamt-pagecache-base6:1.14 netbsd-6-0:1.14.0.8 netbsd-6-0-RELEASE:1.14 netbsd-6-0-RC2:1.14 tls-maxphys:1.14.0.6 tls-maxphys-base:1.14 matt-nb6-plus:1.14.0.4 matt-nb6-plus-base:1.14 netbsd-6-0-RC1:1.14 yamt-pagecache-base5:1.14 yamt-pagecache-base4:1.14 netbsd-6:1.14.0.2 netbsd-6-base:1.14 netbsd-5-1-2-RELEASE:1.11 netbsd-5-1-1-RELEASE:1.11 yamt-pagecache-base3:1.13 yamt-pagecache-base2:1.13 yamt-pagecache:1.13.0.6 yamt-pagecache-base:1.13 cherry-xenmp:1.13.0.4 cherry-xenmp-base:1.13 bouyer-quota2-nbase:1.13 bouyer-quota2:1.13.0.2 bouyer-quota2-base:1.13 matt-mips64-premerge-20101231:1.13 matt-nb5-mips64-premerge-20101231:1.11 matt-nb5-pq3:1.11.0.14 matt-nb5-pq3-base:1.11 netbsd-5-1:1.11.0.12 netbsd-5-1-RELEASE:1.11 netbsd-5-1-RC4:1.11 matt-nb5-mips64-k15:1.11 netbsd-5-1-RC3:1.11 netbsd-5-1-RC2:1.11 netbsd-5-1-RC1:1.11 netbsd-5-0-2-RELEASE:1.11 matt-nb5-mips64-premerge-20091211:1.11 matt-premerge-20091211:1.12 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.11 matt-nb4-mips64-k7-u2a-k9b:1.11 matt-nb5-mips64-u1-k1-k5:1.11 matt-nb5-mips64:1.11.0.10 netbsd-5-0-1-RELEASE:1.11 jym-xensuspend-nbase:1.11 netbsd-5-0:1.11.0.8 netbsd-5-0-RELEASE:1.11 netbsd-5-0-RC4:1.11 netbsd-5-0-RC3:1.11 netbsd-5-0-RC2:1.11 jym-xensuspend:1.11.0.6 jym-xensuspend-base:1.11 netbsd-5-0-RC1:1.11 netbsd-5:1.11.0.4 netbsd-5-base:1.11 matt-mips64-base2:1.11 wrstuden-revivesa-base-3:1.10 wrstuden-revivesa-base-2:1.9 wrstuden-revivesa-base-1:1.7 yamt-pf42-base4:1.7 yamt-pf42-base3:1.7 hpcarm-cleanup-nbase:1.7 yamt-pf42-baseX:1.6 yamt-pf42-base2:1.7 wrstuden-revivesa:1.7.0.2 wrstuden-revivesa-base:1.7 yamt-pf42:1.6.0.6 yamt-pf42-base:1.6 keiichi-mipv6-nbase:1.6 keiichi-mipv6:1.6.0.4 keiichi-mipv6-base:1.6 matt-armv6-nbase:1.6 matt-armv6-prevmlocking:1.5.2.2 cube-autoconf:1.6.0.2 cube-autoconf-base:1.6 matt-armv6-base:1.6 matt-armv6:1.5.0.2 hpcarm-cleanup-base:1.6; locks; strict; comment @.\" @; 1.15 date 2017.07.03.21.35.30; author wiz; state Exp; branches; next 1.14; commitid GDcvPnLuEcjBtPXz; 1.14 date 2012.02.09.18.10.26; author riz; state Exp; branches; next 1.13; 1.13 date 2010.02.15.23.04.11; author pgoyette; state Exp; branches 1.13.6.1; next 1.12; 1.12 date 2009.05.13.23.03.54; author wiz; state Exp; branches; next 1.11; 1.11 date 2008.09.23.21.50.41; author reed; state Exp; branches; next 1.10; 1.10 date 2008.09.10.19.41.40; author reed; state Exp; branches; next 1.9; 1.9 date 2008.08.31.09.40.00; author wiz; state Exp; branches; next 1.8; 1.8 date 2008.08.22.11.27.50; author pgoyette; state Exp; branches; next 1.7; 1.7 date 2008.04.26.02.56.57; author xtraeme; state Exp; branches 1.7.2.1; next 1.6; 1.6 date 2007.11.16.08.01.38; author xtraeme; state Exp; branches 1.6.6.1; next 1.5; 1.5 date 2007.10.25.23.14.41; author wiz; state Exp; branches 1.5.2.1; next 1.4; 1.4 date 2007.10.09.08.00.46; author xtraeme; state Exp; branches; next 1.3; 1.3 date 2007.10.07.15.37.30; author xtraeme; state Exp; branches; next 1.2; 1.2 date 2007.10.07.15.23.41; author xtraeme; state Exp; branches; next 1.1; 1.1 date 2007.10.07.04.16.48; author xtraeme; state Exp; branches; next ; 1.13.6.1 date 2012.04.17.00.09.46; author yamt; state Exp; branches; next ; 1.7.2.1 date 2008.09.18.04.30.04; author wrstuden; state Exp; branches; next 1.7.2.2; 1.7.2.2 date 2008.09.24.16.38.59; author wrstuden; state Exp; branches; next ; 1.6.6.1 date 2008.05.18.12.36.15; author yamt; state Exp; branches; next ; 1.5.2.1 date 2007.10.25.23.14.41; author matt; state dead; branches; next 1.5.2.2; 1.5.2.2 date 2007.11.06.23.36.26; author matt; state Exp; branches; next 1.5.2.3; 1.5.2.3 date 2008.01.09.02.01.59; author matt; state Exp; branches; next ; desc @@ 1.15 log @Remove workaround for ancient HTML generation code. @ text @.\" $NetBSD: envsys.conf.5,v 1.14 2012/02/09 18:10:26 riz Exp $ .\" .\" - .\" Copyright (c) 2007, 2008 Juan Romero Pardines. .\" All rights reserved. .\" .\" 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. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 February 15, 2010 .Dt ENVSYS.CONF 5 .Os .Sh NAME .Nm envsys.conf .Nd configuration file for the .Xr envsys 4 framework .Sh SYNOPSIS .Nm envstat .Op Fl S .Op Fl c Ar /etc/envsys.conf .Sh DESCRIPTION The .Nm file configures all the features provided by the .Xr envsys 4 framework. It consists of a series of device and sensor blocks. Each sensor block defines a group of .Em properties . The file format is free-form: new line markers and indentation are ignored. Comments start with a .Sq # sign and extend until the end of line. .Pp A .Em property is like a variable assignment. It has a name, which goes to the left of the equal sign, and a value, which goes to the right. The assignment ends with a semicolon. It looks like: .Pp .Dl name = value; .Pp There is no difference between string or integer values when defining them. The value must be surrounded by double quotes if it contains whitespace. .Pp There can be multiple groups of devices and multiple groups of sensors in the configuration file. .Pp A device block consists of one or more sensor blocks and one or more global properties. It has the following syntax: .Bd -literal -offset indent device_name { prop = value; ... sensor0 { prop = value; ... } ... sensorN { prop = value; ... } } ... .Ed .Pp Device names are those shown by the .Ql envstat -D command; sensor blocks are named by the index position in which they are shown. .Pp For example, if we have the following output from the .Xr envstat 8 command: .Bd -literal -offset indent CPU Temperature: 32.000 degC MB Temperature: 37.000 degC Vcore Voltage: 1.232 V +3.3 Voltage: 3.248 V +5 Voltage: 4.992 V +12 Voltage: 11.985 V CPU FAN Speed: 1250 RPM .Ed .Pp .Ql sensor0 corresponds to the .Em CPU Temperature sensor and .Ql sensor6 corresponds to the .Em CPU FAN Speed sensor. .Pp There is another way that will give you the correct index sensor; the .Ql envstat -x command will print the raw XML property list. You only have to find the .Em index object in the appropriate dictionary. The object will be shown as: .Bd -literal -offset indent index sensor2 .Ed .Pp Invalid sensors and devices will be detected by the .Xr envstat 8 parser and will be reported as errors. .Pp The following properties are provided for sensor blocks (please note that not all properties apply to all type of sensors): .Bl -tag -width ident .It critical-capacity = 10; .Pp Sets a critical capacity limit property of 10 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent want-percentage .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em critical-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritMin . .It warning-capacity = 20; .Pp Sets a warning capacity limit property of 20 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent want-percentage .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em warning-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMin . .It high-capacity = 90; .Pp Sets a high capacity limit property of 90 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent want-percentage .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em high-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMax . .It maximum-capacity = 99; .Pp Sets a warning capacity limit property of 99 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent want-percentage .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em warning-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMin . .It critical-max = 70C; .Pp Sets a critical maximum limit property in a sensor. Note that in this example, we are specifying the .Ql C keyword at the end; that means that this will only be valid for .Em temperature sensors and that the value is specified as degrees .Em Celsius . If degrees Fahrenheit are wanted, just use the letter .Em F , as in: .Bd -literal -offset indent critical-max = 140F; .Ed .Pp To know sensor type, you have to look at the .Em type object in the XML property list. Remember: the XML property list has all the information that the application uses to print the values! .Pp Other sensors that are not of .Em temperature type must not include the final character for the unit. A dot is allowed in the value, if it corresponds to the range that the sensor is reporting. When the limit has been reached in the sensor, a .Em critical-over event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp Please note that this property cannot be set in battery capacity sensors (those that have the .Em want-percentage object in their dictionary). This rule applies for the .Ql critical-min , .Ql warning-max , and .Ql warning-min properties too. .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritMax . .It critical-min = 1.230; .Pp Sets a critical minimum limit property in a sensor. The rules for .Em critical-max , .Em critical-min , .Em warning-max , and .Em warning-min are the same. When the limit has been reached in the sensor, a .Em critical-under event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritMin . .It warning-max = 70C; .Pp Sets a warning maximum limit property in a sensor. The rules for .Em critical-max , .Em critical-min , .Em warning-max , and .Em warning-min are the same. When the limit has been reached in the sensor, a .Em warning-over event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp Please note that this property cannot be set in battery capacity sensors (those that have the .Em want-percentage object in their dictionary). This rule applies for the .Ql warning-min property too. .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMax . .It warning-min = 1.230; .Pp Sets a critical minimum limit property in a sensor. The rules for .Em critical-max , .Em critical-min , .Em warning-max , and .Em warning-min are the same. When the limit has been reached in the sensor, a .Em warning-under event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMin . .It description = string .Pp Sets a new description in a sensor. You can set this property in all sensors, except that you won't be able to set a description that is currently used for the specified device. .It rfact = 56000 .Pp Sets a new resistor factor property in a sensor. This property is only allowed in .Em Voltage sensors and .Em only if the device has enabled the appropriate flag for the mentioned sensor. The resistor factor may be used to change the behavior of the value returned by the device. .Pp If a sensor supports this, the .Em allow-rfact object appears enabled (true) in the dictionary. .El .Pp The following properties are available for device blocks: .Bl -tag -width ident .It refresh-timeout = 10s .Pp This property sets the refresh timeout value in a device, and will be used to refresh data and check for critical conditions any time the timeout is met. The value may be specified in seconds, minutes or hours. To specify the value in seconds, the .Em s character must be appended last, if minutes is desired, a .Em m and a .Em h for hours. For example .Em 10s for 10 seconds or .Em 1h for one hour. .El .Sh FILES .Bl -tag -width /etc/envsys.conf -compact .It Pa /etc/envsys.conf Default configuration file. .El .Sh SEE ALSO .Xr proplib 3 , .Xr envsys 4 , .Xr envstat 8 , .Xr powerd 8 .Sh HISTORY The .Nm configuration file first appeared in .Nx 5.0 . @ 1.14 log @Various English usage, spelling and markup fixes for envstat(4)-related things, from Snader_LB. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.13 2010/02/15 23:04:11 pgoyette Exp $ d126 2 a127 2 \*[Lt]key\*[Gt]index\*[Lt]/key\*[Gt] \*[Lt]string\*[Gt]sensor2\*[Lt]/string\*[Gt] d155 2 a156 2 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] d189 2 a190 2 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] d223 2 a224 2 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] d257 2 a258 2 \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] @ 1.13 log @Document the new {high, maximum}-capacity keywords, and some general clean-up. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.12 2009/05/13 23:03:54 wiz Exp $ d33 3 a35 1 .Nd Configuration file for the envsys framework d414 1 a414 1 if the driver has enabled the appropriate flag for the mentioned d417 1 a417 1 of the value returned by the driver. d428 1 a428 1 This property sets the refresh timeout value in a driver, and will be used d452 1 @ 1.13.6.1 log @sync with head @ text @d1 1 a1 1 .\" $NetBSD$ d33 1 a33 3 .Nd configuration file for the .Xr envsys 4 framework d412 1 a412 1 if the device has enabled the appropriate flag for the mentioned d415 1 a415 1 of the value returned by the device. d426 1 a426 1 This property sets the refresh timeout value in a device, and will be used a449 1 .Xr envsys 4 , @ 1.12 log @New sentence, new line. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.11 2008/09/23 21:50:41 reed Exp $ d28 1 a28 1 .Dd April 26, 2008 d159 1 a159 1 .Em user-capacity d168 1 a168 1 .Ar CritCap . d193 69 a261 1 .Em user-warn-capacity d270 1 a270 4 .Ar WarnCap when the .Fl -W option is specified. d280 1 a280 1 If degrees Fahrenheit are wanted, just change use the letter d282 1 a282 1 like: d307 1 a307 1 Please note that this property cannot be set in battery sensors d321 1 a321 4 .Ar CritMax unless the .Fl W option is specified. d364 1 a364 1 Please note that this property cannot be set in battery sensors d375 1 a375 4 .Ar WarnMax if the .Fl W flag is specified. d398 1 a398 4 .Ar WarnMin if the .Fl W option is specified. @ 1.11 log @Fix a typo/mispelling. Spell out minimum and maximum. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.10 2008/09/10 19:41:40 reed Exp $ d70 2 a71 1 properties. It has the following syntax: d372 3 a374 2 is met. The value may be specified in seconds, minutes or hours. To specify the value in seconds, the d380 2 a381 1 for hours. For example @ 1.10 log @Remove extra space. Spell out "maximum" and "minimum". @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.9 2008/08/31 09:40:00 wiz Exp $ d250 1 a250 1 propertes too. d284 1 a284 1 Sets a warning max limit property in a sensor. d318 1 a318 1 Sets a critical min limit property in a sensor. @ 1.9 log @Drop trailing whitespace. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.8 2008/08/22 11:27:50 pgoyette Exp $ d44 1 a44 1 It consists of a series of device and sensor blocks . d207 1 a207 1 Sets a critical max limit property in a sensor. d261 1 a261 1 Sets a critical min limit property in a sensor. @ 1.8 log @1. provide for warning-min and warning-max alarm levels in addition to critical-min and critical-max; also, a battery warning-capacity is added in addition to a critical-capacity. 2. usr.sbin/envstat is modified to introduce a -W command line switch to display the warning-* values instead of the critical-* values, and envstat(8) and envsys.conf(5) man pages are updated appropriately. 3. Treat user-defined limits as a single continuum and generate a single event regardless of how many boundaries a change in sensor value crosses; ditto for driver-defined limits. Fixes my PR/39021 Fixes my PR/39022 OK'd by christos@@ bouyer@@ cube@@ @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.7 2008/04/26 02:56:57 xtraeme Exp $ d312 1 a312 1 .Ar WarnMax d338 1 a338 1 .Ar WarnMin @ 1.7 log @* Improve default display output by adding a header that will match current value as well as critical limits set and sensor unit. * Add a new flag: -T. When it's enabled statistics will be created for the sensors. Max, min and average statistics as well as sensor unit will be displayed. Must be used with an interval. You can see the new code in action here: http://www.netbsd.org/~xtraeme/envstat_stats.txt Thanks to jmcneill@@ for comments and ideas. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.6 2007/11/16 08:01:38 xtraeme Exp $ d168 37 d246 5 a250 2 .Ql critical-min property too. d255 4 a258 1 .Ar CritMax . d263 3 a265 1 .Em critical-max d267 1 a267 1 .Em critical-min d282 60 @ 1.7.2.1 log @Sync with wrstuden-revivesa-base-2. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.7 2008/04/26 02:56:57 xtraeme Exp $ a167 37 .It warning-capacity = 20; .Pp Sets a warning capacity limit property of 20 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em user-warn-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnCap when the .Fl -W option is specified. d209 2 a210 5 .Ql critical-min , .Ql warning-max , and .Ql warning-min propertes too. d215 1 a215 4 .Ar CritMax unless the .Fl W option is specified. d220 1 a220 3 .Em critical-max , .Em critical-min , .Em warning-max , d222 1 a222 1 .Em warning-min a236 60 .It warning-max = 70C; .Pp Sets a warning max limit property in a sensor. The rules for .Em critical-max , .Em critical-min , .Em warning-max , and .Em warning-min are the same. When the limit has been reached in the sensor, a .Em warning-over event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp Please note that this property cannot be set in battery sensors (those that have the .Em want-percentage object in their dictionary). This rule applies for the .Ql warning-min property too. .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMax if the .Fl W flag is specified. .It warning-min = 1.230; .Pp Sets a critical min limit property in a sensor. The rules for .Em critical-max , .Em critical-min , .Em warning-max , and .Em warning-min are the same. When the limit has been reached in the sensor, a .Em warning-under event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar WarnMin if the .Fl W option is specified. @ 1.7.2.2 log @Merge in changes between wrstuden-revivesa-base-2 and wrstuden-revivesa-base-3. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.7.2.1 2008/09/18 04:30:04 wrstuden Exp $ d44 1 a44 1 It consists of a series of device and sensor blocks. d207 1 a207 1 Sets a critical maximum limit property in a sensor. d261 1 a261 1 Sets a critical minimum limit property in a sensor. @ 1.6 log @Implement the 'refresh-timeout' property in device blocks for the configuration files. This sets the timeout value that will be used to check for critical limits. The value can be viewed by the 'envstat -D' command. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.5 2007/10/25 23:14:41 wiz Exp $ d4 1 a4 1 .\" Copyright (c) 2007 Juan Romero Pardines. d28 1 a28 1 .Dd November 13, 2007 d163 5 d211 5 d232 5 @ 1.6.6.1 log @sync with head. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.6 2007/11/16 08:01:38 xtraeme Exp $ d4 1 a4 1 .\" Copyright (c) 2007, 2008 Juan Romero Pardines. d28 1 a28 1 .Dd April 26, 2008 a162 5 .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritCap . a205 5 .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritMax . a221 5 .Pp If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named .Ar CritMin . @ 1.5 log @Various improvements: typo fixes, wording, formatting. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.4 2007/10/09 08:00:46 xtraeme Exp $ d28 1 a28 1 .Dd October 7, 2007 d69 2 a70 2 A device block consists of one or more sensor blocks. It has the following syntax: d73 2 d131 2 a132 2 The following properties are provided (please note that not all properties apply to all type of sensors): d228 1 a228 1 .It rfact = 56000; d244 20 @ 1.5.2.1 log @file envsys.conf.5 was added on branch matt-armv6 on 2007-11-06 23:36:26 +0000 @ text @d1 255 @ 1.5.2.2 log @sync with HEAD @ text @a0 255 .\" $NetBSD: envsys.conf.5,v 1.5 2007/10/25 23:14:41 wiz Exp $ .\" .\" - .\" Copyright (c) 2007 Juan Romero Pardines. .\" All rights reserved. .\" .\" 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. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 7, 2007 .Dt ENVSYS.CONF 5 .Os .Sh NAME .Nm envsys.conf .Nd Configuration file for the envsys framework .Sh SYNOPSIS .Nm envstat .Op Fl S .Op Fl c Ar /etc/envsys.conf .Sh DESCRIPTION The .Nm file configures all the features provided by the .Xr envsys 4 framework. It consists of a series of device and sensor blocks . Each sensor block defines a group of .Em properties . The file format is free-form: new line markers and indentation are ignored. Comments start with a .Sq # sign and extend until the end of line. .Pp A .Em property is like a variable assignment. It has a name, which goes to the left of the equal sign, and a value, which goes to the right. The assignment ends with a semicolon. It looks like: .Pp .Dl name = value; .Pp There is no difference between string or integer values when defining them. The value must be surrounded by double quotes if it contains whitespace. .Pp There can be multiple groups of devices and multiple groups of sensors in the configuration file. .Pp A device block consists of one or more sensor blocks. It has the following syntax: .Bd -literal -offset indent device_name { sensor0 { prop = value; ... } ... sensorN { prop = value; ... } } ... .Ed .Pp Device names are those shown by the .Ql envstat -D command; sensor blocks are named by the index position in which they are shown. .Pp For example, if we have the following output from the .Xr envstat 8 command: .Bd -literal -offset indent CPU Temperature: 32.000 degC MB Temperature: 37.000 degC Vcore Voltage: 1.232 V +3.3 Voltage: 3.248 V +5 Voltage: 4.992 V +12 Voltage: 11.985 V CPU FAN Speed: 1250 RPM .Ed .Pp .Ql sensor0 corresponds to the .Em CPU Temperature sensor and .Ql sensor6 corresponds to the .Em CPU FAN Speed sensor. .Pp There is another way that will give you the correct index sensor; the .Ql envstat -x command will print the raw XML property list. You only have to find the .Em index object in the appropriate dictionary. The object will be shown as: .Bd -literal -offset indent \*[Lt]key\*[Gt]index\*[Lt]/key\*[Gt] \*[Lt]string\*[Gt]sensor2\*[Lt]/string\*[Gt] .Ed .Pp Invalid sensors and devices will be detected by the .Xr envstat 8 parser and will be reported as errors. .Pp The following properties are provided (please note that not all properties apply to all type of sensors): .Bl -tag -width ident .It critical-capacity = 10; .Pp Sets a critical capacity limit property of 10 percent in a battery sensor. Battery sensors are those that report a percentage from the .Xr envstat 8 output. .Pp It is possible to find out if the sensor accepts this property by running .Ql envstat -x and looking if the .Em want-percentage object is defined as .Em true on its dictionary. For example: .Bd -literal -offset indent \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] \*[Lt]true/\*[Gt] .Ed .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a .Em user-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in .Pa /etc/powerd/scripts/sensor_battery . .It critical-max = 70C; .Pp Sets a critical max limit property in a sensor. Note that in this example, we are specifying the .Ql C keyword at the end; that means that this will only be valid for .Em temperature sensors and that the value is specified as degrees .Em Celsius . If degrees Fahrenheit are wanted, just change use the letter .Em F , like: .Bd -literal -offset indent critical-max = 140F; .Ed .Pp To know sensor type, you have to look at the .Em type object in the XML property list. Remember: the XML property list has all the information that the application uses to print the values! .Pp Other sensors that are not of .Em temperature type must not include the final character for the unit. A dot is allowed in the value, if it corresponds to the range that the sensor is reporting. When the limit has been reached in the sensor, a .Em critical-over event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp Please note that this property cannot be set in battery sensors (those that have the .Em want-percentage object in their dictionary). This rule applies for the .Ql critical-min property too. .It critical-min = 1.230; .Pp Sets a critical min limit property in a sensor. The rules for .Em critical-max and .Em critical-min are the same. When the limit has been reached in the sensor, a .Em critical-under event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in the appropriate .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .It description = string .Pp Sets a new description in a sensor. You can set this property in all sensors, except that you won't be able to set a description that is currently used for the specified device. .It rfact = 56000; .Pp Sets a new resistor factor property in a sensor. This property is only allowed in .Em Voltage sensors and .Em only if the driver has enabled the appropriate flag for the mentioned sensor. The resistor factor may be used to change the behavior of the value returned by the driver. .Pp If a sensor supports this, the .Em allow-rfact object appears enabled (true) in the dictionary. .El .Sh FILES .Bl -tag -width /etc/envsys.conf -compact .It Pa /etc/envsys.conf Default configuration file. .El .Sh SEE ALSO .Xr proplib 3 , .Xr envstat 8 , .Xr powerd 8 .Sh HISTORY The .Nm configuration file first appeared in .Nx 5.0 . @ 1.5.2.3 log @sync with HEAD @ text @d1 1 a1 1 .\" $NetBSD$ d28 1 a28 1 .Dd November 13, 2007 d69 2 a70 2 A device block consists of one or more sensor blocks and one or more global properties. It has the following syntax: a72 2 prop = value; ... d129 2 a130 2 The following properties are provided for sensor blocks (please note that not all properties apply to all type of sensors): d226 1 a226 1 .It rfact = 56000 a241 20 .Pp The following properties are available for device blocks: .Bl -tag -width ident .It refresh-timeout = 10s .Pp This property sets the refresh timeout value in a driver, and will be used to refresh data and check for critical conditions any time the timeout is met. The value may be specified in seconds, minutes or hours. To specify the value in seconds, the .Em s character must be appended last, if minutes is desired, a .Em m and a .Em h for hours. For example .Em 10s for 10 seconds or .Em 1h for one hour. .El @ 1.4 log @- Do not allow a 'critical-{max,min}' property in battery sensors (those that contain the 'want-percentage' object on its dictionary), the 'critical-capacity' prop must be used instead. - When setting a 'critical-{max,min}' property check if the value is higher than the 'max-value' or lower than the 'min-value' on its dictionary, raise an error if it's true. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.3 2007/10/07 15:37:30 xtraeme Exp $ d27 1 a27 1 .\" d35 2 a36 1 envstat a37 1 .Op Fl S d42 1 a42 1 .Xr envsys d44 2 a45 7 It is composed by series of .Em device and .Em sensor blocks . Each .Em sensor block defines a group of d47 3 a49 3 The file format is free-form: new line markers are ignored as well as indentation. Comments start with the d69 1 a69 1 A device block consists of one or multiple sensor blocks. d88 1 a88 1 command; Sensor blocks are named by its index position in which they are shown. d115 2 a116 2 command will print the raw XML property list. You only have to find the d118 2 a119 1 object in the appropiate dictionary. The object will be shown as: d121 2 a122 2 index sensor2 d135 1 a135 2 .Em percent in a .Em battery sensor . d140 1 a140 1 It is also possible to know if the sensor accepts this property d147 2 a148 1 on its dictionary. For example: d150 2 a151 2 want-percentage d154 2 a155 2 Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a d159 1 a159 1 daemon (if running) and will execute the block for this event in the d163 2 a164 2 Sets a critical max limit property in a sensor. Note that in this example, we are specifying the d170 1 a170 1 If degrees Fahrenheit is wanted, just change it to a d177 1 a177 1 To know the type of sensor, you have to look at the d179 3 a181 2 object in the XML property list. Remember: the XML property list has all the information that the application uses to print the values!. d185 4 a188 4 type, must not specify the final character for degrees. Also a dot is allowed in the value, if that corresponds to the range that the sensor is reporting. When the limit has been reached in the sensor, a d193 1 a193 1 the appropiate d195 1 a195 1 script (depending of sensor's type). d200 2 a201 1 object on its dictionary), this same rule must be applied for the d203 1 a203 1 property. d206 2 a207 1 Sets a critical min limit property in a sensor. The rules for d211 2 a212 1 are the same. When the limit has been reached in the sensor, a d217 1 a217 1 the appropiate d219 1 a219 1 script (depending of sensor's type). d222 2 a223 1 Sets a new description in a sensor. You can set this property in d228 2 a229 2 Sets a new resistor factor property in a sensor. This property is only allowed in d233 3 a235 2 if the driver has enabled the appropiate flag for the mentioned sensor. The resistor factor may be used to change the behavior d238 1 a238 1 To know if the sensor supports this, the d240 1 a240 1 object must appear enabled (true) in the dictionary. @ 1.3 log @Provide a more complete syntax example. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.2 2007/10/07 15:23:41 xtraeme Exp $ d199 7 @ 1.2 log @Explain some more about the events that will send to powerd(8) (if running) in the critical-{capacity,max,min} properties when the limit has been reached. @ text @d1 1 a1 1 .\" $NetBSD: envsys.conf.5,v 1.1 2007/10/07 04:16:48 xtraeme Exp $ d77 10 a86 3 device_name { sensor0 { ... a88 4 sensorN { ... } } @ 1.1 log @New configuration file format for the envsys framework: foo0 { # # CPU Temperature # sensor0 { critical-max = 70C; critical-min = 20C; } ... } ... Removed the -m flag that was previously used to set properties for sensors. Now the -c flag will process all properties specified in the file (accepted as argument). To remove all properties that were set, the new -S flag can be used. This will restore default values for all devices. @ text @d1 1 a1 1 .\" $NetBSD$ d155 7 a161 1 Only a value between 0 and 100 is allowed. d187 9 a195 1 sensor is reporting. d202 8 a209 1 are the same. @