Displays information about user connections.
You can also use the OpenSwitch Manager to view information
about user connections. See “Monitoring processes” for more information.
rp_who [spid]
Displays the value of the OpenSwitch spid.
spid state actions user host database current next pool ---- -------- -------- ------ ---- --------- ---------- --------- ----- 1 BUSY NULL elyse NULL testdb SYB_SRV1 SYB_SRV1 POOL1 2 BUSY,TRAN NULL athena NULL master SYB_SRV1 SYB_SRV1 POOL
Table 7-14 describes the contents of each column returned by rp_who.
Column |
Description |
---|---|
spid |
The internal Open Server process ID of the user connection. |
rspid |
The spid of the user connection on the remote server. This display only if SHOW_SPID is set to 1 in your OpenSwitch configuration. Otherwise, it displays as NULL. |
state |
A comma-delimited list of connection state information. Table 7-15 describes the possible values for state. |
actions |
Pending actions that have been queued for the thread. These actions are typically initiated by an administrator by calling such registered procedures as rp_switch, but some of them may arise internally due to things like an Adaptive Server failing.Table 7-16 describes the possible values for actions. Zero or more of these may be active at any time. |
application |
The name of the application used to establish the client connection. |
user |
The user name of the client connection. |
host |
The host machine from which the client connection was established. |
database |
The current database context of the user connection. |
current |
The name of the remote server actively being used by the client connection. |
next |
The name of the remote server that the client connection should be using. This information may differ from that in current if a switch is actively being performed. |
pool |
The name of the pool the user connection is using. |
function |
A debugging field.This describes which ctlib function this connection may be blocked on. |
Table 7-15 describes the state of each connection returned by rp_who.
Value |
Description |
---|---|
ATTNWAIT |
Internal flag. |
BLOCKED |
The client thread is currently performing a blocking activity, such as a read or a write, upon its outgoing connection. |
BUSY |
The client is actively communicating with a remote server, either sending or receiving results. While the connection is in this state, it is considered busy and is not be switched by a nonforced administrative switch request (see rp_switch). |
CACHE |
The thread owning the connection is a CACHE thread and does not belong to a “real” client. |
CANCAN |
Internal flag. |
CANCELED |
Indicates that the GOTATTN flag has been acted upon and the current query has been canceled. |
CLOSED |
Internal state indicating that the client connection is currently closed. |
GOTATTN |
Flag that is set when the client has raised an attention via a cancel request (such as a call to dbcancel() or ct_cancel()). This state should be followed later by a CANCELED state. |
IGNOREMSG |
Internal state. This state indicates that the connection is ignoring error or informational messages received from the remote server. It is set while a connection is being switched to another server to ensure that the client does not see the database context change messages issued while logging in to the remote server. |
KILL |
Indicates that the connection is in the process of being killed and will soon be removed from OpenSwitch. |
LOGIN |
Set while the connection is actively logging in to a remote server. |
LOGINFAIL |
Used to indicate that the connection was denied to the remote server due to things like an invalid password. This is a transient state that is usually immediately followed by the client connection being disconnected from OpenSwitch. |
LOST |
Indicates that the client’s outgoing connection to a remote server has been lost. This state is transitory and remains in effect until OpenSwitch either fails the connection over or disconnects the client. |
STOPPED |
The client is currently stopped due to an administrative STOP request. |
TRAN |
The client is actively engaged in an open transaction. While the connection is in this state, it is considered busy and will not be switched by a nonforced administrative request (see rp_switch). |
Table 7-16 describes the value for each action returned by rp_who.
Value |
Description |
---|---|
DEADLOCK |
Indicates that a “deadlock” message is pending delivery to the client. The message is sent as soon as the client is in a state in which it can receive the message. This action is usually set due to a call to rp_switch with a value of 1, or when the grace period has expired. |
NORETRY |
Internal state. This should only appear in conjunction with the SWITCH action. It indicates that, should the switch fail for any reason, the connection is removed from OpenSwitch without attempting to switch to another server. |
SERVER |
Indicates that the connection is requesting the name of a remote server from a coordination module, to be used either to log in to or to switch to. |
STIME |
Set in conjunction with SWITCH, this indicates that a grace period has been specified. |
STOP |
Indicates that the connection is stopped or will stop as soon as possible due to a call to rp_stop. |
SWITCH |
The remote connection is being switched to another server. The next column indicates the name of the server being switched to. |