!PSTAT()

Top  Previous  Next

 

The !PSTAT() subroutine returns information about a QM process.

 

 

Format

 

CALL !PSTAT(data, userno)

 

where

 

datais the variable to receive the result.

 

usernois the user number of the QM process to be analysed.

 

 

The !PSTAT() subroutine returns a dynamic array containing process status data similar to that used by the PSTAT command.

 

Field 1

Process information:

V1 = User number

V2 = Process id

V3 = Process type

V4 = User name

V5 = Client IP address for network connection

V6 = Opcode

V7 = Process wait cause

Field 2

Last command executed

Field 3

Program stack. Each value corresponds to a program/subroutine in the call history. Each value is further divided into subvalues. The first subvalue holds the program name. Remaining subvalues contain the program offset and line number separated by a text mark, repeated for each internal subroutine layer (GOSUB). The line number is -1 if not known.

Field 4

If waiting for a lock:

V1 = User number of process owning lock

V2 = File pathname

V3 = id   (null if waiting for a file lock)

V4 = Time started waiting as an epoch value

Field 5

Account name

Field 6

QMNet client id data (if this is a QMNet server process)

V1 = User name

V2 = User number

V3 = Process id

Field 7

QMNet server data for open connections. One value per connection, each with five subvalues:

SV1 = Server name

SV2 = Number of open files

SV3 = User name

SV4 = User number

SV5 = Process id

Field 8

Transaction data. Value per active transaction, each with three subvalues:

SV1 = Transaction id

SV2 = Start time as epoch value

SV3 = Command processor level

Field 9

@PSTAT