OpenTP1 Version 7 Programming Reference C Language
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 value | Return value (numeric) | Explanation |
---|---|---|
DCADM_STAT_TERM | 8 | The user server is halted or is being terminated abnormally. |
DCADM_STAT_START_NORMAL | 2 | The user server is normally being started. |
DCADM_STAT_START_RECOVER | 3 | The user server is being restarted. |
DCADM_STAT_ONLINE | 4 | The user server is online. |
DCADM_STAT_STOP | 5 | The user server is normally being terminated. |
When the return value is negative (indicating an error):
Return value | Return value (numeric) | Explanation |
---|---|---|
DCADMER_PARAM | -1852 | The value specified for the argument is invalid. |
DCADMER_COMM | -1851 | Communication with the specified OpenTP1 node is impossible for the following reason:
|
DCADMER_MEMORY | -1861 | The memory became insufficient. |
DCADMER_PROTO | -1854 | The function dc_rpc_open() was not called. |
DCADMER_MULTI_DEF | -1864 | N 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 | -1862 | An incorrect value is specified in the multinode configuration definition. |
DCADMER_NODE_NOT_EXIST | -1867 | The node identified by node_id is not included in the OpenTP1 nodes. |
DCADMER_REMOTE | -1866 | The specified OpenTP1 node cannot use the multinode facility for the following reason:
|
DCADMER_SWAP | -1868 | The status of the user server cannot be acquired because the system is being switched. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.