Monitoring clients

To query the status of clients:

exec sgw_status clients

Table 8-1 shows the information this procedure displays for all active clients:

Table 8-1: Description of sgw_status clients results

Field

Description

Login

The login name of the user.

Client_Number

TRS issues a unique client number each time a user logs in. A user logged in more than once has the same Login and a different Client_Number for each connection to TRS.

NoteFor LU 6.2, this number identifies the user’s logins in the connections status display.

RPC_Name

The RPC called by the client:

  • If the request is a direct call from an Open Client DB-Library application, this field contains the RPC name specified in the dbrpcinit statement.

  • If the request is an indirect call from a Adaptive Server stored procedure, this is the RPC name that the stored procedure used when it called TRS.

Host_Tran

The name of the mainframe (host) transaction being invoked. This is the mainframe transaction associated with the RPC name. If a transaction is not in progress, this field is blank.

Client_Machine

The name of the machine on which the client program is running.

Con_Number (LU 6.2 only)

The connection number. TRS uses this number to represent the client’s current SNA connection. If the client is not using any connections, this field is blank.

State

The state of the transaction. Valid values for this 2-character field are:

  • AL (allocation) – TRS is allocating a conversation (LU 6.2 only) to the displayed mainframe (host) transaction or opening a socket (TCP/IP only) to the mainframe transaction.

  • CQ (connection queue) – TRS (LU 6.2 only) is waiting for an available connection to the mainframe.

  • GC (TRS administration) – the user is executing TRS administration procedures or is using the Gateway Control Program.

  • ID (idle) – the client is connected to TRS, but a transaction is not in progress.

  • IT (idle in transaction) – TRS is invoking a long-running transaction. The client is between procedure calls but a conversation is active.

  • RS (reading server – TRS is waiting for the mainframe transaction to return results.

  • SH (site handler) – the client is Adaptive Server.

  • WA (waiting) – the conversation is allocating, and TRS is waiting for the first set of results.

  • WC (writing to client) – TRS is writing data to the client program.

Count

The number of buffers being written to the client program as part of the result set of the current transaction. Each buffer contains approximately 512 bytes of data.

Time

The length of time, in seconds, that the transaction has been running.

SPID

TRS uses this number internally.

You may find an entry in this screen with SH listed under the State field but without an associated Login field. This entry represents the site handler for a remote Adaptive Server.

To display the name of the remote server in the Login field, add this configuration command at Adaptive Server, and then restart Adaptive Server:

sp_addserver servers/srvname, local 

Replace srvname with the name of the remote Adaptive Server.