Displays or sets the status of the server present in any pool that is defined in the [POOL] section of the OpenSwitch configuration file.
You can also use OpenSwitch Manager to view or set the
status of servers.
rp_pool_server_status pool [server, status]
The name of the pool. The pool you specify must be defined in the [POOL] section of the OpenSwitch configuration file.
Name of the server. If server name is NULL, rp_pool_server_status displays the status of all servers present in the pool.
The status of the server. If status is NULL, then rp_pool_server_status displays the status of the specified server that is present in the pool. If status is not NULL, the status value is used to set the pool-specific server status for this pool.Valid status values are:
Value |
Description |
---|---|
UP |
The server is immediately available for use. |
DOWN |
The server is unavailable, and is not considered for new client connections to OpenSwitch. |
LOCKED |
The server is available, but new incoming connections being actively connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to client applications to be “stuck” until the pool is unlocked. |
Displays the status of all the servers present in the “POOL1.”
1> rp_pool_server_status "POOL1", NULL, NULL 2> go
Returns:
pool_name server_name status ------------------------------------------- POOL1 ase1 UP POOL1 ase2 UP POOL1 ase3 UP
Displays the status of the “ase1” server that is present in “POOL1.”
1> rp_pool_server_status "POOL1", ”ase1”, NULL 2> go
Returns:
pool_name server_name status ----------------------------------------------- POOL1 ase1 UP
Sets the status to DOWN of the “ase1” server that is present in the “POOL1.”
1> rp_pool_server_status "POOL1", "ase1", "DOWN" 2> go
Returns:
pool_name server_name status ------------------------------------------------ POOL1 ase1 DOWN
The status set by rp_pool_server_status, if any, takes precedence over the status set by rp_server_status for a server status within a pool.
Once a pool is assigned a pool-specific server status, it always uses that server status, instead of the generic server status, to determine where to send incoming client connections. This allows pool-based failover, where two or more pools share the same primary Adaptive Server, some pools channel client connections to the secondary Adaptive Server, and other pools continue to send client connections to the same primary Adaptive Server.
After you use rp_pool_server_status to set a server’s pool status, you can no longer use rp_server_status to accurately display the status for that server pool. Use rp_pool_server_status to verify the server status instead.
To remove a pool-specific server status that you set using either rp_pool_server_status or rp_pool_addserver, first drop the server from the pool using rp_pool_remserver, then re-add the server using rp_pool_addserver with NULL as the status.
Do not use rp_pool_server_status when MUTUAL_AWARE is set to 1. Pool-based failover is not supported by mutually-aware OpenSwitch servers, and a pool-specific server status may not match the generic server status set by the default SVR_FAIL_ACTION during a failover.
rp_pool_addserver, rp_server_status