VMS Help  —  RMU72  Show  Locks
    Displays current information about the OpenVMS locks database on
    your node. It provides information concerning lock activity and
    contention for all active databases.

1  –  Description

    In a clustered environment, the RMU Show Locks command displays
    detailed lock information for your current node and may display
    information about known remote locks.

    The RMU Show Locks command displays information about process
    locks for all active databases on a specific node. A process
    requesting a lock can have one of three states: owning, blocking,
    or waiting. A process is considered to be owning when the lock
    request is granted. A process is considered to be blocking when
    the lock request is granted and its mode is incompatible with
    other waiting locks. A process is considered to be waiting when
    it is prevented from being granted a lock due to the presence
    of other granted locks whose modes are incompatible with the
    process' requested mode.

    Using the RMU/SHOW LOCKS command can be difficult on systems
    with multiple open databases due to the amount of output and
    difficulty in determining what database a particular lock
    references. The RMU/SHOW LOCKS command, when supplied with a
    root file specification, can be used to additionally filter
    lock displays to a specific database. Note that in some cases
    the RMU/SHOW LOCKS command may be unable to filter locks prior
    to display. And when using the database "LOCK PARTITIONING IS
    ENABLED" feature for a database, the RMU/SHOW LOCKS command with
    a root file specification will be unable to associate area, page,
    and record locks with the specified database because the database
    lock is not the lock tree root for these lock types.

    The values for the Mode qualifier: Blocking and Waiting, can be
    combined with the Process and Lock qualifiers to indicate which
    of the following types of information is displayed:

    o  If the Blocking option is specified, information is displayed
       about processes whose locks are blocking other processes'
       locks.

    o  If the Waiting option is specified, information is displayed
       about processes whose locks are waiting for other processes'
       locks.

    o  If the Process qualifier is specified, information is
       displayed for a specified list of processes.

    o  If the Lock qualifier is specified, information is displayed
       for a specified list of locks. When no qualifiers are
       specified, a list of all active locks in the OpenVMS locks
       database is displayed.

    Use the qualifiers individually or in combination to display the
    required output. See Lock Qualifier Combinations for all possible
    qualifier combinations and the types of output they produce.
    If you do not specify any qualifiers, a complete list of locks
    is displayed. The volume of information from this report can
    be quite large. Therefore, you should use the Output qualifier
    to direct output to a file, instead of allowing the output
    to display to SYS$OUTPUT. Each output contains a heading that
    indicates what qualifiers, if any, were used to generate the
    output.

    Table 16 Lock Qualifier Combinations

              Mode           Option
    Object    Argument       Argument      Output

    Process                                Locks for the specified
                                           processes
    Process   Blocking                     Processes blocking the
                                           specified processes
    Process   Waiting                      Processes waiting for the
                                           specified processes
    Process                  All           Process locks for the
                                           specified processes
    Process                  Full          Special process locks for
                                           the specified processes
    Process   Blocking,                    Processes blocking and
              Waiting                      waiting for the specified
                                           processes
    Process   Blocking       Full          Special process locks
                                           blocking the specified
                                           processes
    Process   Waiting        Full          Special process locks
                                           waiting for the specified
                                           processes
    Process   Blocking,      Full          Special process locks
              Waiting                      blocking and waiting for
                                           the specified processes
    Process                  All, Full     Process and special
                                           process locks for the
                                           specified processes
    Lock                                   Locks for the specified
                                           locks
    Lock      Blocking                     Processes blocking the
                                           specified locks
    Lock      Waiting                      Processes waiting for the
                                           specified locks
    Lock                     Full          Special process locks for
                                           the specified locks
    Lock      Blocking       Full          Special process locks
                                           blocking the specified
                                           locks
    Lock      Waiting        Full          Special process locks
                                           waiting for the specified
                                           locks
    Lock      Blocking,                    Processes blocking and
              Waiting                      waiting for the specified
                                           locks
    Lock      Blocking,      Full          Special process locks
              Waiting                      blocking and waiting for
                                           the specified locks
              Blocking                     Lock requests that are
                                           blocked
              Waiting                      Lock requests that are
                                           waiting
              Blocking,                    Lock requests that are
              Waiting                      blocking and waiting
    Process                                Locks for specified
    Lock                                   processes and locks
    Process   Blocking                     Processes blocking the
    Lock                                   specified processes and
                                           locks
    Process   Waiting                      Processes waiting for the
    Lock                                   specified processes and
                                           locks
    Process   Blocking,                    Processes blocking and
    Lock      Waiting                      waiting for the specified
                                           processes and locks
    Process   Blocking       Full          Special process locks
    Lock                                   blocking the specified
                                           processes and locks
    Process   Waiting        Full          Special process locks
    Lock                                   waiting for the specified
                                           processes and locks
    Process                  All           Process locks for the
    Lock                                   specified processes and
                                           locks
    Process                  Full          Special process locks for
    Lock                                   the specified processes
                                           and locks
    Process   Blocking       Full          Special process locks
    Lock                                   blocking the specified
                                           processes and locks
    Process                  All, Full     Process and special
    Lock                                   process locks for the
                                           specified processes and
                                           locks

    You can display only those processes that you have privilege to
    access. Furthermore, certain special database processes are not
    displayed, unless you specifically indicate that all processes
    are to be displayed. The report heading indicates what qualifiers
    were used to generate the output.

