envsys.conf(5) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
ENVSYS.CONF(5)            NetBSD File Formats Manual            ENVSYS.CONF(5)


NAME
envsys.conf -- configuration file for the envsys(4) framework
SYNOPSIS
envstat [-S] [-c /etc/envsys.conf]
DESCRIPTION
The envsys.conf file configures all the features provided by the envsys(4) framework. It consists of a series of device and sensor blocks. Each sensor block defines a group of properties. The file for- mat is free-form: new line markers and indentation are ignored. Comments start with a `#' sign and extend until the end of line. A 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: name = value; There is no difference between string or integer values when defining them. The value must be surrounded by double quotes if it contains whitespace. There can be multiple groups of devices and multiple groups of sensors in the configuration file. A device block consists of one or more sensor blocks and one or more global properties. It has the following syntax: device_name { prop = value; ... sensor0 { prop = value; ... } ... sensorN { prop = value; ... } } ... Device names are those shown by the `envstat -D' command; sensor blocks are named by the index position in which they are shown. For example, if we have the following output from the envstat(8) command: 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 `sensor0' corresponds to the CPU Temperature sensor and `sensor6' corre- sponds to the CPU FAN Speed sensor. There is another way that will give you the correct index sensor; the `envstat -x' command will print the raw XML property list. You only have to find the index object in the appropriate dictionary. The object will be shown as: <key>index</key> <string>sensor2</string> Invalid sensors and devices will be detected by the envstat(8) parser and will be reported as errors. The following properties are provided for sensor blocks (please note that not all properties apply to all type of sensors): critical-capacity = 10; Sets a critical capacity limit property of 10 percent in a battery sensor. Battery sensors are those that report a percentage from the envstat(8) output. It is possible to find out if the sensor accepts this property by running `envstat -x' and looking if the want-percentage object is defined as true on its dictionary. For example: <key>want-percentage</key> <true/> Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a critical-capacity event will be sent to the powerd(8) daemon (if running) and will execute the block for this event in /etc/powerd/scripts/sensor_battery. If this property is set, its value will be shown in the envstat(8) display output with a column named CritMin. warning-capacity = 20; Sets a warning capacity limit property of 20 percent in a battery sensor. Battery sensors are those that report a percentage from the envstat(8) output. It is possible to find out if the sensor accepts this property by running `envstat -x' and looking if the want-percentage object is defined as true on its dictionary. For example: <key>want-percentage</key> <true/> Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a warning-capacity event will be sent to the powerd(8) daemon (if running) and will execute the block for this event in /etc/powerd/scripts/sensor_battery. If this property is set, its value will be shown in the envstat(8) display output with a column named WarnMin. high-capacity = 90; Sets a high capacity limit property of 90 percent in a battery sensor. Battery sensors are those that report a percentage from the envstat(8) output. It is possible to find out if the sensor accepts this property by running `envstat -x' and looking if the want-percentage object is defined as true on its dictionary. For example: <key>want-percentage</key> <true/> Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a high-capacity event will be sent to the powerd(8) daemon (if running) and will execute the block for this event in /etc/powerd/scripts/sensor_battery. If this property is set, its value will be shown in the envstat(8) display output with a column named WarnMax. maximum-capacity = 99; Sets a warning capacity limit property of 99 percent in a battery sensor. Battery sensors are those that report a percentage from the envstat(8) output. It is possible to find out if the sensor accepts this property by running `envstat -x' and looking if the want-percentage object is defined as true on its dictionary. For example: <key>want-percentage</key> <true/> Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a warning-capacity event will be sent to the powerd(8) daemon (if running) and will execute the block for this event in /etc/powerd/scripts/sensor_battery. If this property is set, its value will be shown in the envstat(8) display output with a column named WarnMin. critical-max = 70C; Sets a critical maximum limit property in a sensor. Note that in this example, we are specifying the `C' keyword at the end; that means that this will only be valid for temperature sensors and that the value is specified as degrees Celsius. If degrees Fahrenheit are wanted, just use the letter F, as in: critical-max = 140F; To know sensor type, you have to look at the type object in the XML property list. Remember: the XML property list has all the information that the application uses to print the values! Other sensors that are not of 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 critical-over event will be sent to the powerd(8) daemon (if running) and will execute the block for this event in the appropriate /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). Please note that this property cannot be set in battery capacity sensors (those that have the want-percentage object in their dic- tionary). This rule applies for the `critical-min', `warning-max', and `warning-min' properties too. If this property is set, its value will be shown in the envstat(8) display output with a column named CritMax. critical-min = 1.230; Sets a critical minimum limit property in a sensor. The rules for critical-max, critical-min, warning-max, and warning-min are the same. When the limit has been reached in the sensor, a critical-under event will be sent to the powerd(8) daemon (if run- ning) and will execute the block for this event in the appropriate /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). If this property is set, its value will be shown in the envstat(8) display output with a column named CritMin. warning-max = 70C; Sets a warning maximum limit property in a sensor. The rules for critical-max, critical-min, warning-max, and warning-min are the same. When the limit has been reached in the sensor, a warning-over event will be sent to the powerd(8) daemon (if run- ning) and will execute the block for this event in the appropriate /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). Please note that this property cannot be set in battery capacity sensors (those that have the want-percentage object in their dic- tionary). This rule applies for the `warning-min' property too. If this property is set, its value will be shown in the envstat(8) display output with a column named WarnMax. warning-min = 1.230; Sets a critical minimum limit property in a sensor. The rules for critical-max, critical-min, warning-max, and warning-min are the same. When the limit has been reached in the sensor, a warning-under event will be sent to the powerd(8) daemon (if run- ning) and will execute the block for this event in the appropriate /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). If this property is set, its value will be shown in the envstat(8) display output with a column named WarnMin. description = string 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. rfact = 56000 Sets a new resistor factor property in a sensor. This property is only allowed in Voltage sensors and only if the device has enabled the appropriate flag for the mentioned sensor. The resistor fac- tor may be used to change the behavior of the value returned by the device. If a sensor supports this, the allow-rfact object appears enabled (true) in the dictionary. The following properties are available for device blocks: refresh-timeout = 10s 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, min- utes or hours. To specify the value in seconds, the s character must be appended last, if minutes is desired, a m and a h for hours. For example 10s for 10 seconds or 1h for one hour.
FILES
/etc/envsys.conf Default configuration file.
SEE ALSO
proplib(3), envsys(4), envstat(8), powerd(8)
HISTORY
The envsys.conf configuration file first appeared in NetBSD 5.0. NetBSD 9.99 February 15, 2010 NetBSD 9.99
Powered by man-cgi (2020-09-24). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.