Use the SHOW command to get status of the LOCK
mechanism and the LOCK database. The format of the SHOW
command is:
SH[OW] [-qualifier...]
The optional qualifiers are:
-A[LL] -L[OCK] -[NO]C[RIT] -O[UTPUT]="file-name" -P[ID]=pid -R[EGION]=region-name -W[AIT]
By default, SHOW displays
-A[LL].
The SHOW command reports active LOCKs.
Information includes the LOCK resource name and the process
identification (PID) of the LOCK owner. The results of a
SHOW may be immediately "outdated" by M LOCK
activity.
If the LOCK is owned by a GT.CM server on behalf of a client
GT.M process, then LKE SHOW displays the client
NODENAME (limited to the first 15 characters) and
clientPID. The client PID (CLNTPID) is a
decimal value in UNIX.
![]() | |
GT.CM is an RPC-like way of remotely accessing a GT.M database. |
-ALL
Specifies all current LOCKs.
-ALL displays all current LOCKs in all regions
and information about the state of processes owning these
LOCKs.
The -ALL qualifier is compatible with all other
qualifiers.
When -ALL is combined with -PID or
-REGION, the most restrictive qualifier prevails.
SHOW -ALL and -WAIT displays both
-ALL and -WAIT information.
-L[OCK]=resource_nameresource_name specifies a single
lock.
The resource_name is enclosed in
double quotation marks ("" ""). Because M resource names are
formatted the same as global nodes with punctuation characters, in
this context they are usually enclosed in sets of double quotation
marks with string subscripts enclosed in sets of two double
quotations.
When used with the CLEAR command, the
LOCK qualifier removes the specified lock.
When used with the SHOW command, the LOCK
qualifier provides a precise way to examine the specified
lock and any descendant LOCKed resources.
-[NO]C[RIT]
Allows the SHOW command to work even if another
process is holding a critical section.
By default LKE operates in CRIT mode and
ensures a consistent view of LOCKs by using the database critical
section(s).
Use NOCRIT with SHOW only when
normal operation is unsuccessful, as NOCRIT may cause
LKE to report incomplete or inconsistent information.
-O[UTPUT]="file-name"Directs the reporting of all specified LOCKs to a file.
If you specify an existing file, LKE creates a new version and overwrites that file.
The -OUTPUT qualifier is compatible with all
other qualifiers.
By default, the SHOW command send output
messages to stdout.
-P[ID]=pidSpecifies the process identification number that holds a LOCK on a resource name.
LKE interprets pid as a decimal
number.
PID displays all LOCKs owned by the specified
process identification number.
The -PID qualifier is compatible with all
other qualifiers; the most restrictive of the qualifiers prevails.
By default, SHOW displays the LOCKs for all
PIDs.
-R[EGION]=region-nameSpecifies the region that holds the locked resource names.
The REGION qualifier displays LOCKs of that
specified region.
The REGION qualifier is compatible with all
other qualifiers; the most restrictive of the qualifiers prevails.
By default, SHOW displays the LOCKs for all
regions.
-W[AIT]
Displays the LOCK resource name and the process state information of all processes waiting for the LOCK to be granted.
SHOW -WAIT does not display the owner of the
LOCK.
SHOW -ALL -WAIT displays both -ALL
and -WAIT information.
When a process abandons a "wait" request, that request may
continue to appear in LKE SHOW -WAIT displays. This
appearance is harmless, and is automatically eliminated if the
GT.M lock management requires the space which it occupies.
Use the following procedure to display all LOCKs active in the database(s) defined by the current global directory.
LKE> SHOW -ALL -WAIT
This produces an output like the following:
No locks were found in DEFAULT AREG ^a Owned by PID=2080 which is an existing process BREG ^b(2) Owned by PID= 2089 anonexistent process Request PID= 20400630 which is HIB No locks were found in CREG