rp_server_status

Description

Sets or displays the status of any remote server that is defined in the [SERVER] section of the OpenSwitch configuration file.

NoteYou can also use OpenSwitch Manager to view and change the status of a server.

Syntax

rp_server_status [server, status]

Parameters

server

The name of a remote server as listed in the interfaces file on UNIX, or sql.ini on Windows of OpenSwitch. The server must also be defined in the [SERVER] section of the OpenSwitch configuration file. If a server name is supplied, but the status is not supplied, the status of the specified server is displayed.

status

The disposition to which the server is to be changed. If status is supplied, but a server is not, then the current status of all servers is changed.

Table 7-11: Status values for rp_server_status

Status

Description

PRE_UP

Mutually-aware-specific server status. The server is either in the process of being marked as UP, or has encountered a problem during that process. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to UP on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running.

WARNING! Do not manually set a server’s status to PRE_UP.

UP

The server is immediately available for use.

PRE_DOWN

Mutually-aware specific server status. The server is either in the process of being marked as DOWN, or has encountered a problem during that process. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to DOWN on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running.

WARNING! Do not manually set a server’s status to PRE_DOWN.

DOWN

The server is unavailable, and is not considered for use by any new client connections established to OpenSwitch.

PRE_LOCKED

Mutually-aware specific server status. The server is either in the process of being marked as LOCKED, or has encountered a problem during that process. doing so. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to LOCKED on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running.

WARNING! Do not manually set a server’s status to PRE_LOCKED.

LOCKED

The server is available, but any new incoming connections actively being connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to the client applications to have stopped responding until the pool is unlocked.

Examples

Example 1

Displays the current status of all servers:

1> rp_server_status
2> go

Returns:

server          status 
-------------  -------------- 
DEFAULT         UP 
SYB_SERV1       UP 
SYB_SERV2       UP 
SYB_SERV3       UP 

Example 2

Displays the current status of server SYB_SERV1:

1> rp_server_status "SYB_SERV1"
2> go

Returns:

server          status 
-------------- -------------- 
SYB_SERV1       UP

Example 3

Sets the status of SYB_SERV1 to LOCKED:

1> rp_server_status "SYB_SERV1", "LOCKED"
2> go

Returns:

server              status
------------------ --------------
SYB_SERV1           LOCKED

Usage


Messages

See also

rp_pool_addserver, rp_pool_server_status