PSTAT

PSTAT

Top  Previous  Next

 

The PSTAT command displays the status of one or all QM processes.

 

 

Format

 

PSTAT { {USER} user }  { LEVEL level }

 

where

 

useris the QM user number or user login name of the process to report. Multiple user numbers or user names may follow a single USER keyword or there may be multiple USER keywords in the command line. If the command starts with numeric data that is not preceded by USER or LEVEL, the data is assumed to be a user number.

 

levelis the reporting level.

 

 

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:

1Shows each program and subroutine in the call stack. If not included, only the currently active program is shown.
2Shows internal subroutine calls within each reported program and subroutine. If not included, only external subroutine calls are shown.
4Shows details of QMNet connections to remote servers.

 

 

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)

            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. 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)

            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)

    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)