Subject: Re: envstat -s sensor -d device
To: Iain Hibbert <plunky@rya-online.net>
From: Juan RP <juan@xtrarom.org>
List: tech-userlevel
Date: 09/24/2007 11:16:23
On Sun, 23 Sep 2007 18:54:46 +0100 (BST)
Iain Hibbert <plunky@rya-online.net> wrote:

> is the output format of envstat something that we may need to provide
> compatibility for?

Yes, this is one reason.

> > acpibat0
> >   charge: 4.500Ah (100%)
> >   state:  NORMAL
> > acpibat1:
> >   charge: 0.240Ah (3.2%)
> >   state:  CRITICAL
> >
> > I don't have any preference... if we agree that one of them should
> > be used I'll adapt the code.
> 
> I prefer the second, since it also separates sensors into groups?

I've implemented it, this is the output with three registered drivers
(aiboost(4), the envsys2 LKM and lm(4)):

$ ./envstat -I     
[aiboost0]
  CPU Temperature:     35.000 degC  max:   70.000 degC  min:   15.000 degC
   MB Temperature:     40.000 degC  max:   50.000 degC  min:   15.000 degC
    Vcore Voltage:      1.264 V     max:    1.350 V     min:    1.150 V
     +3.3 Voltage:      3.264 V     max:    3.500 V     min:    3.000 V
       +5 Voltage:      4.992 V     max:    5.600 V     min:    4.500 V
      +12 Voltage:     11.985 V     max:   13.500 V     min:   11.200 V
    CPU FAN Speed:       1268 RPM

[envsys2]
           CPU Temp:     38.000 degC
            CPU Fan:       2560 RPM
              VCore:      1.232 V
   External Voltage:    223.200 VAC
   VCore Resistance:     12.000 Ohms
      Current power:     30.000 W
    Current potency:      0.500 A
  Battery0 capacity:      2.420 Wh (62.16%)
     Battery0 state:     NORMAL
  Battery1 capacity:      1.890 Ah (47.25%)
     Battery1 state:   CRITICAL
          Power Led:         ON
         Technology:       2007
        Master disk: drive is online

[lm0]
            VCore:      1.272 V
             +12V:     11.986 V
             AVCC:      3.264 V
            +3.3V:      3.248 V
             VIN1:    -46.352 V
              +5V:      4.992 V
             VIN3:      1.416 V
          +3.3VSB:      3.264 V
             VBAT:      1.864 V
   MB Temperature:     40.000 degC
  CPU Temperature:     35.000 degC
         Aux Temp:     19.000 degC
          CPU Fan:       1288 RPM

$

Is this ok for you?

-- 
Juan Romero Pardines	- The NetBSD Project
http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish