onstat -g proxy command: Print proxy distributor information

Use the onstat -g proxy command to display information about proxy distributors. The output of the onstat -g proxy command differs slightly depending on whether the command is run on a primary server or on a secondary server.

Read syntax diagramSkip visual syntax diagram
Syntax:

>>-onstat-- -g--proxy--+-all-----------------------------------------------------+-><
                       '-proxy_id--+-------------------------------------------+-'   
                                   '-proxy_transaction_id--+-----------------+-'     
                                                           '-sequence_number-'       

Invocation Explanation
onstat -g proxy Displays proxy distributor information
onstat -g proxy all When run on the primary server, displays information about proxy distributors and proxy agent threads. When run on the secondary server, displays information about all sessions currently performing updates to secondary servers.
onstat -g proxy proxy_id proxy_transaction_id sequence_number This option is valid only on secondary servers. Displays detailed information about the current work bring performed by a given proxy distributor. The proxy_transaction_id and sequence_number are optional parameters. When supplied, the first number is considered the proxy_transaction_id, and the second is interpreted as the sequence_number. If the supplied proxy_transaction_id or sequence_number do not exist, the command output is the same as the output for onstat -

Example output using the onstat -g proxy command on a primary server

Figure 1. onstat -g proxy command output (run from primary server)
Secondary          Proxy      Reference Transaction  Hot Row   
Node               ID         Count    Count        Total     
nagpur_sdc1        2619       0        2            0         
nagpur_c2          2632       0        1            0         
nagpur_sec         2633       0        1            0   I

Output description

Secondary Node
Name of the secondary server as it is known by the primary server.
Proxy ID
ID of the proxy distributor. Proxy IDs are unique within a high-availability cluster.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).
Transaction Count
The number of transactions currently being processed by the proxy distributor.
Hot Row Total
Total number of hot rows ever handled by the proxy distributor.

Example output using the onstat -g proxy command on a secondary server

Figure 2. onstat -g proxy command output (run from secondary server)
Primary            Proxy      Reference Transaction  Hot Row   
Node               ID         Count     Count        Total     
nagpur             2619       5         2            0 

Output description

Primary Node
Name of the primary server.
Proxy ID
ID of the proxy distributor. Proxy IDs are unique within a high-availability cluster.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).
Transaction Count
The number of transactions currently being processed by the proxy distributor.
Hot Row Total
Total number of hot rows ever handled by the proxy distributor.

Example output using the onstat -g proxy all command on a primary server

Figure 3. onstat -g proxy all command output (run from primary server)
Secondary          Proxy      Reference Transaction  Hot Row   
Node               ID         Count     Count        Total     
nagpur_sdc1        2619       0         2            0         
nagpur_c2          2632       0         1            0         
nagpur_sec         2633       0         1            0         

TID      Flags      Proxy  Source   Proxy    Current  sqlerrno iserrno 
                    ID     SessID   TxnID    Seq                       
94       0x00000224 2619   21       1        29       0        0       
95       0x00000224 2619   22       2        68       0        0       
93       0x00000224 2632   21       2        2        0        0       
91       0x00000224 2633   25       1        6        0        0 

Output description

Secondary Node
Name of the secondary server as it is known by the primary server.
Proxy ID
ID of the proxy distributor. Proxy IDs are unique within a high-availability cluster.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).
Transaction Count
The number of transactions currently being processed by the proxy distributor.
Hot Row Total
Total number of hot rows ever handled by the proxy distributor.
TID
ID of the proxy agent thread running on the primary server. This ID is created by the proxy distributor to handle work from the session on the secondary server.
Flags
Flags of the proxy agent thread.
Proxy ID
The ID of the proxy distributor on behalf of which the proxy agent thread (TID) is running.
Source SessID
The ID of the user's session on the secondary server.
Proxy TxnID
The number of the current transaction. These numbers are unique to the proxy distributor.
Current® Seq
The sequence number of the current operation in the current transaction.
sqlerrno
The error number of any SQL error (or 0 if no errors).
iserrno
The error number of any ISAM or RSAM error (or 0 if no errors).

Example output using the onstat -g proxy all command on a secondary server

Figure 4. onstat -g proxy all command output (run from secondary server)
Primary            Proxy      Reference Transaction  Hot Row   
Node               ID         Count     Count        Total     
nagpur             2619       5         2            0         

Session  Session  Proxy    Proxy    Proxy    Current  Pending  Reference
         Ref      Proxy_id TID      TxnID    Seq      Ops      Count    
21       2        2619     94       1        29       1        1        
22       2        2619     95       2        68       1        1    

Output description

Primary Node
Name of the primary server.
Proxy ID
ID of the proxy distributor. Proxy IDs are unique within a high-availability cluster.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).
Transaction Count
The number of transactions currently being processed by the proxy distributor.
Hot Row Total
Total number of hot rows ever handled by the proxy distributor. A hot row is a row on a secondary server that is updated multiple times by more than one client. When a row is updated multiple times, the secondary server reads the before image from the primary server by placing an update lock on the row if the most recent update operation from a different session is not replayed on the secondary server.
Session
The session ID
Proxy ID
The ID of the proxy distributor on behalf of which the proxy agent thread (TID) is running.
Proxy TID
Transaction ID of the proxy agent thread running on the primary server. This ID is created by the proxy distributor to handle work from the secondary server session.
Proxy TxnID
The number of the current transaction. These numbers are unique to the proxy distributor.
Current Seq
The sequence number of the current operation in the current transaction.
Pending Ops
The number of operations buffered on the secondary server that have not yet been sent to the primary server.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).

Example output using the proxy_id option on a secondary server

This command returns information only on a secondary server.

Figure 5. onstat -g proxy proxy_id command output (run from secondary server)
Proxy    Reference Pending  ProxySID
TxnID    Count     Ops              
1        1         1        3       
2        1         1        4  

Output description

Proxy TxnID
The number of the current transaction. These numbers are unique to the proxy distributor.
Reference Count
Indicates the number of threads that are using the information for the current transaction. When the count becomes 0, the transaction processing is complete (either successfully or unsuccessfully).
Pending Ops
The number of operations buffered on the secondary server that have not yet been sent to the primary server.
Proxy SID
Proxy session ID.

Example output using the proxy_id proxy_transaction_id options on a secondary server

This command returns information only on a secondary server.

Figure 6. onstat -g proxy_id proxy_transaction_id command output (run from secondary server)
Sequence Operation rowid    Table                          sqlerrno
Number   Type               Name                                   
28       *Update   526      stores_demo:nilesho.customer   0 

Output description

Sequence Number
The number of the operation.
Operation Type
The type of operation to be performed. One of: Insert, Update, Delete, Other.
rowid
The row ID of the row in which to apply the operation.
Table Name
The full table name, trimmed to fit a reasonable length. Format: database.owner.tablename
sqlerrno
The error number of any SQL error (or 0 if no errors).

Example output using the proxy_id proxy_transaction_id sequence_number options on a secondary server

This command returns information only on a secondary server.

The output fields are the same as the output fields displayed for the onstat -g proxy_id proxy_transaction_id command. While the onstat -g proxy_id proxy_transaction_id command displays details for a transaction, the onstat -g proxy_id proxy_transaction_id sequence_number displays details for all transaction operations.

Figure 7. onstat -g proxy_id proxy_transaction_id sequence_number command output (run from secondary server)
s
Proxy    Reference Pending  ProxySID
TxnID    Count     Ops
61       0         3        22

onstat -g proxy 2788 61


Sequence Operation rowid    Table                          sqlerrno
Number   Type               Name
960      Update    264      stores_demo:nilesho.customer      0
961      Update    265      stores_demo:nilesho.orders        0
962      Update    266      stores_demo:nilesho.items         0

onstat -g proxy 2788 61 962


Sequence Operation rowid    Table                          sqlerrno
Number   Type               Name
962      Update    266      stores_demo:nilesho.items         0

Copyright© 2019 HCL Technologies Limited