2  –  Format

  (B)0    RMU/Show Locks [root-file-spec]

      Command Qualifiers                       x Defaults
                                               x
      /Lock = lock-list                        x None
      /Mode = (mode-list)                      x None
      /Options = (option-list)                 x See description
      /Output[=file-name]                      x /Output=SYS$OUTPUT
      /Process = process-list                  x None
      /Resource-type=resource-type-list        x None

3  –  Parameters

3.1  –  root-file-spec

    The root file specification of the database for which you want to
    filter lock displays. Optional parameter.

4  –  Command Qualifiers

4.1  –  Lock

    Lock=lock-list

    Displays information for each of the specified locks. When
    combined with the Mode=Blocking qualifier, the Lock qualifier
    displays information about processes whose locks are blocking the
    specified locks. When combined with the Mode=Waiting qualifier,
    the Lock qualifier displays information about processes whose
    lock requests are waiting for the specified locks.

    One or more locks can be specified; if more than one lock is
    specified, they must be enclosed in parentheses and separated
    by commas. The lock identifier is an 8-digit hexadecimal number,
    and must be local to the node on which the RMU Show Locks command
    is issued. To see the lock identifier upon which a process is
    waiting, you can do either of the following:

    o  Invoke the character cell Performance Monitor "Stall Messages"
       display.

    o  Invoke the Performance Monitor from your PC and select
       Displays 

4.2  –  Mode

    Mode=(mode-list)

    Indicates the lock mode to be displayed. If you specify more than
    one option in the mode-list, you must separate the options with
    a comma, and enclose the mode-list in parentheses. The following
    lock mode options are available:

    o  Blocking

       Displays the set of processes whose locks are blocking the
       lock requests of other processes. A process is considered
       to be waiting when it has requested a lock mode that is
       incompatible with existing granted lock modes; in this case,
       the requestor is the waiting process and the grantors are the
       blocking processes.

       The first line of output identifies a process that is waiting
       for a lock request to be granted. All subsequent lines of
       output identify those processes that are preventing the
       lock request from being granted. When multiple processes
       are waiting for the same lock resource, multiple sets of
       process-specific information, one for each waiting process,
       are displayed.

    o  Culprit

       Displays the set of locks for processes that are blocking
       other processes but are themselves not locked. The output
       represents the processes that are the source of database
       stalls and performance degradation.

    o  Waiting

       Displays the set of processes whose lock requests are waiting
       due to incompatible granted locks for other processes. A
       process is considered to be blocking others when it has been
       granted a lock mode that is incompatible with requested lock
       modes; in this case, the "Blocker" is the blocking process and
       the "Waiting" are the waiting processes.

       A requesting process can appear to be waiting for other
       lock requestors. This condition occurs when there are many
       processes waiting on the same lock resource. Depending upon
       the sequence of processes in the wait queue, certain waiting
       processes appear to be blocking other waiting processes
       because, eventually, they will be granted the lock first.

       The first line of output identifies a process that has been
       granted a lock on a resource. All subsequent lines of output
       identify those processes that are waiting for lock requests on
       the same resource to be granted. When multiple processes are
       blocking the same lock resource, multiple sets of process-
       specific information, one for each blocking process, are
       displayed.

4.3  –  Options

    Options=(option-list)

    Indicates the type of information and the level of detail the
    output will include. If you do not specify the Options qualifier,
    the default output is displayed. If you specify more than one
    type of output for the Options qualifier, you must separate
    the options with a comma, and enclose the options list within
    parentheses. The following options are available:

    o  All

       Used when you want the complete list of process locks; by
       default, lock information for only the specified process is
       displayed. When you specify the All option, information is
       displayed for all other processes that have a need to know
       the lock held by the specific process. This method is an easy
       way to display all of a process' locks and to see what other
       processes are also using the same resource.

       If the Mode qualifier is specified, the Options=(All)
       qualifier is ignored.

    o  Full

       Indicates that special database processes are to be displayed.
       Some special database processes, such as monitors, perform
       work on behalf of a database. These database processes
       frequently request locks that by design conflict with other
       processes' locks; the granting of these locks indicates an
       important database event.

       By default, these special database processes are not displayed
       because they increase the size of the output.

