Dan Sugalski <[EMAIL PROTECTED]> wrote:
>>On a DS20E, VMS7.2-1:
>>
>>$ write sys$output f$getsyi("thermal_vector")
>>FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01
>>$
>>
>>On an ES40, VMS7.2-1:
>>
>>$ write sys$output f$getsyi("thermal_vector")
>>FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
>>$
>>
>>Neither of these seems useful...
>
>They aren't. You've apparently got a set of systems without the on-chip 
>temperature thingies.

The ES40 is indicating that it doesn't do the thermal vector, but
the DS20E's response is providing information.

The thermal vector (as they all are) is read in bytes, starting at
the rightmost two hex digits for the first sensor. The possible values
for these are:

SYI$K_ENV_STATUS_FAILED = 0
SYI$K_ENV_STATUS_OK = 1
SYI$K_ENV_STATUS_UNKNOWN = 254
SYI$K_ENV_STATUS_NOT_PRESENT = 255

So the DS20E aparently has one temperature sensor that has a status of OK.
All of the other possible values are 255, so there is no corresponding
sensor. This is all the information you can get from the thermal_vector.

You should check the temperature_vector for the same DS20E. The
corresponding pair of hex digits (i.e. rightmost two) should be the
temperatur in degrees centigrade (unless it is 00, 01, FE, or FF - the
meaning of a 01 in this case is not clear since if it is OK it should
give you a real temperature value and it is highly unlikely that you are
running at 1 degree centigrade).

An XP900/DS10, for example, returns one temperature ("temperature_vector"),
one thermal status ("thermal_vector"), two fan statuses ("fan_vector"),
and a power supply status ("power_vector"). Since I know how many it
returns, I have a DCL proceedure that extracts the relevant info via
things like:
$ temp_c = %X'F$Extract(30,2,temp_vec)'
$ If (temp_c .LE. 1) .OR. (temp_c .GE. %xFE)
$ Then
$  If temp_c .EQ. 0 Then $ say "Temperature status = failed"
$  If temp_c .EQ. 1 Then $ say -
                "Temperature stats = OK (the meaning of which is not clear) "
$  If temp_c .EQ. %xFE Then $ say "Temperature unknown"
$  If temp_c .EQ. %xFF Then $ say "Temperature data not present"
$  say "The full vector: ''temp_vec'"
$  Exit
$ EndIf
$ temp_f = temp_c*9/5+32

This sort of thing allows me to run a .com file and get output like:
Temperature = 102°F (39°C) (thermal = good)
Fan 1 = good
Fan 2 = good
Power = good

(From which I have learned that the usual operating range of temperatures
for wherever the sensor is located in the system is 37 to 39 degrees C.)

It is a SMOP to go from hard-wired F$Extracts to looping through each pair
of hex digits in the text string, converting them to numbers, and checking
to see if they are present or not and reporting those that are present. At
least one such DCL proceedure has been posted on comp.os.vms in the past.

How to find out if you can access the data other than trying and checking
the status? 

>From SYS$SMHANDLER_STARTUP.COM:
$ ! 1) If called by the startup process, this command procedure starts the
$ ! server management driver and recursive entry to this procedure from a
$ ! detached process.  This done only on platforms which implement the
$ ! environmental event machine check handler.  Platform indicate support for
$ ! environmental event machine check handler by setting bit 5 in
$ ! EXE$GL_CRD_CONTROL at bootstrap in platform specific code in
$ ! SYS$CPU_ROUTINES_xxyy.EXE.  This method avoids further maintenance of this
$ ! procedure for new platforms.

So you can get this info by checking bit 5 of EXE$GL_CRD_CONTROL. You can
do this from DCL via somthing along the lines of:

$ If ((F$GETSYI("CRD_CONTROL") .AND. %X20) .NE. 0) Then $ does_vectors := true

--- Carl

Reply via email to