Hi, I'm configuring sensorsd to conditionally shutdown -- based on Wh of charge left in laptop battery and whether or not the computer is plugged in -- and it seems that sensorsd might have a bit of a blind spot when it comes my available sensors. After reporting the initial states, no more state change events seem to be picked up by sensorsd (I'm definitely waiting long enough for them).
A call to `sysctl` clearly reflects some changes, yet they are not picked up by sensorsd. Odd?! Am I alone? For one sensor in particular (acpiac0.indicator0) I don't even get the initial state notification. Is it that sensorsd is looking for something other than an "OK" from these sensors, in order to trigger a change event? Initial values are reported as expected in /var/log/daemon: Nov 14 12:41:45 ace sensorsd[26828]: startup, system has 10 sensors Nov 14 12:42:45 ace sensorsd[27276]: acpibat0.watthour3: 2.71 Wh, OK Nov 14 12:42:45 ace sensorsd[27276]: acpibat0.raw0: 2, OK Nov 14 12:42:45 ace sensorsd[27276]: cpu0.temp0: within limits: 36.00 degC Output of `sysctl hw.sensors` when plugged: hw.sensors.acpibat0.volt0=11.10 VDC (voltage) hw.sensors.acpibat0.volt1=12.38 VDC (current voltage) hw.sensors.acpibat0.watthour0=3.34 Wh (last full capacity) hw.sensors.acpibat0.watthour1=0.30 Wh (warning capacity) hw.sensors.acpibat0.watthour2=0.13 Wh (low capacity) hw.sensors.acpibat0.watthour3=2.37 Wh (remaining capacity), OK hw.sensors.acpibat0.raw0=2 (battery charging), OK hw.sensors.acpibat0.raw1=64433 (rate) hw.sensors.acpiac0.indicator0=On (power supply) hw.sensors.cpu0.temp0=36.00 degC Output of `sysctl hw.sensors` when unplugged, running on battery: hw.sensors.acpibat0.volt0=11.10 VDC (voltage) hw.sensors.acpibat0.volt1=12.38 VDC (current voltage) hw.sensors.acpibat0.watthour0=3.34 Wh (last full capacity) hw.sensors.acpibat0.watthour1=0.30 Wh (warning capacity) hw.sensors.acpibat0.watthour2=0.13 Wh (low capacity) hw.sensors.acpibat0.watthour3=2.37 Wh (remaining capacity), OK hw.sensors.acpibat0.raw0=1 (battery discharging), OK hw.sensors.acpibat0.raw1=824 (rate) hw.sensors.acpiac0.indicator0=Off (power supply) hw.sensors.cpu0.temp0=36.00 degC My sensorsd.conf: # $OpenBSD: sensorsd.conf,v 1.8 2007/08/14 19:02:02 cnst Exp $ # # Sample sensorsd.conf file. See sensorsd.conf(5) for details. # # +5 voltage (volts) #hw.sensors.lm0.volt3:low=4.8V:high=5.2V # +12 voltage (volts) #hw.sensors.lm0.volt4:low=11.5V:high=12.5V # Chipset temperature (degrees Celsius) #hw.sensors.lm0.temp0:high=50C # CPU temperature (degrees Celsius) #hw.sensors.lm0.temp1:high=60C # CPU fan (RPM) #hw.sensors.lm0.fan1:low=3000 # ignore certain indicators on ipmi(4) #hw.sensors.ipmi0.indicator1:istatus # Warn if any temperature sensor is over 70 degC. # This entry will match only those temperature sensors # that don't have their own entry. temp:high=70C # no emails after the first hw.sensors.acpibat0.watthour3:command=echo l %l n %n s %s x %x t %t 2 %2 3 %3 4 %4 | mail mch hw.sensors.acpibat0.raw0:command=echo l %l n %n s %s x %x t %t 2 %2 3 %3 4 %4 | mail mch # don't even get initial state on this one hw.sensors.acpiac0.indicator0:command=echo l %l n %n s %s x %x t %t 2 %2 3 %3 4 %4 | mail mch # By default, sensorsd(8) reports status changes of all sensors that # keep their state. Uncomment the following lines if you want to # suppress reports about status changes of specific sensor types. #temp:istatus #fan:istatus #volt:istatus #acvolt:istatus #resistance:istatus #power:istatus #current:istatus #watthour:istatus #amphour:istatus #indicator:istatus #raw:istatus #percentage:istatus #illuminance:istatus #drive:istatus #timedelta:istatus dmesg: OpenBSD 4.8 (GENERIC.MP) #359: Mon Aug 16 09:16:26 MDT 2010 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP RTC BIOS diagnostic error 80<clock_battery> cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE real mem = 523292672 (499MB) avail mem = 504750080 (481MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 10/06/08, SMBIOS rev. 2.4 @ 0xe8eb0 (31 entries) bios0: vendor Acer version "v0.3310" date 10/06/2008 bios0: Acer AOA110 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SSDT HPET APIC MCFG ASF! SLIC BOOT acpi0: wakeup devices P32_(S4) UHC1(S3) UHC2(S3) UHC3(S3) UHC4(S3) ECHI(S3) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) AZAL(S0) MODM(S0) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: apic clock running at 133MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 4 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 5 (P32_) acpiprt2 at acpi0: bus 1 (EXP1) acpiprt3 at acpi0: bus 2 (EXP2) acpiprt4 at acpi0: bus 3 (EXP3) acpiprt5 at acpi0: bus 4 (EXP4) acpiec0 at acpi0 acpicpu0 at acpi0: C3, C2, C1, PSS acpicpu1 at acpi0: C3, C2, C1, PSS acpibtn0 at acpi0: PWRB acpibtn1 at acpi0: LID0 acpibtn2 at acpi0: SLPB acpibat0 at acpi0: BAT1 not present acpiac0 at acpi0: AC unit online acpivideo0 at acpi0: OVGA acpivout0 at acpivideo0: CRT1 acpivout1 at acpivideo0: DTV1 acpivout2 at acpivideo0: DFP1 acpivout3 at acpivideo0: LCD_ acpivout4 at acpivideo0: DTV2 acpivout5 at acpivideo0: DFP2 bios0: ROM list: 0xc0000/0xec00! 0xcf000/0x1000 cpu0: Enhanced SpeedStep 1597 MHz: speeds: 1600, 1333, 1066, 800 MHz pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82945GME Host" rev 0x03 vga1 at pci0 dev 2 function 0 "Intel 82945GME Video" rev 0x03 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0x20000000, size 0x10000000 inteldrm0 at vga1: apic 4 int 16 (irq 11) drm0 at inteldrm0 "Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 4 int 16 (irq 11) azalia0: codecs: Realtek ALC268 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 4 int 16 (irq 255) pci1 at ppb0 bus 1 ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 4 int 17 (irq 255) pci2 at ppb1 bus 2 re0 at pci2 dev 0 function 0 "Realtek 8101E" rev 0x02: RTL8102EL (0x2480), apic 4 int 17 (irq 11), address 00:1e:68:a9:6c:b6 rlphy0 at re0 phy 7: RTL8201L 10/100 PHY, rev. 1 ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 4 int 18 (irq 255) pci3 at ppb2 bus 3 ath0 at pci3 dev 0 function 0 "Atheros AR5424" rev 0x01: apic 4 int 18 (irq 11) ath0: AR5424 14.2 phy 7.0 rf 0.0, WOR5_ETSIC, address 00:22:69:02:cf:2e ppb3 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 4 int 19 (irq 255) pci4 at ppb3 bus 4 "JMicron SD/MMC" rev 0x00 at pci4 dev 0 function 0 not configured sdhc0 at pci4 dev 0 function 2 "JMicron SD Host Controller" rev 0x00: apic 4 int 19 (irq 11) sdmmc0 at sdhc0 "JMicron Memory Stick" rev 0x00 at pci4 dev 0 function 3 not configured "JMicron xD" rev 0x00 at pci4 dev 0 function 4 not configured uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 4 int 16 (irq 11) uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 4 int 17 (irq 11) uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 4 int 18 (irq 11) uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 4 int 19 (irq 11) ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 4 int 16 (irq 11) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2 pci5 at ppb4 bus 5 ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 1 drive 0: <P-SSD1800> wd0: 1-sector PIO, LBA, 7695MB, 15761088 sectors wd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4 ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 4 int 17 (irq 11) iic0 at ichiic0 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at ichpcib0 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 spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 mtrr: Pentium Pro MTRR support uvideo0 at uhub0 port 5 configuration 1 interface 0 "SuYin Acer Crystal Eye webcam" rev 2.00/0.01 addr 2 video0 at uvideo0 softraid0 at root root on wd0a swap on wd0b dump on wd0b If I can provide any more useful information please let me know what it is. Cheers, Mark