Juan RP has posted about
his work on ENVSYS2 -- the code is working and currently under review
before being folded into NetBSD-current. Envsys is NetBSD's framework
to monitor state of various sensors, and act upon changes in state.
Changes in envsys2 include use of proplib(3) for communication
betwen kernel and user space,
attaching and detaching of sensors and a rewrite of envstat(8) to
specify limits, descriptions and other values in /etc/envsys.conf.
Furthermore, there's an 'envsys' rc.d script now to set parameters
in batch mode. The 'envsys' rc.d script is a wrapper around the new
envstat(8) command, which Juan also rewrote from scratch.
When compared against other frameworks for monitoring sensors and
environmental state, one difference is that envsys does the polling
in the kernel instead of userland, leading to less overhead.
Furthermore, changing of descriptions, resistor factors for voltage sensors
and capacity limits for battery sensors are now available to be set via
envstat(8). Also some drivers like acpibat(8) and acpitz(8) were adapted to
envsys2 and now they send events when a critical state happens, please see
the new powerd(8) manpage for more information.
Envsys2 supports enabling monitoring in sensors directly on the
driver, without user interaction (these events cannot be disabled either).
E.g. with the sensor_drive and a driver that uses
the feature, it is possible to be notified when a drive in a hardware RAID is
not in a normal state.
For more information see
or have a look at the
For more details, there's also a
that describes the internal file format.