Port OpenBSD's sysctl Hardware Sensors framework
The GSoC2007/cnst-sensors project was about porting the sysctl hw.sensors framework from OpenBSD to FreeBSD. The project was successfully completed and has been committed into FreeBSD and DragonFly BSD.
The sensors framework provides a unified interface for storing, registering and accessing information about hardware monitoring sensors. Sensor types include, but are not limited to, temperature, voltage, fan RPM, time offset and logical drive status. In the OpenBSD base system, the framework spans sensor_attach(9), sysctl(3), sysctl(8), systat(1), sensorsd(8), ntpd(8) and more than 50 drivers, ranging from I2C temperature sensors and Super I/O hardware monitors to ipmi(4) and RAID controllers. Several third-party tools are also available, for example, a plug-in for Nagios and ports/sysutils/symon.
As a part of this Google Summer of Code project, all core components of the framework were ported, including sysctl, systat and sensorsd. Some drivers for the most popular Super I/O Hardware Monitors were ported, too: it(4), supporting most contemporary ITE Tech Super I/O, and lm(4), supporting most contemporary Winbond Super I/O. Moreover, some existing FreeBSD drivers were converted to utilise the framework, for example, coretemp(4).
All source code was made available in FreeBSD's perforce repository with intuitive one-level directory structure. In addition, two scripts were provided for the purpose of linking such one-level directory structure onto existing source tree, with an option of generating a complete CVS patch for further redistribution. Moreover, some milestone patches were already generated and provided for additional convenience.
Details on the final patch and testing instructions were provided on the mailing lists on 2007-09-13:
The work has been committed into DragonFly BSD 1.11 by Hasso Tepper on 2007-10-02:
http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00017.html — it(4) and lm(4)
The work has been committed into FreeBSD 8.0-CURRENT by Alexander Leidinger on 2007-10-14 (the same week when the RELENG_7 branch was created and the long-term code freeze of CVS HEAD was over):