PSTAT |
|
|
The PSTAT command displays the status of one or all QM processes.
Format
PSTAT { {USER} user } { LEVEL level }
where
The PSTAT command displays diagnostic status information about the processes identified by the USER option or, if the USER option is omitted, all QM processes.
For each process reported, PSTAT shows the account name, user name, the last command executed and the current execution point (program name, line number and execution address). Note that the command shown may have completed and returned to the program from which it was executed. If in a transaction, the transaction id, command processor level and start time are shown, repeating for parent transactions if appropriate.
The level parameter specifies extended report features and is formed by adding together the following components:
Adding Application Data
A QM application can set the @PSTAT variable to contain text that will be shown by the PSTAT command. This provides an easy way to display diagnostic data or other application status information.
Examples
PSTAT USER 2 LEVEL 3 User Detail 2 Account: SALES, Username: Joe, Pid: 1383 Command: RUN INVOICES !SCREEN 953 (14E6, KEYIN) 750 (118E) 450 (08F3) 323 (061B) D:\LBS\QM\BP.OUT\INVOICES 105 (01BE) Command processor D:\LBS\QM\BP.OUT\PROC 104 (05B8) Command processor
In this example, the most recent command executed by user 2 was RUN INVOICES. It is currently executing the !SCREEN subroutine at line 953, address 14E6 which is a KEYIN operation. Because the LEVEL parameter includes level 2, internal subroutine calls are also shown. The !SCREEN subroutine was called from The INVOICES program at line 105 (address 01BE). This program was started from the command processor which was itself started from line 104 of program PROC which was itself started from the command processor.
The same process could be reported in less detail using other values of the LEVEL option as shown below:
Level 2 (Internal subroutine stack within current program)
PSTAT USER 2 LEVEL 2 User Detail 2 Account: SALES, Username: Joe, Pid: 1383 Command: RUN INVOICES !SCREEN 953 (14E6, KEYIN) 750 (118E) 450 (08F3) 323 (061B)
Level 1 (External subroutine stack but exclude internal calls)
PSTAT USER 2 LEVEL 1 User Detail 2 Account: SALES, Username: Joe, Pid: 1383 Command: RUN INVOICES !SCREEN 953 (14E6, KEYIN) D:\LBS\QM\BP.OUT\INVOICES 105 (01BE) Command processor D:\LBS\QM\BP.OUT\PROC 104 (05B8) Command processor
Level 0 (Current location only)
PSTAT USER 2 User Detail 2 Account: SALES, Username: Joe, Pid: 1383 Command: RUN INVOICES !SCREEN 953 (14E6, KEYIN) |