Folks who keep track of cvs changes might have noticed a barrage of commits
regarding ipmi(4).  The driver is functionally complete but needs wide testing
on both amd64 and i386 architectures.  Jordan Hargrave (jordan@) wrote most of
the code.

Let's talk a bit about ipmi(4).
                              
What is it anyway?
The ipmi term Intelligent Platform Management refers to autonomous monitoring
and recovery features implemented directly in platform management hardware and
firmware.  The key characteristics of Intelligent Platform Management is that
inventory, monitoring, logging, and recovery control functions are available
independent of the main processor, BIOS, and operating system.

(much more in ipmi(4)!)

If your box supports IPMI you'll see a similar line in dmesg.
ipmi0 at mainbus0: version 1.0 interface SMIC iobase 0xecf4/3 spacing 1


Great, now how does that help me?
The driver retrieves ipmi readings and publishes them via the sysctl interface.
Here is the output of a Dell PowerEdge 2650:
# sysctl hw.sensors                                                            
hw.sensors.0=ipmi0, ESM Frt I/O Temp, OK, temp, 24.00 degC / 75.20 degF
hw.sensors.1=ipmi0, ESM Riser Temp, OK, temp, 26.00 degC / 78.80 degF
hw.sensors.2=ipmi0, ESM CPU 1 Temp, OK, temp, 26.00 degC / 78.80 degF
hw.sensors.3=ipmi0, ESM MB Bat Volt, OK, volts_dc, 3.18 V
hw.sensors.4=ipmi0, ESM 3.3 FP Volt, OK, volts_dc, 3.23 V
hw.sensors.5=ipmi0, ESM MB 3.3 Volt, OK, volts_dc, 3.27 V
hw.sensors.6=ipmi0, ESM MB 5 Volt, OK, volts_dc, 4.99 V
hw.sensors.7=ipmi0, ESM CPU Volt, OK, volts_dc, 1.47 V
hw.sensors.8=ipmi0, ESM MB +12 Volt, OK, volts_dc, 11.90 V
hw.sensors.9=ipmi0, ESM MB -12 Volt, OK, volts_dc, -11.97 V
hw.sensors.10=ipmi0, ESM MB 2.5 Volt, OK, volts_dc, 2.52 V
hw.sensors.11=ipmi0, ESM GB0 2.5 Volt, OK, volts_dc, 2.56 V
hw.sensors.12=ipmi0, ESM GB1 2.5 Volt, OK, volts_dc, 2.56 V
hw.sensors.13=ipmi0, ESM 5 AUX Volt, OK, volts_dc, 5.11 V
hw.sensors.14=ipmi0, ESM ROMB PK Volt, OK, volts_dc, 3.96 V
hw.sensors.15=ipmi0, ESM GB0 1.2 Volt, OK, volts_dc, 1.21 V
hw.sensors.16=ipmi0, ESM GB1 1.2 Volt, OK, volts_dc, 1.22 V
hw.sensors.17=ipmi0, ESM VTT Volt, OK, volts_dc, 1.27 V
hw.sensors.18=ipmi0, ESM MB Fan1 RPM, OK, fanrpm, 4740 RPM
hw.sensors.19=ipmi0, ESM MB Fan2 RPM, OK, fanrpm, 4800 RPM
hw.sensors.20=ipmi0, ESM MB Fan4 RPM, OK, fanrpm, 7500 RPM
hw.sensors.21=ipmi0, ESM MB Fan6 RPM, OK, fanrpm, 7140 RPM
hw.sensors.22=ipmi0, ESM MB Fan7 RPM, OK, fanrpm, 7020 RPM
hw.sensors.23=ipmi0, Power Supply - 1, OK, indicator, On
hw.sensors.24=ipmi0, Power Supply - 2, CRITICAL, indicator, Off
hw.sensors.25=ipmi0, Cover Intrusion, OK, indicator, Off
hw.sensors.26=ipmi0, Bezel Intrusion, OK, indicator, Off
hw.sensors.27=safte0, temp0, OK, temp, 22.78 degC / 73.00 degF
hw.sensors.28=safte0, temp1, OK, temp, 24.44 degC / 76.00 degF

Lots of stuff!  In the list you'll find core voltage measurements, fan speeds,
power supply readings etc.  As you can see I do not have a 2nd power supply in
this box.

Nifty, now lets open up the chassis and see what happens.
hw.sensors.25=ipmi0, Cover Intrusion, CRITICAL, indicator, On

As you can see the Cover Intrusion went to critical.

Now lets pull a fan.
hw.sensors.18=ipmi0, ESM MB Fan1 RPM, CRITICAL, fanrpm, 0 RPM
hw.sensors.19=ipmi0, ESM MB Fan2 RPM, OK, fanrpm, 7980 RPM
hw.sensors.20=ipmi0, ESM MB Fan4 RPM, OK, fanrpm, 7380 RPM
hw.sensors.21=ipmi0, ESM MB Fan6 RPM, OK, fanrpm, 7140 RPM
hw.sensors.22=ipmi0, ESM MB Fan7 RPM, OK, fanrpm, 7020 RPM

Fan1 went critical but also the speed of Fan2 went up to compensate.

Lets pull another fan.
hw.sensors.18=ipmi0, ESM MB Fan1 RPM, CRITICAL, fanrpm, 0 RPM
hw.sensors.19=ipmi0, ESM MB Fan2 RPM, OK, fanrpm, 7980 RPM
hw.sensors.20=ipmi0, ESM MB Fan4 RPM, CRITICAL, fanrpm, 0 RPM
hw.sensors.21=ipmi0, ESM MB Fan6 RPM, OK, fanrpm, 7200 RPM
hw.sensors.22=ipmi0, ESM MB Fan7 RPM, OK, fanrpm, 7020 RPM

