Copyright Digital Equipment Corp. All rights reserved.

Examples

   1.$  ERR = F$GETDVI("_DQA0","ERRCNT")
     $ SHOW SYMBOL ERR
       ERR = 0  Hex = 00000000 Octal = 000000

     This example shows how to use the F$GETDVI function to return
     an error count for the device DQA0. You must place quotation
     marks (" ")  around the device name DQA0 and the item ERRCNT
     because they are string literals.

   2.$  LIBRARY/EXTRACT=$DCDEF/OUTPUT=$DCDEF.TXT SYS$LIBRARY:STARLET.MLB

     This example shows how to create a file, $DCDEF.TXT, containing
     a list of values for device types and device classes from
     the STARLET library. The device classes begin with 'DC$', and
     device types begin with 'DT$'.

     Note that most modern SCSI disks and tapes return the generic
     DEVTYPE code (DT$_GENERIC_DK or DT$_GENERIC_MK), therefore you
     should use the DEVICE_TYPE_NAME item:

       $ X=F$GETDVI("XDELTA$DKA0:","DEVICE_TYPE_NAME")
       $ SHOW SYMBOL X
         X = "RZ29B"

   3.$  WRITE SYS$OUTPUT F$GETDVI ( "$1$DGA30", "PATH_SWITCH_TO_TIME", -
     _$  "PGA0.5000-1FE1-0001=5782" )
     19-MAY-2006 14:47:41.77

     This example shows the use of the optional path name parameter
     for F$GETDVI. If a path is not specified, information for the
     multipath current path is returned. To determine the paths for
     a multipath device, use the F$MULTIPATH lexical function.

   4.$ SSD_USAGE_REMAINING = F$GETDVI("DKA100:","SSD_USAGE_REMAINING")
     $ SHOW SYMBOL SSD_USAGE_REMAINING
       SSD_USAGE_REMAINING = 100   Hex = 00000064  Octal = 00000000144
     $ SSD_LIFE_REMAINING = F$GETDVI("DKA100:","SSD_LIFE_REMAINING")
     $ SHOW SYMBOL SSD_LIFE_REMAINING
       SSD_LIFE_REMAINING = 610372 Hex = 00095044  Octal = 00002250104

     This example shows how to use the F$GETDVI function to return the
     wear out gas gauge data for the Solid State Drive (SSD) connected
     to a node in the Host Bus Adapters (HBA) mode and returns "-1" for
     other disks.

     SSD_USAGE_REMAINING - Reports in percentage the remaining life
                           of SSD available for use.

     SSD_LIFE_REMAINING  - Estimates the remaining life, in days, of
                           the SSD drive based on its percent usage
                           remaining.

     Note: The return value of SSD_USAGE_REMAINING "0" indicates that
     the device is worn out; it cannot accept any more writes and requires
     replacement. The estimated wear out information is based on the
     workload the device is running and the calculation is based on the
     endurance usage reported by VSI SSD drives.