[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS Alpha System Analysis Tools Manual


Previous Contents Index


SHOW SUMMARY

Displays general information about the Extended File Cache.

Format

SHOW SUMMARY [/STATISTICS]


Parameters

None.

Qualifier

/STATISTICS

Displays read and write activity arranged by I/O size.

Example


SDA> XFC SHOW SUMMARY
XFC Summary
-----------
Extended File Cache V1.0 Let unk I/Os through (Apr 18 2002 15:01:16)
Anchor Block Address:             FFFFFFFF80D30210
Build Id:
Cache State:                      0000A010
Cache in no-cache state:          False
MaxAllowedCacheMode:              eNodeFullXFC
Minimum cache size in Pages:      0001F400 (    128000)

General
-------
Extent Hash Table Address:        FFFFFFFF7F780000
Extent Hash Table Buckets:            524287
File Hash Table Address:          FFFFFFFF7FF80000
File Hash Table Buckets:               32767
Count of private CTXs:                    10
Count of private FKBs:                   403
Count of private DIOBMs:                   3

LRU
---
LRU Priority 0 Queue Address:     FFFFFFFF80D30288
               Queue Length:      00000446 (      1094)
LRU Priority 1 Queue Address:     FFFFFFFF80D30298
               Queue Length:      00000AA5 (      2725)
qhdContexts Address               FFFFFFFF80D302B0
qhdIRPs Address                   FFFFFFFF80D302C0

Spinlock
--------
Cache Spinlock:                   8125E780
  Last Acquiring Module:          ROOT$:[XFC.TMPSRC]XFC_SYS.C;4
       Acquiring Line:            2887
       Acquiring IPL:             0

Cache Tracing
-------------
Number of trace entries:                10000
Size of trace buffer:                  800000
Current trace level:                        4
Lost trace entrys:                          0
Current trace sequence number:         318768

System Wide I/O Statistics since last reset
-------------------------------------------
Time of Last System-Wide Reset:   19-APR-2002 07:10:23.43

Total cache calls:                      4505
Total cache calls:                      4505
 - Sum of Paging I/Os:                  2493
 - and other QIOs:                      2012
 - and NoCVB or PermNoCache QIOs:          0

Total Virtual Reads:                    4197
Total Virtual Writes:                    112
Total PageIOs not cached:                196
Total Logical I/Os:                        0
Total Physical I/Os:                       0
Total bypass write I/Os:                   0

Synchronous I/O completions:             598
Physical I/O completions:                  0
Total PID completion I/Os:                 0

Total num IOs on reserved files:        1606
Total num IOs on global sections:        247
Count of stalls performed:                13

System Wide Read Percentage:           97.40 %
System Wide Cache Hit ratio:           57.90 %

System-Wide Read Statistics since last reset
--------------------------------------------
Virtual Reads:                          4197
  Sum of Read Around Count:              179
  and Read Through Count:               4018
Reads Completed:                        4197
Read Hits:                              2495
Read Cache Hit Percentage:             59.45 %
Total Synch Completion Count:            598
Read Around due to Het. Cluster:           0
Read Around due to Modifiers:              0
Read Around due to Size:                  16
Total reads past EOF:                      1
Total I/Os with read-ahead:              239
Read Hits due to read-ahead:             307
Paging I/Os:                            2493

System-Wide Write Statistics since last reset
---------------------------------------------
Virtual Writes:                          112
  Sum of Write Around Count:               0
  and Write Through Count:               112
Write Around due to Het. Cluster:          0
Writes Completed:                        112
Write Around due to Modifiers:             0
Write Around due to Size:                  0
Total writes past EOF:                     0

File/Volume Statistics
----------------------
Open Files:                              239
Closed Files in the Cache:               164
Number of files truncated:                 3
Volumes in Full XFC Mode:                  0
Volumes in VIOC Compatible Mode:          13
Volumes in No Caching Mode:                1
Volumes in Perm. No Caching Mode:          0
Volume Queue:                     FFFFFFFF80D30238

File/Volume Statistics
----------------------
FAL locks currently held:                370
FAL locks chosen to skip:                  0
FAL locks acquired since boot:           374
FAL locks released since boot:             4
FAL locks converted:                      55

I/Os that have stalled for FAL             0
CACHE$ACCESS stalls for CFB                0
ulStallOpQStalls                           1
Read-thro->Read-around conv.               0
Writes converted to write-around           0
ulLockResourceExhaustionRetries:           0
ulFALLocksEverInContention:                3
ulFALUpConversionRequests:                 3
ulFALLocksConvertedToPR:                   0
ulFALLocksConvertedToNL:                   0
FAL BlkASTs received:                      1
FAL BlkASTs ignored:                       0
ECBs Split Right:                       2229
ECBs Split Left:                        1710
ECBs Split Three Ways:                   786
ECBs Requiring no splits:               5802

Volume Lock Statistics
----------------------
VIL Blocking ASTs received                 0
VIL Blocking ASTs stalled                  0
VIL Blocking ASTs started                  0
VIL Blocking ASTs completed                0
VIL Up-conversion requests made            0
VIL Up-conversion grants                   0
VCML Blocking ASTs received                0
VCML Blocking ASTs stalled                 0
VCML Blocking ASTs started                 0
VCML Blocking ASTs completed               0
VCML Up-conversion requests made           0
VCML Up-conversion grants                  0
Stalls on VCML up-conversion               0
Restarts on VCML up-conversion             0

Quiesce and Depose Statistics
-----------------------------
Quiesce and Depose files Stalled:          0
File Quiesce and Deposes Started:        114
File Quiesce and Deposes Cmpltd:         114
File Quiesce and Deposes Cmpltd:         114
Q&D CTX used count:                        0
Q&D CTX in use:                   False

Most recent Depose time                    0.0005 msec.
Most recent Depose ECB count               0
Maximum Depose time                        0.1125 msec.
Maximum ECBs deposed                       3
Total Depose time                          0.0002 seconds
Total ECBs deposed                         6

Pending Lock Up-conversion Statistics
-------------------------------------
Up-conversions stalled:                    0
Up-conversions started:                    0

      

This example shows the output of detailed statistics and status for the cache.


SHOW TABLES

Displays both the extent hash table (EHT) and the file hash table (FHT).

Format

SHOW TABLES [/ALL][/EXTENT][/FILE][/SUMMARY]


Parameters

None.

Qualifiers

/ALL

Displays the contents of the extent hash table (EHT) and file hash table (FHT). This is the default.

/EXTENT

Displays only the contents of the EHT.

/FILE

Displays only the contents of the FHT.

/SUMMARY

Displays summary information about EHT and FHT.

Description

The SHOW TABLES command outputs information about the two hash tables used by XFC to locate key data structures.

Example


SDA> XFC SHOW TABLES/SUMMARY
Full Map of CFB HashTable
-------------------------
FHT: Contents of 32768 buckets


 0(32366)
 1(401)
 2(1)
Total number of CFBs:    403
Longest chain length:    2
Shortest chain length:   0
Shortest chain length:   0
Average chain length:        0.01


Full Map of PECB HashTable
--------------------------
EHT: verifying 524288 buckets


 0(520501)
 1(3755)
 2(32)
Total number of PECBs:   3819
Longest chain length:    2
Shortest chain length:   0
Average chain length:        0.01
      

This example shows summary output about each of the hash tables.


SHOW TRACE

Displays all or selected portions of the XFC trace buffer, starting with the most recent entry and moving backward in time.

Format

SHOW TRACE [/ALL]/CONTAINING=value |/CPU=cpu-num
|/LINENUMBER=linenumber
|/MATCH [=[AND|OR]] |/Px=value


Parameters

None.

Qualifiers

/ALL

Displays the entire trace buffer. This is the default.

/CONTAINING=value

Displays only records where any of the traced parameters is equal to value.

/CPU=cpu-num

Displays only records from threads executing on CPU cpu-num.

/LINENUMBER=linenumber

Displays only records from tracepoints at line linenumber in the relevant source files.

/MATCH [=AND|OR]

Alters the sense of the match condition when more than one of the filter qualifiers /CPU, /LINENUMBER, /FILENAME, /Px, or /CONTAINING are specified.

/Px=value

Displays only records where one of the traced parameters P1, P2, P3, or P4 is equal to value.

Description

The SHOW TRACE command outputs the contents of each entry in the XFC trace buffer. Currently, detailed XFC tracing is enabled only for debug versions of XFC.

Example


This example shows the output of XFC trace information.


SHOW VOLUME

Displays the contents of a cache volume block (CVB).

Format

SHOW VOLUME [address]/BRIEF|/FULL| /NAME=DISK $volume_label| /STATISTICS


Parameter

address

The address of a CVB. If no address is supplied, then all volumes are displayed.

Qualifiers

/BRIEF

Displays summary information for each volume.

/FULL

Displays a complete list of information about each volume. This is the default.

/NAME=DISK$volume_label

Displays information for the volume with the specified name.

/STATISTICS

Displays the read and write I/O activity for this volume. The /STATISTICS qualifier is incompatible with the /BRIEF qualifier.

Description

The SHOW VOLUME command shows state information and statistics about all volumes mounted on the system.

Examples


This example shows the output derived from invoking the /BRIEF qualifer.


2. SDA> XFC SHOW VOLUME FFFFFFFD831FE080
Cache Volume Block (CVB)
------------------------
Statistics Valid From:   19-APR-2002 07:10:23.54

Name:                  DISK$FRROOG_RUBY
CVB Address:           FFFFFFFD831FE080
Flink:                 FFFFFFFF80D30238
Blink:                 FFFFFFFD831FE300
Volume (VCB):          FFFFFFFF81905100
Unit (UCB):            FFFFFFFF8150F200
Files Queue:           FFFFFFFD831FE0C0
    Flink:               FFFFFFFD83111800
    Blink:               FFFFFFFD831FC0A0
Cached Open Files:            236
Cached Closed Files:          157
Files Ever Opened:            502
Files Ever Deposed:           109
Pages Allocated:             2726
Total QIOs:                  4195
Read Hit Count:              2408
Virtual Read Count:          4085
Virtual Write Count:          110
Read Percentage:               97 %
Hit Rate:                      57 %
Average Overall I/O response time to this Volume
 in milliseconds:             2.1186
Average Cache Hit I/O response time to this Volume
 in milliseconds:             0.0789
Average Disk I/O response time to this Volume
 in milliseconds:             4.8671
Accuracy of I/O resp time:     83 %
Readahead Count:              233
Volume Caching Mode:   evcmVIOCCompatible
Mounted /NOCACHE:      False     VCML Allows Caching:   True
Quiescing:             False     Quiesce in Progress:   False
No Cache from Logio:   False     VIL Blk AST Stall:     False
Flush Pending:         False     VCML Blk AST Stall:    False
VCML Blk CTX Stall:    False     VIL Blk CTX Stall:     False
Dismount Stall:        False     Logio Stall:           False
Flush in Progress:     False     Cluster Trans Stall:   False
Dismount Pending:      False     VIL Up Needed:         False
Tqe In Use:            False     VCML Up Needed:        False
VIL blocking AST CTX:  0000000000000000
VCML blocking AST CTX: 0000000000000000
Dismount Stall CTX:    0000000000000000
LogIO Stall CTX:       0000000000000000
Up conversion CTX:     0000000000000000
VIL lock id:           0100007A
VIL LogIO lock id:     00000000
VCML lock id:          010000FF
VCML LogIO lock id:    00000000
Logical IO safety:     elogioNotSafe
LogIOMutex:            00000000818EB610
Last LogIO time:       00000000
Active I/O count:              0
Stalled Ops Queue:     FFFFFFFD831FE0B0
    Flink:               FFFFFFFD831FE0B0
    Blink:               FFFFFFFD831FE0B0


Volumes found: 1

This example shows the output for a specific cache volume block (CVB).


Chapter 8
SDA Extension Routines

This chapter describes how to write, debug, and invoke an SDA Extension. This chapter also describes the routines available to an SDA Extension.

8.1 Introduction

When analysis of a dump file or a running system requires intimate knowledge of data structures that are not known to the System Dump Analyzer, the functionality of SDA can be extended by the addition of new commands into which the necessary knowledge has been built. Note that in this description, whenever a reference is made to accessing a dump file (ANALYZE/CRASH_DUMP), this also includes accessing memory in the running system (ANALYZE/SYSTEM).

For example, a user-written device driver allocates nonpaged pool and records additional data about the device there (logging different types of I/O, perhaps), and a pointer to the new structure is saved in the device-specific extension of the UCB. After a system crash, the only way to look at the data from SDA is to do the following:

  • Invoke the SDA command DEFINE to define a new symbol (for example, UCB$L_FOOBAR) whose value is the offset in the UCB of the pointer to the new structure.
  • Invoke the SDA commands "SHOW DEVICE <device>" and "FORMAT UCB" to obtain the address of the nonpaged pool structure.
  • Invoke the SDA command "EXAMINE <address>;<length>" to display the contents of the data in the new nonpaged pool structure as a series of hexadecimal longwords.
  • Decode manually the contents of the data structure from this hexadecimal dump.

An SDA extension that knows the layout of the nonpaged pool structure, and where to find the pointer to it in the UCB, could output the data in a formatted display that alerts the user to unexpected data patterns.

8.2 General Description

The following discussion uses an example of an SDA extension that invokes the MBX command to output a formatted display of the status of the mailbox devices in the system. The source file, MBX$SDA.C, is provided in SYS$EXAMPLES.

An SDA extension consists of a shareable image, in this case MBX$SDA.EXE, either located in the directory SYS$LIBRARY or found by translating the logical name MBX$SDA. It contains two universal symbols: SDA$EXTEND, the entry point; and SDA$EXTEND_VERSION, the address of a longword that contains the version of the interface used (in the format of major/minor ident), which allows SDA to confirm it has activated a compatible extension. The image contains at least two modules: MBX$SDA, the user-written module that defines the two symbols and provides the code and data necessary to produce the desired formatted output; and SDA_EXTEND_VECTOR, which provides jackets for all of the callable SDA routines, and is found in SYS$LIBRARY:VMS$VOLATILE_PRIVATE_INTERFACES.OLB. The user-written portion can be split into multiple modules.

Whenever SDA receives an unrecognized command, like "SDA> MBX", it attempts to activate the shareable image MBX$SDA at the SDA$EXTEND entry point. If you choose a command name that matches the abbreviation of an existing command, SDA can be forced to activate the extension using the "DO" command. For example, if you had an SDA extension called VAL$SDA, you could not activate it with a command like "SDA> VAL" as SDA would interpret that as an abbreviation of its VALIDATE command. But VAL$SDA can be activated by issuing "SDA> DO VAL".

With or without the "DO" prefix, the rest of the command line is passed to the extension; it is up to the extension to parse it. The example extension MBX$SDA includes support for commands of the form "SDA> MBX SUMMARY" and "SDA> MBX <address>" to demonstrate this. If the extension is invoked with no arguments, it should do no more than display a simple announcement message, or prompt for input. This assists in the debugging of the extension, as described in Section 8.4.

8.3 Detailed Description

This section describes how to compile, link, and invoke an SDA extension. It also describes the contents of an SDA extension.

8.3.1 Compiling and Linking an SDA Extension

The user-written module is only supported when written in Compaq C (minimum Version 5.2), following the pattern of the example extension, MBX$SDA.C. It should be compiled and linked using commands of the following form:


$cc mbx$sda + alpha$library:sys$lib_c /library
$link /share -
                mbx$sda.obj, -
                alpha$library:vms$volatile_private_interfaces /library, -
                sys$input /option
        symbol_vector = (sda$extend=procedure)
        symbol_vector = (sda$extend_version=data)

Note

1. You can include the qualifier /INSTRUCTION=NOFLOAT on the compile command line if floating-point instructions are not needed.

2. The + ALPHA$LIBRARY:SYS$LIB_C /LIBRARY is not needed on the compile command line if the logical name DECC$TEXT_LIBRARY is defined and translates to ALPHA$LIBRARY:SYS$LIB_C.TLB.

3. If the user-written extension needs to signal SDA condition codes, or output their text with $PUTMSG, you should add the qualifier /INCLUDE=SDAMSG to the parameter ALPHA$LIBRARY:VMS$VOLATILE_PRIVATE_INTERFACES /LIBRARY .

8.3.2 Invoking an SDA Extension

You can invoke the SDA extension as follows:


$define mbx$sda sys$disk:[]mbx$sda
$analyze /system
SDA>mbx summary
SDA>mbx <address>

8.3.3 Contents of an SDA Extension

At a minimum, the user-written module must contain:

  • #include statements for DESCRIP.H and SDA_ROUTINES.H
  • The global variable SDA$EXTEND_VERSION, initialized as follows:


            int sda$extend_version = SDA_FLAGS$K_VERSION;
    
  • The routine SDA$EXTEND (prototype follows)

Optionally, the user-written module may also contain the statement:


        #define __NEW_STARLET

You should use this option because it provides type checking of function arguments and gives consistency in casing and naming conventions.

The entry point in the user-written module, SDA$EXTEND, is called as a routine with three arguments and no return value. The declaration is as follows:


        void sda$extend (
                int *transfer_table,
                struct dsc$descriptor_s *cmd_line,
                SDA_FLAGS sda_flags)

The arguments in this code example have the following meanings:

Line of Code Meaning
transfer_table Address of the vector table in the base image. The user-written routine SDA$EXTEND must copy this to SDA$EXTEND_VECTOR_TABLE_ADDR before any SDA routines can be called.
cmd_line Address of the descriptor of the command line as entered by the user, less the name of the extension. So, if you enter "SDA> MBX" or "SDA> DO MBX", the command line is a zero length string. If you enter the command "SDA> MBX 80102030", the command line is " 80102030" (the separating space is not stripped).
sda_flags Definition for the following four bits in this structure:
Bit Meaning
sda_flags.sda_flags$v_override Indicates SDA has been activated with the ANALYZE/CRASH_DUMP/OVERRIDE command
sda_flags.sda_flags$v_current Indicates SDA has been activated with the ANALYZE/SYSTEM command
sda_flags.sda_flags$v_target Indicates that SDA was invoked from the kept debugger during an SCD or SDD session or when analyzing a process dump
sda_flags.sda_flags$v_process Indicates SDA was activated with the ANALYZE/CRASH_DUMP command to analyze a process dump
No bits set Indicates SDA was activated with the ANALYZE/CRASH_DUMP command to analyze a system dump

The first executable statement of the routine must be to copy TRANSFER_TABLE to SDA$VECTOR_TABLE (which is declared in SDA_ROUTINES.H):


        sda$vector_table = transfer_table;

If this is not done, you cannot call any of the routines described below. Any attempts to call the routines receive a status return of SDA$_VECNOTINIT. (For routines defined not to return a status, this value can be found only by examining R0.)

The next statement should be one to establish a condition handler, as it is often difficult to track down errors in extensions such as access violations because the extension is activated dynamically with LIB$FIND_IMAGE_SYMBOL. A default condition handler, SDA$COND_HANDLER, is provided that outputs the following information in the event of an error:

  • The error condition
  • The VMS version
  • A list of activated images, with start and end virtual addresses
  • The signal array and register dump
  • The current call frame chain

You can establish this condition handler as follows:



        lib$establish (sda$cond_handler);

Note

The error condition, signal array, and register dump are output directly to SYS$OUTPUT and/or SYS$ERROR, and are not affected by the use of the SDA commands SET OUTPUT and SET LOG.

Thus, a minimal extension would be:


        #define __NEW_STARLET 1
        #include <descrip.h>
        #include <sda_routines.h>

        int sda$extend_version = SDA_FLAGS$K_VERSION;

        void sda$extend (int *transfer_table,
                         struct dsc$descriptor_s *cmd_line,
                         SDA_FLAGS sda_flags)
          {
          sda$vector_table = transfer_table;
          lib$establish (sda$cond_handler);

          sda$print ("hello, world");
          return;
          }


Previous Next Contents Index