On 26 February 2016 at 08:40, lilit-aibolit <lilit-aibo...@mail.ru> wrote: > I've tried to change low=1:high=2 to low=0:high=0 > but I haven't got *Off* current state for this sensor from sensord: > > - hw.sensors.upd0.indicator2=On (ACPresent), OK > > Even for AC disconnected sensord repors that ACPresent is *On*, > however when I look for > > - sysctl hw.sensors.upd0.indicator2 > > it repororts that ACPresent is *Off*, so I decided don't rely > on sensord logic and place own script to cron and execute it > every minute.
The `indicator` changes between On/Off with a user limit of `low=0:high=0` should definitely be triggered as reported by the prior users (http://marc.info/?l=openbsd-misc&m=144526769005460&w=2). http://BXR.SU/OpenBSD/usr.sbin/sensorsd/sensorsd.c#check_sdlim 370 if (sensor.flags & SENSOR_FINVALID) 371 newustatus = SENSORSD_S_INVALID; 372 else if (sensor.value > limit->upper) 373 newustatus = SENSORSD_S_ABOVE; 374 else if (sensor.value < limit->lower) 375 newustatus = SENSORSD_S_BELOW; 376 else 377 newustatus = SENSORSD_S_WITHIN; However, notice that all status changes are subject to dampening -- the default check period is 20 seconds (http://BXR.SU/OpenBSD/usr.sbin/sensorsd/sensorsd.c#check_period, e.g., `sensorsd` is equivalent to `sensorsd -c20`), and it takes 3 cycles for the value to stuck in. E.g., if the status does not consistently stay the same for about a minute by default, then it is simply discarded and not taken seriously. Most Hardware Monitor drivers in OpenBSD update their sensors every 5 seconds (regardless of whether anyone's reading them or not), so, you might as well check them more often as well, yet still have the dampening: % fgrep sensorsd /etc/rc.conf.local sensorsd_flags=-c5 As for upd(4), the updates are done every 6 seconds, for whichever reason: http://BXR.SU/OpenBSD/sys/dev/usb/upd.c#upd_attach, 210 sc->sc_sensortask = sensor_task_register(sc, upd_refresh, 6); So, if you want a faster notice, but without giving up the dampening, you might want to run your sensorsd with `-c6`, for example. Cheers, Constantine.