Subject: Re: bin/36458 ("envstat -r" doesn't show what "envstat" shows)
To: None <,,>
From: Greg A. Woods <>
List: netbsd-bugs
Date: 07/03/2007 18:55:02
The following reply was made to PR bin/36458; it has been noted by GNATS.

From: "Greg A. Woods" <>
Cc: <>
Subject: Re: bin/36458 ("envstat -r" doesn't show what "envstat" shows)
Date: Tue, 03 Jul 2007 14:52:36 -0400

 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 At Tue,  3 Jul 2007 18:30:02 +0000 (UTC), Juan RP wrote:
 Subject: Re: bin/36458 ("envstat -r" doesn't show what "envstat" shows)
 >  I agree that envstat should show the same sensors in column and row mode.
 Well that is exactly what my fix does for me on my systems.
 >  You are confusing Indicator sensors with other kind of sensors. As I
 >  explained you before, Indicator sensors are there when something is
 >  enabled or in 'on' state, if they are disabled there's no need to show
 >  them.
 Actually that's not my problem or my confusion.  :-)
 If a single indicator sensor actually shows up as two separate sensors,
 each with their own unique value (say a binary value), then it's not
 really the job of envsys(4) or envstat(8) to try to collapse them back
 into one again.
 I want to see them both, even if they're logically one.  I want to see
 all sensors, even if they are being reported as having invalid values.
 What if you have a tri-state (or more) indicator that shows up as three
 (or more) separate sensors, each being given a binary value, then you
 still really need to show them all.  If all but one are marked as having
 invalid values then give those a display indicating they have an invalid
 value.  IIUC that's what my fix does.
 Don't try to make up for design flaws in the hardware or firmware (or
 even an underlying driver)!  :-)
 In the case of acpiacad(4), it would depend on whether or not the
 multi-faced sensor is being presented to the driver by the hardware or
 firmware, or if the driver itself if manufacturing both facets.  If the
 latter then it can be fixed, if not then some people will just have to
 live with the fact that some hardware and/or firmware has a less than
 optimal design.
 On my Dell PE2650, with my patch, this is what I see.  The only thing
 that doesn't really make sense is why both power supplies are listed as
 "OFF".  (The front bezel is not attached, so its intrusion detector
 should probably be "ON" too, though maybe the firmware senses whether it
 was attached at power up and only gives it a valid value if it was
 initially attached.)
 # envstat -r
      BP Top Temp:          *
   BP Bottom Temp:          *
   ESM Riser Temp:     36.000 degC
   ESM CPU 2 Temp:     52.000 degC
   ESM CPU 1 Temp:     56.000 degC
 ESM Frt I/O Temp:     30.000 degC
  ESM MB Fan7 RPM:       7440 RPM
  ESM MB Fan4 RPM:       7440 RPM
  ESM MB Fan3 RPM:       7620 RPM
  ESM MB Fan2 RPM:       5100 RPM
  ESM MB Fan1 RPM:       4920 RPM
  Term Pwr SCSI B:          *
  Term Pwr SCSI A:          *
          BP 3.3V:          *
           BP 12V:          *
            BP 5V:          *
     ESM VTT Volt:      1.340 V
 ESM GB1 1.4 Volt:      1.430 V
 ESM GB0 1.4 Volt:      1.450 V
 ESM GB1 1.8 Volt:      1.830 V
 ESM GB0 1.8 Volt:      1.824 V
 ESM ROMB PK Volt:      3.840 V
   ESM 5 AUX Volt:      5.136 V
 ESM GB1 2.5 Volt:      2.556 V
 ESM GB0 2.5 Volt:      2.556 V
  ESM MB 2.5 Volt:      2.676 V
  ESM MB -12 Volt:    -11.968 V
  ESM MB +12 Volt:     11.904 V
     ESM CPU Volt:      1.427 V
    ESM MB 5 Volt:      5.018 V
  ESM MB 3.3 Volt:      3.320 V
  ESM 3.3 FP Volt:      3.268 V
  ESM MB Bat Volt:      3.184 V
  Bezel Intrusion:          *
  Cover Intrusion:         ON
 Power Supply - 2:        OFF
 Power Supply - 1:        OFF
 As you can (hopefully) see the un-modified column mode code shows the
 same list (what a mess):
 # envstat=20
       BP Top Temp   BP Bottom Temp   ESM Riser Temp   ESM CPU 2 Temp   ESM =
 CPU 1 Temp ESM Frt I/O Temp  ESM MB Fan7 RPM  ESM MB Fan4 RPM  ESM MB Fan3 =
 RPM  ESM MB Fan2 RPM  ESM MB Fan1 RPM  Term Pwr SCSI B  Term Pwr SCSI A    =
       BP 3.3V           BP 12V            BP 5V     ESM VTT Volt ESM GB1 1.=
 4 Volt ESM GB0 1.4 Volt ESM GB1 1.8 Volt ESM GB0 1.8 Volt ESM ROMB PK Volt =
   ESM 5 AUX Volt ESM GB1 2.5 Volt ESM GB0 2.5 Volt  ESM MB 2.5 Volt  ESM MB=
  -12 Volt  ESM MB +12 Volt     ESM CPU Volt    ESM MB 5 Volt  ESM MB 3.3 Vo=
 lt  ESM 3.3 FP Volt  ESM MB Bat Volt  Bezel Intrusion  Cover Intrusion Powe=
 r Supply - 2 Power Supply - 1
              degC             degC             degC             degC       =
       degC             degC              RPM              RPM              =
 RPM              RPM              RPM                V                V    =
             V                V                V                V           =
      V                V                V                V                V =
                V                V                V                V        =
         V                V                V                V               =
  V                V                V             bool             bool     =
         bool             bool
                 *                *            36.00            52.00       =
      56.00            30.00             7380             7440             7=
 620             5100             4920                *                *    =
             *                *                *             1.34           =
   1.43             1.45             1.83             1.82             3.84 =
             5.14             2.56             2.56             2.68        =
    -11.97            11.90             1.43             5.02             3.=
 32             3.27             3.18                *               ON     =
          OFF              OFF
 Hmmm...  that reminds me....  the row mode should probably show the
 value type for _ALL_ sensors, not just non-boolean ones.
 						Greg A. Woods
 H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <>
 Planix, Inc. <>       Secrets of the Weird <>
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 Version: PGPfreeware 5.0i for non-commercial use
 MessageID: ZLQQlgEOvnvOm0I2htojMLG4NdYABM02