Now lets stick them back in.
hw.sensors.18=ipmi0, ESM MB Fan1 RPM, OK, fanrpm, 4740 RPM
hw.sensors.19=ipmi0, ESM MB Fan2 RPM, OK, fanrpm, 4800 RPM
hw.sensors.20=ipmi0, ESM MB Fan4 RPM, OK, fanrpm, 7320 RPM
hw.sensors.21=ipmi0, ESM MB Fan6 RPM, OK, fanrpm, 7140 RPM
hw.sensors.22=ipmi0, ESM MB Fan7 RPM, OK, fanrpm, 7020 RPM

Ah look at that, both fans are happy again and Fan2 slowed down.

Lets put the cover back on.
hw.sensors.25=ipmi0, Cover Intrusion, OK, indicator, Off

And the box is all happy again.

Combine this with sensorsd(8) and you can have email, pagers, sirens, fog horns
and other alerting mechanisms go off.


What's next?
We'll continue to add sensor types that make sense to report.  Another thing
that needs to happen is the reporting of threshold values and a mechanism to
change these values.  All that is in the future though.


Cool, what can I do?
Test!  We need wide testing on systems that have IPMI.  I bet there has to be
some tuning to work around timing differences between platforms.  The current
code was tested on Intel, Dell and Sun boards.


dmesg of the Dell PowerEdge 2650 used.
OpenBSD 3.8-current (GENERIC) #0: Fri Oct 21 13:09:55 CDT 2005
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 2.40GHz ("GenuineIntel" 686-class) 2.40 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID
real mem  = 1073197056 (1048044K)
avail mem = 972693504 (949896K)
using 4278 buffers containing 53764096 bytes (52504K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 10/09/03, BIOS32 rev. 0 @ 0xffe90
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfc410/176 (9 entries)
pcibios0: PCI Interrupt Router at 000:15:0 ("ServerWorks CSB5" rev 0x00)
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x6000 0xce000/0x600 0xec000/0x4000!
ipmi0 at mainbus0: version 1.0 interface SMIC iobase 0xecf4/3 spacing 1
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x33
pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
pci1 at pchb1 bus 3
bge0 at pci1 dev 6 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2 
(0x1002): irq 11 address 00:0f:1f:6b:92:40
brgphy0 at bge0 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
bge1 at pci1 dev 8 function 0 "Broadcom BCM5703X" rev 0x02, BCM5703 A2 
(0x1002): irq 10 address 00:0f:1f:6b:92:41
brgphy1 at bge1 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2
pchb2 at pci0 dev 0 function 2 "ServerWorks CNB20-HE Host (GC-LE)" rev 0x00
pci2 at pchb2 bus 1
vendor "Dell", unknown product 0x000c (class undefined unknown subclass 0x00, 
rev 0x00) at pci0 dev 4 function 0 not configured
"Dell PERC 3/Di" rev 0x00 at pci0 dev 4 function 1 not configured
vendor "Dell", unknown product 0x000d (class undefined unknown subclass 0x00, 
rev 0x00) at pci0 dev 4 function 2 not configured
vga1 at pci0 dev 14 function 0 "ATI Rage XL" rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pchb3 at pci0 dev 15 function 0 "ServerWorks CSB5" rev 0x93
pciide0 at pci0 dev 15 function 1 "ServerWorks CSB5 IDE" rev 0x93: DMA
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TEAC, CD-224E, K.9A> SCSI0 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
ohci0 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev 0x05: irq 5, 
version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: ServerWorks OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
pcib0 at pci0 dev 15 function 3 "ServerWorks CSB5 LPC" rev 0x00
pchb4 at pci0 dev 16 function 0 "ServerWorks CIOB-X2 PCIX" rev 0x05
pchb5 at pci0 dev 16 function 2 "ServerWorks CIOB-X2 PCIX" rev 0x05
pci3 at pchb5 bus 4
ppb0 at pci3 dev 8 function 0 "Intel 80303 IOP" rev 0x01
pci4 at ppb0 bus 5
ahc1 at pci4 dev 6 function 0 "Adaptec AIC-7899 U160" rev 0x01: irq 7
scsibus1 at ahc1: 16 targets
sd0 at scsibus1 targ 1 lun 0: <SEAGATE, ST373453LC, DX10> SCSI3 0/direct fixed
sd0: 70007MB, 31310 cyl, 8 head, 572 sec, 512 bytes/sec, 143374650 sec total
safte0 at scsibus1 targ 6 lun 0: <PE/PV, 2x2 SCSI BP, 1.1> SCSI2 3/processor 
fixed
ahc2 at pci4 dev 6 function 1 "Adaptec AIC-7899 U160" rev 0x01: irq 11
scsibus2 at ahc2: 16 targets
safte1 at scsibus2 targ 6 lun 0: <PE/PV, 2x3 SCSI BP, 1.1> SCSI2 3/processor 
fixed
pchb6 at pci0 dev 17 function 0 "ServerWorks CIOB-X2 PCIX" rev 0x05
pchb7 at pci0 dev 17 function 2 "ServerWorks CIOB-X2 PCIX" rev 0x05
pci5 at pchb7 bus 2
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask ebe5 netmask efe5 ttymask ffe7
pctr: user-level cycle counter enabled
ahc1: target 1 using 16bit transfers
ahc1: target 1 synchronous at 80.0MHz DT, offset = 0x3f
dkcsum: sd0 matches BIOS drive 0x80
root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02

Reply via email to