dc_adm_get_sv_status - Acquire the status of a specified user server

Format

ANSI C, C++

#include <dcadm.h>
int dc_adm_get_sv_status (char *node_id, char *sv_name,
                         DCLONG flags)

K&R C

#include <dcadm.h>
int dc_adm_get_sv_status (node_id, sv_name, flags)
char       *node_id;
char       *sv_name;
DCLONG      flags;

Description

The function dc_adm_get_sv_status() acquires the status of a user server in a specified node identifier.

Arguments whose value is set in the UAP

node_id

Specify the pointer to the node identifier or the character string (*). Add a null character after the node identifier. If the pointer to the character string (*) is specified, the OpenTP1 node which called this function is assumed.

The length of the node identifier must be equal to the length defined by DCADM_NODE_ID_LEN. If a node identifier with a different length is specified, the function returns with an error.

sv_name

Specify the pointer to the area containing the user server name. The length of the user server name must be equal to the length defined by SERVER_NAME_SIZE. If a user server name with a longer length is specified, the function returns with an error.

flags

Specify DCNOFLAGS.

Return values

When the return value is positive (indicating the status of the user server):

Return valueReturn value (numeric)Explanation
DCADM_STAT_TERM8The user server is halted or is being terminated abnormally.
DCADM_STAT_START_NORMAL2The user server is normally being started.
DCADM_STAT_START_RECOVER3The user server is being restarted.
DCADM_STAT_ONLINE4The user server is online.
DCADM_STAT_STOP5The user server is normally being terminated.

When the return value is negative (indicating an error):

Return valueReturn value (numeric)Explanation
DCADMER_PARAM-1852The value specified for the argument is invalid.
DCADMER_COMM-1851Communication with the specified OpenTP1 node is impossible for the following reason:
  • The OpenTP1 at the OpenTP1 node must be defined or redefined with the dcsetup command.
  • The value specified in the multinode physical definition is incorrect (the OpenTP1 node is not defined or the specified host name or port number is incorrect).
  • A communication error occurred (power is not supplied to the OpenTP1 node machine or a network error occurred).
DCADMER_MEMORY-1861The memory became insufficient.
DCADMER_PROTO-1854The function dc_rpc_open() was not called.
DCADMER_MULTI_DEF-1864N is specified for multi_node_option in the system common definition or an incorrect value is specified in the multinode physical definition.
The TP1/Multi is not installed in the system.
The correct version TP1/Multi is not installed in the system.
DCADMER_DEF-1862An incorrect value is specified in the multinode configuration definition.
DCADMER_NODE_NOT_EXIST-1867The node identified by node_id is not included in the OpenTP1 nodes.
DCADMER_REMOTE-1866The specified OpenTP1 node cannot use the multinode facility for the following reason:
  • N is specified for multi_node_option in the system common definition.
  • The TP1/Multi is not installed in the system.
  • The correct version TP1/Multi is not installed in the system.
  • The memory became insufficient.
DCADMER_SWAP-1868The status of the user server cannot be acquired because the system is being switched.