Original author(s) | Constantine A. Murenin (2006), Alexander Yurchenko (2003–2004) |
---|---|
Developer(s) | The OpenBSD Project |
Initial release | 25 April 2003 |
Repository | |
Written in | C |
Operating system | OpenBSD, DragonFly |
Type | system monitoring |
Licence | ISC |
The 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. [1] [2] Consumption and monitoring of sensors is done in the userland with the help of sysctl, systat, sensorsd, OpenBSD NTP Daemon (OpenNTPD, ntpd), Simple Network Management Protocol (snmpd), ports/sysutils/symon and GKrellM. [3] [4]
In OpenBSD, the framework is integrated with Dell's ESM, Intelligent Platform Management Interface (IPMI) and I2C, [5] [6] in addition to several popular Super I/O chips through lm(4)
. [2]
A major difference compared to other solutions like lm_sensors is simplicity and a works-by-default approach in the drivers, which don't need or support any configurability; no installation or configuration actions are required by the system administrator to get the sensors going. [7] [6] This is coupled with a fine-tuned ad-hoc read-only scan procedure on the I2C 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. [7] [6] [8]
drive
sensors Support for automatic monitoring of RAID drives is also provided through the sensors framework, [5] this concept of sensors of drive
type has been backported by NetBSD back into envsys in 2007. [2]
timedelta
sensors OpenNTPD uses sensors of type timedelta
to synchronise time. [9] These are provided by NMEA and other drivers. [10] [11]
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. [2]
Framework use by the device drivers rose sharply with the release of OpenBSD 3.9. Then, in only 6 months, the number of individual drivers using the framework rose from 9 in OpenBSD 3.8 (released 1 November 2005) to 33 in OpenBSD 3.9 (released 1 May 2006). [2]
As of 23 December 2006 [update] , the framework was used by 44 devices drivers. At this time, a patchset was committed converting a simple one-level addressing scheme into a more stable multi-layer addressing. [12] [13]
In 2007, the framework was ported to FreeBSD as part of a Google Summer of Code grant. It was adopted by DragonFly BSD later that year. [14] The usability of the sensorsd(8)
, the sensor monitoring daemon, was vastly improved in 2007, partly via the same GSoC grant. [15]
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. [16] This rate of growth, of one new driver per month on average, has been common throughout the history of the framework since OpenBSD 3.9. [2]
The values exported by the drivers through the framework are read-only; however, an external patch exists that implements the fan control functions in both the framework, and in one of the drivers for the most popular family of Super I/O chips. This patchset was provided for both OpenBSD and DragonFly BSD. [17] [1]
I2C (Inter-Integrated Circuit; pronounced as “eye-squared-see” or “eye-two-see”), alternatively known as I2C or IIC, is a synchronous, multi-controller/multi-target (historically-termed as master/slave), single-ended, serial communication bus invented in 1982 by Philips Semiconductors. It is widely used for attaching lower-speed peripheral integrated circuits (ICs) to processors and microcontrollers in short-distance, intra-board communication.
NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined and is controlled by the National Marine Electronics Association (NMEA). It replaces the earlier NMEA 0180 and NMEA 0182 standards. In leisure marine applications, it is slowly being phased out in favor of the newer NMEA 2000 standard, though NMEA 0183 remains the norm in commercial shipping.
Open Firmware is a standard defining the interfaces of a computer firmware system, formerly endorsed by the Institute of Electrical and Electronics Engineers (IEEE). It originated at Sun Microsystems where it was known as OpenBoot, and has been used by multiple vendors including Sun, Apple, IBM and ARM.
Matthew Dillon is an American software engineer known for Amiga software, contributions to FreeBSD and for starting and leading the DragonFly BSD project since 2003.
A disk array controller is a device that manages the physical disk drives and presents them to the computer as logical units. It almost always implements hardware RAID, thus it is sometimes referred to as RAID controller. It also often provides additional disk cache.
sysfs is a pseudo file system provided by the Linux kernel that exports information about various kernel subsystems, hardware devices, and associated device drivers from the kernel's device model to user space through virtual files. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuration.
sysctl is a software mechanism in some Unix-like operating systems that reads and modifies the attributes of the system kernel such as its version number, maximum limits, and security settings. It is available both as a system call for compiled programs, and an administrator command for interactive use and scripting. Linux additionally exposes sysctl as a virtual file system.
In computing, ioctl
is a system call for device-specific input/output operations and other operations which cannot be expressed by regular file semantics. It takes a parameter specifying a request code; the effect of a call depends completely on the request code. Request codes are often device-specific. For instance, a CD-ROM device driver which can instruct a physical device to eject a disc would provide an ioctl
request code to do so. Device-independent request codes are sometimes used to give userspace access to kernel functions which are only used by core system software or still under development.
Super I/O is a class of I/O controller integrated circuits that began to be used on personal computer motherboards in the late 1980s, originally as add-in cards, later embedded on the motherboards. A super I/O chip combines interfaces for a variety of low-bandwidth devices. Now it is mostly merged with EC.
A system monitor is a hardware or software component used to monitor system resources and performance in a computer system.
In the context of free and open-source software, proprietary software only available as a binary executable is referred to as a blob or binary blob. The term usually refers to a device driver module loaded into the kernel of an open-source operating system, and is sometimes also applied to code running outside the kernel, such as system firmware images, microcode updates, or userland programs. The term blob was first used in database management systems to describe a collection of binary data stored as a single entity.
lm_sensors is a free open-source software-tool for Linux that provides tools and drivers for monitoring temperatures, voltage, humidity, and fans. It can also detect chassis intrusions.
Proprietary firmware is any firmware that has had its use, private modification, copying, or republishing restricted by the producer. Proprietors may enforce restrictions by technical means, such as by restricting source code access, firmware replacement restrictions, or by legal means, such as through copyright and patents. Alternatives to proprietary firmware may be free (libre) or open-source.
OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. The OpenBSD project emphasizes portability, standardization, correctness, proactive security, and integrated cryptography.
Sensors are devices that measure physical quantities and convert them into signals which can be read by observers or by instruments.
NetBSD is a free and open-source Unix-like operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is available for many platforms, including servers, desktops, handheld devices, and embedded systems.
The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. As of 4 March 2019, the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_register
symbol within the sys
path of NetBSD; with temperature sensors, ENVSYS_STEMP
, being the most likely type to be exported by any given driver. Sensors are registered with the kernel through sysmon_envsys(9)
API. Consumption and monitoring of sensors from the userland is performed with the help of envstat
utility through proplib(3)
through ioctl(2)
against the /dev/sysmon
pseudo-device file, the powerd
power management daemon that responds to kernel events by running scripts from /etc/powerd/scripts/
, as well as third-party tools like symon
and GKrellM from pkgsrc.
The bio(4) pseudo-device driver and the bioctl(8) utility implement a generic RAID volume management interface in OpenBSD and NetBSD. The idea behind this software is similar to ifconfig, where a single utility from the operating system can be used to control any RAID controller using a generic interface, instead of having to rely on many proprietary and custom RAID management utilities specific for each given hardware RAID manufacturer. Features include monitoring of the health status of the arrays, controlling identification through blinking the LEDs and managing of sound alarms, and specifying hot spare disks. Additionally, the softraid
configuration in OpenBSD is delegated to bioctl as well; whereas the initial creation of volumes and configuration of hardware RAID is left to card BIOS as non-essential after the operating system has already been booted. Interfacing between the kernel and userland is performed through the ioctl
system call through the /dev/bio
pseudo-device.
systat is a BSD UNIX console application for displaying system statistics in fullscreen mode using ncurses/curses. It is available on, and by default ships in the base systems of, FreeBSD, NetBSD, OpenBSD and DragonFly BSD. It was first released as part of 4.3BSD in 1986.