OpenBSD Journal

More sensors via i2c

Contributed by marco on from the dept.

On Misc Theo reported the following:

the new i386 snapshot heading out now contains a few uncommited little pieces which enable a potpourri of i2c goodness. mostly, this will provide some sensor stuff to people who do not have ipmi(4) or esm(4) support.

i2c "sensor" devices appear on lots of machines (not just i386). some might have noticed the recent macppc sensors, well, those were i2c devices too, but the nice thing is the ROM told us where they are on the i2c busses.

on other architectures, nothing tells us where these devices exist, so we have to utilize lots of heuristic checking, to try to find them, without messing up other devices. some people trying this in the past have messed up machines, but we are trying to be really careful and move slowly to not let such a situation happen.

to get this support working, we depend on working i2c bus drivers (which we now have 3 i386 ones) and then on i2c sensor-chip drivers (almost 20 now). but it also requires this nasty heuristic code which carefully probes the busses to decide which drivers match which chips. this cannot be done like PCI or ISA matching, but don't worry about the details.)

so go ahead, try it out, and see if on some of your machines you see a few new sensors (using "sysctl hw.sensors"). if things go weird, i would appreciate a private mail (that means just to me, but I will show it to 2-3 other people) which details:

	1. what kind of machine, 2 lines of text
2. full dmesg, please
3. hw.sensors output

note, not all machines have these; in particular, most laptops do not because they hide this stuff behind the keyboard controller (kind of like a per-vendor custom undocumented ESM-style thing, but maybe kind of supplied via ACPI on some machines... we'll see someday).

that said, i am happy to see this on a SuperMicro machine here.. (minus some debug messages you will see, and which I need in the mail):

piixpm0 at pci0 dev 15 function 0 "ServerWorks CSB5" rev 0x93
iic0 at piixpm0
admtemp0 at iic0 addr 0x18: Xeon
admtemp1 at iic0 addr 0x29: Xeon
lmenv0 at iic0 addr 0x2d: LM87 rev 6
lmenv1 at iic0 addr 0x2e: LM87 rev 6

hw.sensors.0=admtemp0, Xeon, temp, 25.00 degC / 77.00 degF
hw.sensors.1=admtemp1, Xeon, temp, 26.00 degC / 78.80 degF
hw.sensors.2=lmenv0, +2.5Vin, volts_dc, 1.67 V
hw.sensors.3=lmenv0, Vccp1, volts_dc, 0.00 V
hw.sensors.4=lmenv0, +Vcc, volts_dc, 3.28 V
hw.sensors.5=lmenv0, +5Vin/Vcc, volts_dc, 0.00 V
hw.sensors.6=lmenv0, +12Vin, volts_dc, 12.12 V
hw.sensors.7=lmenv0, Vccp2, volts_dc, 0.00 V
hw.sensors.9=lmenv0, Int. Temp., temp, 29.00 degC / 84.20 degF
hw.sensors.10=lmenv0, FAN1, fanrpm, 3341 RPM
hw.sensors.11=lmenv0, FAN2, fanrpm, 3341 RPM
hw.sensors.12=lmenv1, +2.5Vin, volts_dc, 2.55 V
hw.sensors.13=lmenv1, Vccp1, volts_dc, 1.49 V
hw.sensors.14=lmenv1, +Vcc, volts_dc, 3.28 V
hw.sensors.15=lmenv1, +5Vin/Vcc, volts_dc, 5.05 V
hw.sensors.16=lmenv1, +12Vin, volts_dc, 11.62 V
hw.sensors.17=lmenv1, Vccp2, volts_dc, 1.52 V
hw.sensors.19=lmenv1, Int. Temp., temp, 26.00 degC / 78.80 degF
hw.sensors.20=lmenv1, FAN1, fanrpm, 5192 RPM
hw.sensors.21=lmenv1, FAN2, fanrpm, 5273 RPM

Yeah, that's even the temperatures right on the Xeon processor chips; right on the chip......

(Comments are closed)


Comments
  1. By Roman (169.200.215.36) on

    Hacking on this I learned a great lesson.... Don't use anything with ServerWorks CSB5 chipsets if you can help it. Getting documentation for the chipset requires signing an NDA which is complete BS. What the F*&^% do they think they are hiding? I never understood the depth of frustration involved in this whole "NDA" fiasco until now. I can't believe a company would dare treat hardware THAT I PAID FOR and that REQUIRES software to be written for it to even function at all like it's some mystical black box that warrants secrecy. uggg what BS!

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]