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@
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.
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.
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.