4.4  –  Output

    Output[=file-name]

    Specifies the name of the file where output is sent. The default
    is SYS$OUTPUT. The default output file extension is .lis, if you
    specify only a file name.

4.5  –  Process

    Process=process-list

    Displays information for each lock held or requested by the
    specified processes when used by itself. When the Process
    qualifier is combined with the Mode=Blocking qualifier,
    information is displayed about processes whose locks are blocking
    lock requests by the specified waiting processes.

                                   NOTE

       When the Process qualifier is specified without any Options
       qualifier values, all locks for the processes are displayed,
       including owning, blocking, and waiting locks.

    One or more processes can be specified; if more than one process
    is specified, they must be enclosed within parentheses and
    separated by commas. The process identifier is an 8-digit
    hexadecimal number, and must be local to the node on which the
    RMU Show Locks command is issued. The process ID must include all
    eight characters; the node identifier portion of the process ID
    cannot be excluded. To get more information, use the Options=All
    qualifier to display all users using processes' locks.

4.6  –  Resource type

    Resource_type=resource-type-list

    Displays information for each lock held or requested by the
    specified resource type. Only the specific resource types will
    be displayed. This permits, for example, only PAGE or RECORD lock
    types to be selected.

    One or more resouce types can be specified; if more than one
    type is specified, they must be enclosed within parentheses and
    separated by commas.

    The following keywords are allowed with the Resource_type
    qualifier.

    Table 17 RESOURCE_TYPE Keywords

    Internal
    Lock Type
    Name           Keyword(s)

    ACCESS         ACCESS
    ACTIVE         ACTIVE
    AIJDB          AIJDB
    AIJFB          AIJFB
    AIJHWM         AIJHWM, AIJ_HIGH_WATER_MARK
    AIJLOGMSG      AIJ_LOG_MESSAGE
    AIJLOGSHIP     AIJ_LOG_SHIPPING
    AIJOPEN        AIJ_OPEN
    AIJSWITCH      AIJ_SWITCH
    AIJ            AIJ
    AIPQHD         AIP
    ALS            ALS_ACTIVATION
    BCKAIJ         AIJ_BACKUP, BCKAIJ
    BCKAIJ_SPD     AIJ_BACKUP_SUSPEND
    BUGCHK         BUGCHECK
    CHAN           CHAN, FILE_CHANNEL
    CLIENT         CLIENT
    CLOSE          CLOSE
    CLTSEQ         CLTSEQ
    CPT            CORRUPT_PAGE_TABLE, CPT
    DASHBOARD      DASHBOARD_NOTIFY
    DBK_SCOPE      DBKEY_SCOPE
    DBR            DBR_SERIALIZATION
    DB             DATABASE
    FIB            FAST_INCREMENTAL_BACKUP, FIB
    FILID          FILID
    FRZ            FREEZE
    GBL_CKPT       GLOBAL_CHECKPOINT
    GBPT_SLOT      GLOBAL_BPT_SLOT
    KROOT          KROOT
    LAREA          LAREA, LOGICAL_AREA
    LOGFIL         LOGFIL
    MEMBIT         MEMBIT
    MONID          MONID, MONITOR_ID
    MONITOR        MONITOR
    NOWAIT         NOWAIT
    PLN            DBKEY, RECORD, PLN
    PNO            PAGE, PNO
    QUIET          QUIET
    RCACHE         RCACHE
    RCSREQUEST     RCS_REQUEST
    RCSWAITRQST    RCS_WAIT_REQUEST
    REL_AREAS      RELEASE_AREAS
    REL_GRIC_      RELEASE_GRIC_REQUEST
    REQST
    RMUCLIENT      RMU_CLIENT
    ROOT_AREA      DUMMY_ROOT_AREA
    RO_L1          L1_SNAP_TRUNCATION
    RTUPB          RTUPB
    RUJBLK         RUJBLK
    RW_L2          L2_SNAP_TRUNCATION
    SAC            SNAP_AREA_CURSOR
    SEQBLK         SEQBLK
    STAREA         STORAGE_AREA, PAREA
    STATRQST       STATISTICS_REQUEST
    TRM            TERMINATION
    TSNBLK         TSNBLK
    UTILITY        UTILITY

    The RESOURCE_TYPE qualifier is incompatible with the MODE, LIMIT,
    LOCK and PROCESS qualifiers.

