A major contributor to this article appears to have a close connection with its subject. (March 2019) (Learn how and when to remove this template message)
|Original author(s)||Constantine A. Murenin (2006) and Alexander Yurchenko (2003/2004)|
|Developer(s)||The OpenBSD Project|
|Initial release||25 April 2003|
|Operating system||OpenBSD, FreeBSD, DragonFly|
The sysctl hw.sensors framework is a kernel-level hardware sensors framework originating from OpenBSD, which uses the sysctl kernel interface as the transport layer between the kernel and the userland. As of 2019[update], the framework is used by over a hundred device drivers in OpenBSD to export various environmental sensors, with temperature sensors being the most common type. Consumption and monitoring of sensors is done in the userland with the help of sysctl, systat, sensorsd, ntpd, snmpd, ports/sysutils/symon and GKrellM.
A major difference compared to other solutions like lm_sensors is simplicity and a works-by-default approach in the drivers, which don't require nor support any configurability; no installation or configuration actions are required by the system administrator in order to get the sensors going. This is coupled with a fine-tuned ad-hoc read-only scan procedure on the I²C bus, written by Theo de Raadt in a centralised way with a cache, making it possible to leave it enabled by default at all times, unlike the competing solutions.
The framework was originally devised in 2003 by Alexander Yurchenko, when he was porting several envsys-based drivers from NetBSD. Instead of porting NetBSD's envsys, a simpler sysctl-based mechanism was developed.
The framework received a major uptick in usage by the device drivers with the release of OpenBSD 3.9, where in a period of merely 6 months, the number of individual drivers using the framework went from 9 in OpenBSD 3.8 (released 1 November 2005) to 33 in OpenBSD 3.9 (released 1 May 2006).
As of 23 December 2006[update], the framework was used by 44 devices drivers; it is at this time that a patchset has been committed converting a simple one-level addressing scheme into a more stable multi-layer addressing.
In 2007, the framework was ported to FreeBSD as part of a Google Summer of Code grant; it has been adopted by DragonFly BSD later that year. The usability of the
sensorsd(8), the sensors monitoring daemon, has been vastly improved in 2007, partly due to same GSoC grant.
As of 1 November 2008[update], the total number of drivers stood at 68 in OpenBSD 4.4; growing by 7 drivers in a 6-month release cycle. This level of growth, of one new driver per month on average, has been common throughout the history of the framework since OpenBSD 3.9.
The values exported by the drivers through the framework are read-only; however, an external patch exists that implements the fan control functionality in both the framework as well as one of the drivers for the most popular family of Super I/O chips; this patchset was provided for both OpenBSD and DragonFly BSD.
- Constantine A. Murenin (May 21, 2010). OpenBSD Hardware Sensors — Environmental Monitoring and Fan Control (MMath). University of Waterloo, Waterloo, Ontario, Canada: UWSpace. hdl:10012/5234. Document ID: ab71498b6b1a60ﬀ817b29d56997a418.
- Constantine A. Murenin; Raouf Boutaba (March 17, 2009). OpenBSD Hardware Sensors Framework (PDF). AsiaBSDCon 2009 Proceedings, 12–15 March 2009. Tokyo University of Science, Tokyo, Japan (published March 14, 2009). Archived (PDF) from the original on February 21, 2009. Retrieved March 4, 2019.
- Jeremy Andrews (June 7, 2008). "BSDCan 2008: Hardware Sensors Framework". KernelTrap. Retrieved March 4, 2019.
- "gkrellm-server-2.3.10p1 – single process stack of system monitors for GTK+2 (server)". OpenBSD ports. June 1, 2018. Retrieved March 4, 2019.
- David Gwynne; Marco Peereboom (December 3, 2006). bio and sensors in OpenBSD (PDF). OpenCON 2006, 2–3 December 2006. Courtyard Venice Airport, Venice/Tessera, Italy. Retrieved March 4, 2019.
- Ingrid Marson (March 24, 2006). "OpenBSD 3.9 adds sensor framework". ZDNet. Retrieved March 4, 2019.
- Manolis Tzanidakis (March 28, 2006). "Interview: Theo de Raadt of OpenBSD". Linux.com. Retrieved March 4, 2019.
- Theo de Raadt (May 29, 2015). "/sys/dev/i2c/i2c_scan.c". Super User's BSD Cross Reference. Retrieved March 4, 2019.
- Henning Brauer (September 3, 2016). "ntpd/sensors.c". Super User's BSD Cross Reference. Retrieved March 4, 2019.
- Marc Balmer (March 15, 2007). Support for Radio Clocks in OpenBSD (PDF). AsiaBSDCon 2007 Proceedings, 8–11 March 2007. Tokyo, Japan (published March 10, 2007). Archived (PDF) from the original on 2007. Retrieved March 4, 2019. Lay summary (PDF) (September 16, 2007).
- Marc Balmer (January 26, 2019). "/sys/kern/tty_nmea.c". Super User's BSD Cross Reference. Retrieved March 4, 2019.
- Constantine A. Murenin (2007). Generalised Interfacing with Microprocessor System Hardware Monitors. Proceedings of 2007 IEEE International Conference on Networking, Sensing and Control, 15–17 April 2007. London, United Kingdom. doi:10.1109/ICNSC.2007.372901. IEEE ICNSC 2007, pp. 901—906.
- Constantine A. Murenin (December 30, 2006). Marco Peereboom (ed.). "New two-level sensor API". OpenBSD Journal. Retrieved March 4, 2019.
- Constantine A. Murenin (October 14, 2007). "GSoC2007/cnst-sensors". FreeBSD. Retrieved March 4, 2019.
- Federico Biancuzzi (November 1, 2007). "Puffy's Marathon: What's New in OpenBSD 4.2". O'Reilly Media. Retrieved March 3, 2019. Lay summary.
- Federico Biancuzzi (November 3, 2008). "Source Wars - Return of the Puffy: What's New in OpenBSD 4.4". O'Reilly Media. Retrieved March 3, 2019.
- Constantine A. Murenin (March 14, 2010). "Quiet computing with BSD: Fan control with sysctl hw.sensors and lm(4) on OpenBSD and DragonFly BSD". Retrieved March 4, 2019.