envsys
   HOME

TheInfoList



OR:

The envsys framework is a
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
-level
hardware monitoring A system monitor is a hardware or software component used to monitor system resources and performance in a computer system. Among the management issues regarding use of system monitoring tools are resource usage and privacy. Overview Software ...
sensors framework in
NetBSD NetBSD is a free and open-source Unix 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 a ...
. , the framework is used by close to 85
device driver In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and ot ...
s to export various
environmental monitoring Environmental monitoring describes the processes and activities that need to take place to characterize and monitor the quality of the environment. Environmental monitoring is used in the preparation of environmental impact assessments, as well a ...
sensors, as evidenced by references of the sysmon_envsys_register symbol within the sys path of NetBSD; with
temperature Temperature is a physical quantity that expresses quantitatively the perceptions of hotness and coldness. Temperature is measured with a thermometer. Thermometers are calibrated in various temperature scales that historically have relied o ...
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) In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files. Property list ...
through
ioctl(2) In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
against the /dev/sysmon
pseudo-device In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow a ...
file, the powerd power management
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and mythology and of later Hellenistic religion and philosophy. The word ...
that responds to kernel events by running scripts from /etc/powerd/scripts/, as well as
third-party Third party may refer to: Business * Third-party source, a supplier company not owned by the buyer or seller * Third-party beneficiary, a person who could sue on a contract, despite not being an active party * Third-party insurance, such as a Veh ...
tools like symon and
GKrellM GNU Krell Monitors (GKrellM)''Krell'' is a reference to an extraterrestrial race in the science fiction movie '' Forbidden Planet''. See Retrieved 6 January 2008. Archived frothe original/ref> is a system monitor software based on the GTK+ toolki ...
from
pkgsrc pkgsrc (''package source'') is a package management system for Unix-like operating systems. It was forked from the FreeBSD ports collection in 1997 as the primary package management system for NetBSD. Since then it has evolved independently; in 19 ...
.


Features

The framework allows the user to amend the monitoring limits specified by the driver, and for the driver to perform monitoring of the sensors in kernel space, or even to programme a hardware chip to do the monitoring for the system automatically. Two levels of limits are defined: ''critical'' and ''warning'', both of which additionally extend to an ''over'' and an ''under'' categorisation. If limit thresholds are crossed, a kernel event may be generated, which can be caught in the userland by powerd to execute a pre-defined user script. By comparison, in OpenBSD's
hw.sensors 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. , the framework is used by over a hundred devi ...
, the monitoring of user-defined values is performed in userspace by sensorsd. , the framework itself does not facilitate
computer fan control A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs ...
, although the drivers could still implement interfacing with the fan-controlling capabilities of their chips through other means, for example, through a driver-specific
sysctl sysctl is a software utility of 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 ...
interface, which is the approach taken by the dbcool(4) driver. However, the drivers for the most popular
Super I/O 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 vari ...
chips like lm(4) and itesio(4) do not implement any fan control at all (in fact, historically, in all of OpenBSD, NetBSD and DragonFly, these drivers don't even report the duty cycle of the fans — only the actual RPM values are reported).


History

The framework undergone two major revisions: the first version of envsys.h was committed on ; with envsys.4
man page A man page (short for manual page) is a form of software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs (including library and system calls), formal standards and conventions, and ev ...
following on . Between 2000 and 2007, the manual page for envsys(4) in NetBSD stated that the "API is experimental", and that the "entire API should be replaced by a sysctl(8)", "should one be developed"; it can be noted that in 2003 this was the exact approach taken by
OpenBSD 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. According to the website, the OpenBSD project em ...
with sysctl
hw.sensors 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. , the framework is used by over a hundred devi ...
when some of the envsys(4) drivers were ported to OpenBSD. The second revision came about on . The serialisation with userland was reimplemented using
property list In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files. Property list ...
s with the help of NetBSD's new
proplib(3) In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files. Property list ...
library (the underlying transport layer between the kernel and userland still being done through
ioctl In computing, ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls. It takes a parameter specifying a request code; th ...
). The envsys framework was the precursor to OpenBSD's sysctl
hw.sensors 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. , the framework is used by over a hundred devi ...
framework in 2003, and many drivers, as well as some sensor types, have been ported back and forth between NetBSD and OpenBSD. Support for sensors of drive type has been added to NetBSD on , similar to drive type in OpenBSD, which was at the same time when
bio(4) Bio or BIO may refer to: Computing * bio(4), a pseudo-device driver in RAID controller management interface in OpenBSD and NetBSD * Block I/O, a concept in computer data storage Politics * Julius Maada Bio (born 1964), Sierra Leonean politician ...
and
bioctl 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 ...
were ported from OpenBSD to NetBSD.


See also

*
bioctl 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 ...
*
hw.sensors 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. , the framework is used by over a hundred devi ...
*
lm_sensors lm_sensors (Linux-monitoring 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. Issues During 2001/2004, the ...
*
SpeedFan SpeedFan is a system monitor for Microsoft Windows that can read temperatures, voltages and fan speeds of computer components. It can change computer fan speeds depending on the temperature of various components. The program can display system v ...


References


External links

* {{NetBSD 1999 software 2007 software BSD software Computer hardware tuning Computer performance Environmental data Environmental monitoring Free software programmed in C Free system software Motherboard NetBSD System administration System monitors