This
ioctl(2) is used to receive the global dictionary that is being used in the kernel by the
sysmon_envsys(9) framework. It will contain an array of dictionaries per device and one dictionary per sensor plus another special dictionary that contains the properties for a device. Each sensor dictionary will have their own characteristics and values.
The following XML property list represents a virtual device “device0” with one sensor “sensor0” and all available properties set on it, plus another sensor for the “device-properties” dictionary (which contains specific properties for a device):
<key>device0</key>
<array>
<dict>
<key>allow-rfact</key>
<true/>
<key>avg-value</key>
<integer>36400</integer>
<key>battery-capacity</key>
<string>NORMAL</string>
<key>critical-capacity</key>
<integer>21417</integer>
<key>critical-max</key>
<integer>343150000</integer>
<key>critical-min</key>
<integer>288150000</integer>
<key>cur-value</key>
<integer>406000</integer>
<key>description</key>
<string>CPU Temp</string>
<key>high-capacity</key>
<integer>21417</integer>
<string>index</string>
<string>sensor0</string>
<key>max-value</key>
<integer>3894000</integer>
<key>maximum-capacity</key>
<integer>21417</integer>
<key>min-value</key>
<integer>2894000</integer>
<key>monitoring-state-critical</key>
<true/>
<key>monitoring-state-critover</key>
<true/>
<key>monitoring-state-critunder</key>
<true/>
<key>monitoring-state-state-changed</key>
<true/>
<key>monitoring-state-warnover</key>
<true/>
<key>monitoring-state-warnunder</key>
<true/>
<key>monitoring-supported</key>
<true/>
<key>state</key>
<string>valid</string>
<key>type</key>
<string>Ampere hour</string>
<key>want-percentage</key>
<true/>
<key>warning-capacity</key>
<integer>19234</integer>
<key>warning-max</key>
<integer>323150000</integer>
<key>warning-min</key>
<integer>298150000</integer>
</dict>
<dict>
<key>device-properties</key>
<dict>
<key>refresh-timeout</key>
<integer>0xa</integer>
</dict>
</dict>
</array>
Let's explain some more about those objects:
allow-rfact
Set to true means that the sensor is able to change the resistor factor, only used in Voltage sensors.
avg-value
Current average value in the sensor.
battery-capacity
Current capacity state for a battery capacity sensor.
critical-capacity
Critical capacity set previously by the
ENVSYS_SETDICTIONARY ioctl(2). Only available on sensors with the
want-percentage object enabled.
critical-max
Critical max limit set previously by the
ENVSYS_SETDICTIONARY ioctl(2).
critical-min
Critical min limit set previously by the
ENVSYS_SETDICTIONARY ioctl(2).
cur-value
Current value in the sensor.
description
Description of the sensor.
high-capacity
High capacity set previously by the
ENVSYS_SETDICTIONARY ioctl(2). Only available on sensors with the
want-percentage object enabled. Used to monitor possible over-charging of batteries.
index
Index position of the sensor.
max-value
Current max value in the sensor.
maximum-capacity
Maximum capacity set previously by the
ENVSYS_SETDICTIONARY ioctl(2). Only available on sensors with the
want-percentage object enabled. Used to monitor possible over-charging of batteries.
min-value
Current min value in the sensor.
monitoring-state-critical
If true, the driver has enabled the flag to monitor a critical state.
monitoring-state-hw-range-limits
If true, the driver has enabled the flag to monitor warning or critical limits.
monitoring-state-state-changed
If true, the driver has enabled the flag to monitor for state changes in a drive or Battery state sensor.
monitoring-supported
If true, critical/warning capacity/max/min limits may be set by the
ENVSYS_SETDICTIONARY ioctl(2).
state
Current state in the sensor.
type
Type of unit in the sensor.
want-percentage
If true, max-value and cur-value are valid and a percentage may be computed from them.
warning-capacity
Warning capacity set previously by the
ENVSYS_SETDICTIONARY ioctl(2). Only available on sensors with the
want-percentage object enabled.
warning-max
Warning max limit set previously by the
ENVSYS_SETDICTIONARY ioctl(2).
warning-min
Warning min limit set previously by the
ENVSYS_SETDICTIONARY ioctl(2).