ANALYZE
Displays information about processes being executed on a specified port:
-
The port's status.
-
The state of the Virtual return stack.
-
The state of the DataBasic return stack, if relevant.
-
Any item lock for which the port is waiting.
-
Item locks held by the port.
-
Any group lock for which the port is waiting.
-
Group locks held by the port.
-
Any item deadlocks.
-
The host status of the reality process.
Syntax
ANALYZE port (options
Syntax Elements
port The number of the required port (but see option H).
Options
A Specifies that details of any item locks should include the name of the account containing the file concerned.
H Specifies that port is a host process ID.
U UNIX only. Include the host status of the reality process running on the specified port; that is, the result of executing ps -lp
[processId]
Restrictions
Can be run from the SYSMAN account only. The user must have SYS1 or SYS2 privilege.
Operation
ANALYZE displays the following information:
-
The port's status, under the following headings:
Heading
Description
If present, indicates the type of process running on the specified port - one of the following:
* This port (that is, the port specified is that which issued the ANALYZE command).
T TIPH process.
D Despooler process.
S Server process.
PORT
The number of the port from which the process is executed.
PROCESS
The UNIX/Windows process-id.
STATUS
Reports the status of the associated port, either as,
Connected
where a user is logged on orReserved
where a user is logging on.EVENT
The Event Count. A changing Event Count indicates that a process is still active, even if the major state is always the same when interrogated by ANALYZE. If the Event Count does not change the process is hung or inactive, or is busy processing (that is, the major state is 'Running').
MAJOR STATE
Reports the high level progress of the associated process, indicating any high level service function which is being performed, for example, 'Item Lock' or 'Item Read'. Such functions make one or more system calls and are therefore subject to being blocked. When not performing such a function, the Major State is set to 'Running'.
MINOR STATE
Reports the low level progress of the associated process during the current Major State (high level service function) and indicates its state at each system call which may cause a 'blocking' situation, for example, while waiting for an item lock or performing a disk read. The minor state is set at the start of each system call and cleared on successful completion.
Example:
Port Process... Status... Event Major State..... Minor State.....
402 3824 Connected 577 Port Read System read -
The state of the Virtual return stack - a space-separated list of stack entries. Each entry shows the mode class, mode number, and either a line number or a comma. The left-most entry is the top of the stack. For example:
Return Stack
CORA:1996,? ENGLISH*CONV:90,86 BASIC:2252,158This shows three stack entries, with the mode classes
Cora
(top of stack),ENGLISH*CONV
andBASIC
. -
The state of the DataBasic return stack, if relevant. The top entry is the top of the stack. Each entry contains the following:
-
The context level of the entry. Not shown for Service entries.
-
The type of entry - one of
Call
,Run
,Perform
,Service
,Enter
orChain
.Service
shows that the process has entered the Reality host code. -
The program or subroutine name.
Note
Internal subroutine calls and line numbers are not shown.
For example:
DataBasic Stack:
Service Port Read
0 Call DSM.SUB
0 Run DSMThis shows three stack entries, a Service call (top of stack), a subroutine call to DSM.SUB and the program DSM.
-
-
If the port is waiting on an item lock, details of that lock are displayed. For example:
Port is waiting on item locked by Port 401
00002984:00000324 WAIT EMC CCThe first 8-digit hexadecimal number is the base frame ID of the file and the second, the item hash. The second column is always
WAIT
. The third column contains the file name and the fourth column, theitem-id .If the A option has been included, the file name is preceded by the account containing the file.
-
If the port is holding any item locks, these are listed. For example:
Port owns the following item locks 00002984:E30AE798 EMC ITEM.ONE 00002984:4F5D9FC4 EMC ITEM.FIVE 00002984:000022CF 404 EMC ITEM.NINE 406 00002984:B47D99A0 EMC ITEM.EIGHT 00002984:00017F28 405 EMC ITEM.TEN
Each entry is similar to that for an item lock on which the port is waiting. However, column 2 shows the port numbers of any ports waiting on the lock. Note that in the example, lock 00002984:000022CF has two ports waiting on it (404 & 406).
-
If the port is waiting on a group lock, details of that lock are displayed. For example:
Port is waiting on Group Lock held by Port 401
00000027:00000002The first 8-digit hexadecimal number is the base frame ID of the file and the second, the group number.
-
If the port is holding any group locks, these are listed. For example:
Port owns the following Group Locks
00000027:00000002 UThe first 8-digit hexadecimal number is the base frame ID of the file and the second, the group number. The second column is
U
for an update lock orR
for a read lock. -
If there any item deadlocks are detected, warning messages are displayed. For example:
WARNING A deadlock exists between this port and port 403
WARNING Detected deadlock chain with ports 405 404 403
-
On UNIX hosts, if the U option is used, the host status of the reality process is shown. For example:
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 200801 A 202 31262 27388 0 60 20 212b0 20868 pts/1 0:00 reality
Refer to the documentation for the ps UNIX command for details of the information displayed.
Examples
:ANALYZE 402 Port Process... Status... Event Major State..... Minor State..... 402 3988 Connected 598 Port Read System read Return Stack SYSTEM:6,? SYSTEM:6,85 BASIC:2239,103 DataBasic Stack: Service Port Read 0 Call FQM.SUB 0 Run FQM
In this example, the ANALYZE command has displayed the details of the process on port 402 which is running the FQM TCL command and is currently waiting for user input.
:ANALYZE 404 (A Port Process... Status... Event Major State..... Minor State..... 404 4172 Connected 268 Lock Item Lock Wait Return Stack CORA:1992,? SYSTEM:1311,48 BASIC:2231,92 DataBasic Stack: 0 Run NEST-LOCKS 0 Perform NEST-LOCKS 1 Run NEST-LOCKS Service Lock Item Port is waiting on item locked by Port 403 00002984:00000324 WAIT TEST EMC CC Port owns the following item locks 00002984:000022CF 403 SYSMAN EMC CCC WARNING A deadlock exists between this port and port 403
In this example, the ANALYZE command has displayed the details of the process on port 404 which is running a DataBasic program called NEST-LOCKS. The program is waiting on an item locked by port 403 and holds a lock on the item CCC in file EMC. There is a deadlock between ports 404 and 403.