Folks who keep track of cvs changes might have noticed that new a device has been introduced called esm(4). ESM, Embedded Server Management, is a Dell specific server management protocol for 4th and 5th generation servers (e.g. 2450, 2500 etc). It's in essence what later became IPMI which we also support via ipmi(4).
Code courtesy of the friendly folks who brought you ipmi(4). Jordan Hargrave (jordan@) wrote the initial code and David Gwynne (dlg@) cleaned it up, added a bunch of sensors and integrated it into the sensor framework. esm(4) provides environmental environmental data of a server via sysctl so that it can be monitored using sensorsd(8). It displays its presence in dmesg like this: esm0 at mainbus0 esm0: PowerEdge 2500 Embedded Server Management 5.43 esm0: Primary System Backplane 1.32 Here are the sensors when everything is ok: # sysctl hw.sensors hw.sensors.0=esm0, CPU 1, OK, temp, 38.00 degC / 100.40 degF hw.sensors.1=esm0, Mainboard, OK, temp, 36.00 degC / 96.80 degF hw.sensors.2=esm0, CPU 1 Core, OK, volts_dc, 1.72 V hw.sensors.3=esm0, Motherboard +5V, OK, volts_dc, 5.03 V hw.sensors.4=esm0, Motherboard +12V, OK, volts_dc, 11.92 V hw.sensors.5=esm0, Motherboard +3.3V, OK, volts_dc, 3.31 V hw.sensors.6=esm0, Motherboard +2.5V, OK, volts_dc, 2.52 V hw.sensors.7=esm0, Motherboard GTL Term, OK, volts_dc, 1.50 V hw.sensors.8=esm0, Motherboard Battery, OK, volts_dc, 2.88 V hw.sensors.9=esm0, Chassis Intrusion, indicator, On hw.sensors.10=esm0, Fan 1, OK, fanrpm, 2700 RPM hw.sensors.11=esm0, Fan 2, OK, fanrpm, 2640 RPM hw.sensors.12=esm0, Fan 3, OK, fanrpm, 2670 RPM hw.sensors.13=esm0, Power Ctrl, raw, 0 hw.sensors.14=esm0, Fan 4, OK, fanrpm, 2730 RPM hw.sensors.15=esm0, Backplane, raw, 0 hw.sensors.16=esm0, Backplane Top, OK, temp, 41.00 degC / 105.80 degF hw.sensors.17=esm0, Backplane Bottom, OK, temp, 38.00 degC / 100.40 degF hw.sensors.18=esm0, Backplane +5V, OK, volts_dc, 4.99 V hw.sensors.19=esm0, Backplane +12V, OK, volts_dc, 12.24 V hw.sensors.20=esm0, Backplane SCSI A Connected, indicator, On hw.sensors.21=esm0, Backplane SCSI A External, OK, volts_dc, 4.72 V hw.sensors.22=esm0, Backplane SCSI B Connected, indicator, Off hw.sensors.23=esm0, Drive 1, drive, online hw.sensors.24=esm0, Drive 2, drive, online hw.sensors.25=esm0, Drive 3, drive, online hw.sensors.26=esm0, Drive 4, drive, empty hw.sensors.27=esm0, Drive 5, drive, empty hw.sensors.28=esm0, Drive 6, drive, empty hw.sensors.29=esm0, Backplane Control 2, raw, 49 hw.sensors.30=esm0, Backplane +3.3V, OK, volts_dc, 3.31 V hw.sensors.31=safte0, temp0, OK, temp, 41.11 degC / 106.00 degF hw.sensors.32=safte0, temp1, OK, temp, 37.78 degC / 100.00 degF Note that esm(4) also keeps track of drives independently of safte(4). Cool! Now let's pull a fan: hw.sensors.14=esm0, Fan 4, CRITICAL, fanrpm, 0 RPM Now lets reinsert it: hw.sensors.14=esm0, Fan 4, OK, fanrpm, 2810 RPM And life returns to normalcy. Another very useful feature is the watchdog timer that is provided by the ESM hardware. Watchdog timers need to be tickled every X seconds, if the tickling doesn't happen it'll reboot the server. This is handy for servers that are 1000 miles away and have unrecoverable kernel hangs (not rebootable from ddb(4)). To enable the watchdog simply type: # sysctl -w kern.watchdog.period=10 This will tickle the watchdog period/2, in this case every 5 seconds. Now if the server hangs (e.g. put it in ddb(4)) it'll reboot after 10-ish seconds. To disable the watchdog simply set the period to 0, like so: # sysctl -w kern.watchdog.period=0 As a sidenote I would like to mention that ipmi(4) has also been updated to provide watchdog functionality. Here is the dmesg: OpenBSD 3.8-current (GENERIC) #4: Wed Nov 30 21:39:06 EST 2005 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III ("GenuineIntel" 686-class) 927 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE real mem = 1073262592 (1048108K) avail mem = 972746752 (949948K) using 4278 buffers containing 53764096 bytes (52504K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(00) BIOS, date 08/15/03, BIOS32 rev. 0 @ 0xffe90 pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfc230/208 (11 entries) pcibios0: PCI Interrupt Router at 000:15:0 ("ServerWorks OSB4" rev 0x00) pcibios0: PCI bus #0 is the last bus bios0: ROM list: 0xc0000/0x8000 0xc8000/0x1000 0xcc000/0x800 0xcc800/0x1400 0xce000/0x1000 0xec000/0x4000! cpu0 at mainbus0 esm0 at mainbus0 esm0: PowerEdge 2500 Embedded Server Management 5.43 esm0: Primary System Backplane 1.32 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "ServerWorks CNB20HE Host" rev 0x23 pci1 at pchb0 bus 1 ppb0 at pci1 dev 2 function 0 "Intel i960 RM PCI-PCI" rev 0x02 pci2 at ppb0 bus 2 em0 at pci1 dev 12 function 0 "Intel PRO/1000MT (82546EB)" rev 0x01: irq 11, address 00:07:e9:0b:6d:b4 em1 at pci1 dev 12 function 1 "Intel PRO/1000MT (82546EB)" rev 0x01: irq 10, address 00:07:e9:0b:6d:b5 pchb1 at pci0 dev 0 function 1 "ServerWorks CNB20HE Host" rev 0x01 pchb2 at pci0 dev 0 function 2 "ServerWorks CNB20HE Host" rev 0x01 pchb3 at pci0 dev 0 function 3 "ServerWorks CNB20HE Host" rev 0x01 pci3 at pchb3 bus 3 ppb1 at pci3 dev 6 function 0 "DEC 21154 PCI-PCI" rev 0x05 pci4 at ppb1 bus 4 ppb2 at pci4 dev 0 function 0 "DEC 21154 PCI-PCI" rev 0x05 pci5 at ppb2 bus 5 ami0 at pci5 dev 0 function 0 "AMI MegaRAID" rev 0x20: irq 10 Dell 493/64b/lhc ami0: FW 198U, BIOS v3.35, 128MB RAM ami0: 2 channels, 0 FC loops, 1 logical drives scsibus0 at ami0: 40 targets sd0 at scsibus0 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed sd0: 34560MB, 34560 cyl, 64 head, 32 sec, 512 bytes/sec, 70778880 sec total scsibus1 at ami0: 16 targets safte0 at scsibus1 targ 6 lun 0: <DELL, 1x6 U2W SCSI BP, 1.32> SCSI2 3/processor fixed scsibus2 at ami0: 16 targets "QLogic ISP12160" rev 0x06 at pci4 dev 1 function 0 not configured mpt0 at pci3 dev 8 function 0 "Symbios Logic 53c1030" rev 0x07: irq 11 mpt0: IM support: 6 scsibus3 at mpt0: 16 targets sd1 at scsibus3 targ 2 lun 0: <COMPAQPC, ATLAS IV 9 WLS, 0828> SCSI3 0/direct fixed sd1: 8678MB, 13816 cyl, 4 head, 321 sec, 512 bytes/sec, 17773500 sec total sd2 at scsibus3 targ 4 lun 0: <COMPAQPC, ATLAS IV 9 WLS, 0828> SCSI3 0/direct fixed sd2: 8678MB, 13816 cyl, 4 head, 321 sec, 512 bytes/sec, 17773500 sec total mpt0: target 2 Synchronous at 80MHz width 16bit offset 31 QAS 0 DT 1 IU 0 mpt0: target 4 Synchronous at 80MHz width 16bit offset 31 QAS 0 DT 1 IU 0 mpt1 at pci3 dev 8 function 1 "Symbios Logic 53c1030" rev 0x07: irq 10 mpt1: IM support: 6 scsibus4 at mpt1: 16 targets fxp0 at pci0 dev 4 function 0 "Intel 82557" rev 0x08, i82559: irq 11, address 00:06:5b:1a:7d:db inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4 ohci0 at pci0 dev 8 function 0 "NEC USB" rev 0x43: irq 10, version 1.0 usb0 at ohci0: USB revision 1.0 uhub0 at usb0 uhub0: NEC OHCI root hub, rev 1.00/1.00, addr 1 uhub0: 3 ports with 3 removable, self powered ohci1 at pci0 dev 8 function 1 "NEC USB" rev 0x43: irq 11, version 1.0 usb1 at ohci1: USB revision 1.0 uhub1 at usb1 uhub1: NEC OHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered ehci0 at pci0 dev 8 function 2 "NEC USB" rev 0x04: irq 10 usb2 at ehci0: USB revision 2.0 uhub2 at usb2 uhub2: NEC EHCI root hub, rev 2.00/1.00, addr 1 uhub2: 5 ports with 5 removable, self powered vendor "AMI", unknown product 0x9063 (class system subclass miscellaneous, rev 0x04) at pci0 dev 10 function 0 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) pcib0 at pci0 dev 15 function 0 "ServerWorks OSB4" rev 0x50 pciide0 at pci0 dev 15 function 1 "ServerWorks OSB4 IDE" rev 0x00: DMA atapiscsi0 at pciide0 channel 0 drive 0 scsibus5 at atapiscsi0: 2 targets cd0 at scsibus5 targ 0 lun 0: <TEAC, CD-224E, 3.7D> SCSI0 5/cdrom removable cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 ohci2 at pci0 dev 15 function 2 "ServerWorks OSB4/CSB5 USB" rev 0x04: irq 5, version 1.0, legacy support usb3 at ohci2: USB revision 1.0 uhub3 at usb3 uhub3: ServerWorks OHCI root hub, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered 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 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 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 ff65 netmask ff65 ttymask ffe7 pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support dkcsum: sd0 matches BIOS drive 0x80 root on sd0a rootdev=0x400 rrootdev=0xd00 rawdev=0xd02