5  –  Usage Notes

    o  To use the RMU Show Locks command for a database, you must
       have the OpenVMS WORLD privilege.

    o  When you specify a list of processes or lock identifiers, make
       sure the processes or locks are local to the node on which the
       RMU Show Locks command is issued.

    o  To display the complete list of locks in the OpenVMS locks
       database, do not specify the Mode=Blocking or Waiting
       qualifier. The volume of information from this report can
       be quite large.

    o  If you have entered an Oracle RMU command and there are no
       locks on your node, you receive the following message:

       %RMU-I-NOLOCKSOUT, No locks on this node with the specified
        qualifiers.

    o  When you use the RMU Show Locks command to display locks,
       the "requested" and "granted" modes of the given lock are
       displayed. The definitions for the two fields follow:

       -  Requested

          This is the mode for which the process has requested
          the lock. Valid modes are NL, CR, CW, PR, PW, and EX.
          This mode is not guaranteed to be granted; some locks
          are intentionally held in conflicting modes forever (for
          example, the "termination" lock).

       -  Granted

          This is the mode that the process was last granted for
          the lock. Valid modes are NL, CR, CW, PR, PW, and EX.
          Furthermore, if the lock has never been previously granted,
          the lock mode is displayed as NL mode.

       Lock Mode Compatibility shows the compatibility of requested
       and granted lock modes.

    Table 18 Lock Mode Compatibility

                           Mode of Currently Granted Locks

    Mode of
    Requested
    Lock       NL   CR   CW    PR   PW    EX

    NL         Yes  Yes  Yes   Yes  Yes   Yes
    CR         Yes  Yes  Yes   Yes  Yes   No
    CW         Yes  Yes  Yes   No   No    No
    PR         Yes  Yes  No    Yes  No    No
    PW         Yes  Yes  No    No   No    No
    EX         Yes  No   No    No   No    No
    __________________________________________________________________
    Key to Lock Modes

        NL-Null Lock
        CR-Concurrent Read
        CW-Concurrent Write
        PR-Protected Read
        PW-Protected Write
        EX-Exclusive Lock
        Yes-Locks compatible
        No-Locks not compatible

    o  If the "requested" and "granted" lock modes differ, then the
       lock requested is currently blocked on either the "wait" or
       "conversion" queue. If the modes are the same, then the lock
       has been granted.

    o  The OpenVMS distributed lock manager does not always
       update the requested lock mode. This means that potentially
       conflicting information can be displayed by the RMU Show Locks
       utility.

    o  The requested lock mode is updated only under the following
       situations:

       -  The lock request is for a remote resource.

       -  The lock request is a Nowait request.

       -  The lock request could not be granted due to a lock
          conflict (that is, it was canceled by the application or
          aborted due to lock timeout or deadlock).

       -  The lock request is the first for the resource.

    o  Consider the following RMU Show Locks output:

 ---------------------------------------------------------------------
 Resource Name: page 533
 Granted Lock Count: 1,  Parent Lock ID: 01000B6C,   Lock Access Mode:
 Executive,
 Resource Type:
       Global,  Lock Value Block: 03000000 00000000 00000000 00000002

   -Master Node Info-  --Lock Mode Information--     -Remote Node Info-
 ProcessID Lock ID  SystemID Requested Granted Queue  Lock ID SystemID
 2040021E  0400136A  00010002  EX      CR      GRANT  0400136A 00010002
 ------------------------------------------------------------------------

       In this example, it is ordinarily difficult to explain how
       such a combination of lock modes could occur. Note that the
       CR (concurrent read) mode is on the Grant queue (not the
       Conversion queue).

       Knowledge of the operating environment is necessary to know
       that there was only one node on this system. It turns out that
       two lock requests actually occurred to generate this output,
       in the opposite order of what appears to have occurred.

       The first lock request was for EX (exclusive), which was
       immediately granted. Thus, the Requested and Granted modes
       were updated according to situation 4. Then, the lock was
       demoted from EX to CR mode, which was also immediately
       granted. However, the Requested field was not updated because
       none of the four preceding rules was true, so the Requested
       mode was never updated to reflect the CR lock request.

    o

6  –  Examples

    Example 1

    The following command will output all the locks held by process
    ID 44A047C9. The report text will show the resource on which
    the lock is held, ID information, and lock status (Requested and
    Granted).

    $ RMU/SHOW LOCKS/PROCESS=44A047C9
Close Help