tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysmon_envsys ENVSYS_INDICATOR state change reports

On Sun, Aug 26, 2012 at 12:24:33PM -0700, Paul Goyette wrote:
> >So we can't mention if a value is critical or not ?
> Not currently.

How hard would it be to change that ?

> >[...]
> >Well, in the case of the BBU it would be better to display good or bad.
> >ABSENT would be misleading, becase what we really want to report
> >is that the BBU is present but bad.
> I'm sure we could come up with dozens of pairs of values, GOOD/BAD,

I would exclude CRITICAL/NORMAL from the list: there is another
flag (ENVSYS_SCRITICAL) to say if a sensor is in critical condition,
regardless of its value. I guess we can just let the driver set it,
in addition to the boolean value.

> >>An easy alternative would simply to mark the sensor as an INTEGER,
> >>and only assign it values of 0 or 1.  Changes in INTEGER values can
> >>be reported.
> >
> >But then what would envstat report ?
> It would just show the integer value 0 or 1.  You can see an example
> using swsensor(4):
>       modload -s type=Integer swsensor
>       envstat -d swsensor
>       modunload swsensor

I fear this would be more confusing to user than the current
TRUE/FALSE report.

> >
> >I think we need a general-purpose boolean sensor.
> It seems that envstat(8) already thinks that INDICATOR is a boolean.
> It reports values of TRUE and FALSE.
> It would be fairly easy to report changes in INDICATOR sensors, it's
> just a matter of what words to use in the reports!

I guess TRUE/FALSE would be good enough.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index