diff options
author | netchild <netchild@FreeBSD.org> | 2007-10-14 10:45:31 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2007-10-14 10:45:31 +0000 |
commit | 4af9918bc0e8f388ffda416ed716c9b17ca6c0fd (patch) | |
tree | e7d76e2d64fce20db3bf8837259e3d37e4f7d3ec /lib | |
parent | 57a6302920d738a0f943ec56aa7d87683e443246 (diff) | |
download | FreeBSD-src-4af9918bc0e8f388ffda416ed716c9b17ca6c0fd.zip FreeBSD-src-4af9918bc0e8f388ffda416ed716c9b17ca6c0fd.tar.gz |
Import OpenBSD's sysctl hardware sensors framework.
This commit includes the following core components:
* sample configuration file for sensorsd
* rc(8) script and glue code for sensorsd(8)
* sysctl(3) doc fixes for CTL_HW tree
* sysctl(3) documentation for hardware sensors
* sysctl(8) documentation for hardware sensors
* support for the sensor structure for sysctl(8)
* rc.conf(5) documentation for starting sensorsd(8)
* sensor_attach(9) et al documentation
* /sys/kern/kern_sensors.c
o sensor_attach(9) API for drivers to register ksensors
o sensor_task_register(9) API for the update task
o sysctl(3) glue code
o hw.sensors shadow tree for sysctl(8) internal magic
* <sys/sensors.h>
* HW_SENSORS definition for <sys/sysctl.h>
* sensors display for systat(1), including documentation
* sensorsd(8) and all applicable documentation
The userland part of the framework is entirely source-code
compatible with OpenBSD 4.1, 4.2 and -current as of today.
All sensor readings can be viewed with `sysctl hw.sensors`,
monitored in semi-realtime with `systat -sensors` and also
logged with `sensorsd`.
Submitted by: Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by: Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by: syrinx
Tested by: many
OKed by: kensmith
Obtained from: OpenBSD (parts)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/sysctl.3 | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 1f0807b..8386678 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -280,10 +280,10 @@ privilege may change the value. .It "HW_PHYSMEM integer no" .It "HW_USERMEM integer no" .It "HW_PAGESIZE integer no" -.It "HW_FLOATINGPOINT integer no" +.It "HW_FLOATINGPT integer no" .It "HW_MACHINE_ARCH string no" -.\".It "HW_DISKNAMES integer no" -.\".It "HW_DISKSTATS integer no" +.It "HW_REALMEM integer no" +.It "HW_SENSORS node not applicable" .El .Pp .Bl -tag -width 6n @@ -301,12 +301,40 @@ The bytes of physical memory. The bytes of non-kernel memory. .It Li HW_PAGESIZE The software page size. -.It Li HW_FLOATINGPOINT +.It Li HW_FLOATINGPT Nonzero if the floating point support is in hardware. .It Li HW_MACHINE_ARCH The machine dependent architecture type. -.\".It Fa HW_DISKNAMES -.\".It Fa HW_DISKSTATS +.It Li HW_REALMEM +The bytes of real memory. +.It Li HW_SENSORS +Third level comprises an array of +.Li struct sensordev +structures containing information about devices +that may attach hardware monitoring sensors. +.Pp +Third, fourth and fifth levels together comprise an array of +.Li struct sensor +structures containing snapshot readings of hardware monitoring sensors. +In such usage, third level indicates the numerical representation +of the sensor device name to which the sensor is attached +(device's xname and number shall be matched with the help of +.Li struct sensordev +structure above), +fourth level indicates sensor type and +fifth level is an ordinal sensor number (unique to +the specified sensor type on the specified sensor device). +.Pp +The +.Sy sensordev +and +.Sy sensor +structures +and +.Sy sensor_type +enumeration +are defined in +.In sys/sensors.h . .El .Ss CTL_KERN The string and integer information available for the CTL_KERN level |