How to use hardware monitors with NetBSD19 Oct 2002
Today, there are various environmental sensor ICs available on modern mainboards, which are able of monitoring fan speed, cpu and system temperature, and voltage for example. NetBSD currently supports the National Semiconductor LM78, LM79 and compatible hardware monitors (the lm(4) device), the VIA VT82C686A hardware monitor (the viaenv(4) device) and ACPI aware hardware monitors (the acpi(4) subsystem) through its Environmental Systems API. These devices are not enabled by default, you need to recompile your kernel with the following additional lines in your kernel config file:
For the National Semiconductor LM78, LM79 and compatible monitors (you may need to adjust the I/O port settings):
lm0 at isa? port 0x290
For the VIA VT82C686A hardware monitor:
viapm* at pci? dev ? function ? viaenv* at viapm?
For ACPI enabled monitors (thanks to Joel Carnat for the hint):
options MPACPI acpi0 at mainbus0 acpiacad at acpi? acpibat* at acpi? acpibut* at acpi? acpiec* at acpi? acpilid* at acpi? acpitz* at acpi?
After booting your new kernel, you can access your hardware sensors, using the envstat(8) command. For example, to display all supported sensors, type
envstat -l, and to actually read the environmental sensors, simply type
envstat. For more information about using the envstat(8) tool, refer to the manpage.