CUBRID Engine
latest
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "porting.h"
#include "cas_common.h"
#include "broker_admin_so.h"
#include "broker_filename.h"
#include "broker_config.h"
#include "broker_util.h"
#include "broker_admin_pub.h"
#include "broker_shm.h"
#include "broker_process_size.h"
#include "broker_process_info.h"
Go to the source code of this file.
Macros | |
#define | UC_CONF_PARAM_MASTER_SHM_ID "MASTER_SHM_ID" |
#define | UC_CONF_PARAM_ADMIN_LOG_FILE "ADMIN_LOG_FILE" |
#define | UC_CONF_PARAM_BROKER_NAME "%" |
#define | UC_CONF_PARAM_SERVICE "SERVICE" |
#define | UC_CONF_PARAM_APPL_SERVER "APPL_SERVER" |
#define | UC_CONF_PARAM_BROKER_PORT "BROKER_PORT" |
#define | UC_CONF_PARAM_MIN_NUM_APPL_SERVER "MIN_NUM_APPL_SERVER" |
#define | UC_CONF_PARAM_MAX_NUM_APPL_SERVER "MAX_NUM_APPL_SERVER" |
#define | UC_CONF_PARAM_AUTO_ADD_APPL_SERVER "AUTO_ADD_APPL_SERVER" |
#define | UC_CONF_PARAM_APPL_SERVER_SHM_ID "APPL_SERVER_SHM_ID" |
#define | UC_CONF_PARAM_APPL_SERVER_MAX_SIZE "APPL_SERVER_MAX_SIZE" |
#define | UC_CONF_PARAM_APPL_SERVER_HARD_LIMIT "APPL_SERVER_MAX_SIZE_HARD_LIMIT" |
#define | UC_CONF_PARAM_LOG_DIR "LOG_DIR" |
#define | UC_CONF_PARAM_SLOW_LOG_DIR "SLOW_LOG_DIR" |
#define | UC_CONF_PARAM_ERROR_LOG_DIR "ERROR_LOG_DIR" |
#define | UC_CONF_PARAM_LOG_BACKUP "LOG_BACKUP" |
#define | UC_CONF_PARAM_SOURCE_ENV "SOURCE_ENV" |
#define | UC_CONF_PARAM_ACCESS_LOG "ACCESS_LOG" |
#define | UC_CONF_PARAM_SQL_LOG "SQL_LOG" |
#define | UC_CONF_PARAM_SLOW_LOG "SLOW_LOG" |
#define | UC_CONF_PARAM_LONG_QUERY_TIME "LONG_QUERY_TIME" |
#define | UC_CONF_PARAM_LONG_TRANSACTION_TIME "LONG_TRANSACTION_TIME" |
#define | UC_CONF_PARAM_TIME_TO_KILL "TIME_TO_KILL" |
#define | UC_CONF_PARAM_SESSION_TIMEOUT "SESSION_TIMEOUT" |
#define | UC_CONF_PARAM_JOB_QUEUE_SIZE "JOB_QUEUE_SIZE" |
#define | UC_CONF_PARAM_ACCESS_LIST "ACCESS_LIST" |
#define | UC_CONF_PARAM_SQL_LOG2 "SQL_LOG2" |
#define | UC_CONF_PARAM_MAX_STRING_LENGTH "MAX_STRING_LENGTH" |
#define | UC_CONF_PARAM_STRIPPED_COLUMN_NAME "STRIPPED_COLUMN_NAME" |
#define | UC_CONF_PARAM_KEEP_CONNECTION "KEEP_CONNECTION" |
#define | UC_CONF_PARAM_SQL_LOG_MAX_SIZE "SQL_LOG_MAX_SIZE" |
#define | MAX_NUM_CONF 35 |
#define | SET_CONF_ITEM(CONF_ITEM, IDX, NAME, VALUE) |
#define | SET_CONF_ITEM_ONOFF(CONF_ITEM, IDX, NAME, VALUE) |
#define | SET_CONF_ITEM_SQL_LOG_MODE(CONF_ITEM, IDX, NAME, VALUE) |
#define | SET_CONF_ITEM_KEEP_CON(CONF_ITEM, IDX, NAME, VALUE) |
#define | FMT_D "%d" |
#define | FMT_X "%X" |
#define | SET_CONF_ITEM_INT(CONF_ITEM, IDX, NAME, VALUE, FMT) |
#define | SET_CONF_ITEM_STR(CONF_ITEM, IDX, NAME, VALUE) |
#define | SET_FLAG(ONOFF) ((ONOFF) == ON ? FLAG_ON : FLAG_OFF) |
#define | CP_ADMIN_ERR_MSG(BUF) sprintf(BUF, "Error: %s", admin_err_msg) |
#define | CHECK_SHARED_MEMORY(p_shm, err_msg) |
Functions | |
static void | admin_log_write (const char *log_file, const char *msg) |
static int | admin_common (T_BROKER_INFO *br_info, int *num_broker, int *master_shm_id, char *admin_log_file, char *err_msg, char admin_flag, bool *acl_flag, char *acl_file) |
static int | copy_job_info (T_JOB_INFO **job_info, T_MAX_HEAP_NODE *job_q) |
static int | conf_copy_header (T_UC_CONF *unicas_conf, int master_shm_id, char *admin_log_file, char *err_msg) |
static int | conf_copy_broker (T_UC_CONF *unicas_conf, T_BROKER_INFO *br_conf, int num_br, char *err_msg) |
static void | conf_item_free (T_UC_CONF_ITEM *conf_item, int num) |
static char * | get_broker_name (T_BR_CONF *br_conf) |
static const char * | get_as_type_str (char as_type) |
static void | change_conf_as_type (T_BR_CONF *br_conf, int old_as_type, int new_as_type) |
static void | reset_conf_value (int num_item, T_UC_CONF_ITEM *item, const char *name) |
static int | get_as_type (const char *type_str) |
static int | uc_changer_internal (const char *br_name, const char *name, const char *value, int as_number, char *err_msg) |
DLL_EXPORT void * | uc_broker_shm_open (char *err_msg) |
DLL_EXPORT int | uc_get_br_num_with_opened_shm (void *shm_br, char *err_msg) |
DLL_EXPORT int | uc_get_br_name_with_opened_shm (void *shm_br, int br_index, char *name, int buffer_size, char *err_msg) |
DLL_EXPORT void * | uc_as_shm_open (void *shm_br, int br_index, char *err_msg) |
DLL_EXPORT int | uc_get_as_num_with_opened_shm (void *shm_br, int br_index, char *err_msg) |
DLL_EXPORT int | uc_get_as_reqs_received_with_opened_shm (void *shm_as, long long array[], int array_size, char *err_msg) |
DLL_EXPORT int | uc_get_active_session_with_opened_shm (void *shm_p, char *err_msg) |
DLL_EXPORT int | uc_get_as_tran_processed_with_opened_shm (void *shm_as, long long array[], int array_size, char *err_msg) |
DLL_EXPORT int | uc_get_as_query_processed_with_opened_shm (void *shm_as, long long array[], int array_size, char *err_msg) |
DLL_EXPORT void | uc_shm_detach (void *p) |
DLL_EXPORT const char * | uc_version () |
DLL_EXPORT int | uc_start (char *err_msg) |
DLL_EXPORT int | uc_stop (char *err_msg) |
DLL_EXPORT int | uc_add (const char *br_name, char *err_msg) |
DLL_EXPORT int | uc_restart (const char *br_name, int as_index, char *err_msg) |
DLL_EXPORT int | uc_drop (const char *br_name, char *err_msg) |
DLL_EXPORT int | uc_on (const char *br_name, char *err_msg) |
DLL_EXPORT int | uc_off (const char *br_name, char *err_msg) |
DLL_EXPORT int | uc_as_info (const char *br_name, T_AS_INFO **ret_as_info, T_JOB_INFO **job_info, int *num_job, char *err_msg) |
DLL_EXPORT void | uc_info_free (void *info) |
DLL_EXPORT int | uc_br_info (T_BR_INFO **ret_br_info, char *err_msg) |
DLL_EXPORT int | uc_unicas_conf (T_UC_CONF *unicas_conf, int *ret_mst_shmid, char *err_msg) |
DLL_EXPORT void | uc_unicas_conf_free (T_UC_CONF *unicas_conf) |
DLL_EXPORT int | uc_conf_broker_add (T_UC_CONF *unicas_conf, const char *br_name, char *err_msg) |
DLL_EXPORT void | uc_change_config (T_UC_CONF *unicas_conf, const char *br_name, const char *name, const char *value) |
DLL_EXPORT int | uc_changer (const char *br_name, const char *name, const char *value, char *err_msg) |
DLL_EXPORT int | uc_cas_changer (const char *br_name, const char *name, const char *value, int as_number, char *err_msg) |
DLL_EXPORT int | uc_del_cas_log (const char *br_name, int asid, char *err_msg) |
#define CHECK_SHARED_MEMORY | ( | p_shm, | |
err_msg | |||
) |
Definition at line 155 of file broker_admin_so.c.
Referenced by uc_get_active_session_with_opened_shm(), uc_get_as_num_with_opened_shm(), uc_get_as_query_processed_with_opened_shm(), uc_get_as_reqs_received_with_opened_shm(), uc_get_as_tran_processed_with_opened_shm(), uc_get_br_name_with_opened_shm(), and uc_get_br_num_with_opened_shm().
#define CP_ADMIN_ERR_MSG | ( | BUF | ) | sprintf(BUF, "Error: %s", admin_err_msg) |
Definition at line 139 of file broker_admin_so.c.
Referenced by admin_common(), uc_add(), uc_drop(), uc_off(), uc_on(), uc_restart(), uc_start(), and uc_stop().
#define FMT_D "%d" |
Definition at line 123 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define FMT_X "%X" |
Definition at line 124 of file broker_admin_so.c.
Referenced by conf_copy_broker(), conf_copy_header(), and uc_conf_broker_add().
#define MAX_NUM_CONF 35 |
Definition at line 84 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define SET_CONF_ITEM | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE | |||
) |
Definition at line 86 of file broker_admin_so.c.
#define SET_CONF_ITEM_INT | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE, | |||
FMT | |||
) |
Definition at line 125 of file broker_admin_so.c.
Referenced by conf_copy_broker(), conf_copy_header(), and uc_conf_broker_add().
#define SET_CONF_ITEM_KEEP_CON | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE | |||
) |
Definition at line 113 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define SET_CONF_ITEM_ONOFF | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE | |||
) |
Definition at line 93 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define SET_CONF_ITEM_SQL_LOG_MODE | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE | |||
) |
Definition at line 101 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define SET_CONF_ITEM_STR | ( | CONF_ITEM, | |
IDX, | |||
NAME, | |||
VALUE | |||
) |
Definition at line 132 of file broker_admin_so.c.
Referenced by conf_copy_broker(), conf_copy_header(), and uc_conf_broker_add().
Definition at line 137 of file broker_admin_so.c.
Referenced by uc_br_info().
#define UC_CONF_PARAM_ACCESS_LIST "ACCESS_LIST" |
Definition at line 77 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_ACCESS_LOG "ACCESS_LOG" |
Definition at line 69 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_ADMIN_LOG_FILE "ADMIN_LOG_FILE" |
Definition at line 52 of file broker_admin_so.c.
Referenced by conf_copy_header().
#define UC_CONF_PARAM_APPL_SERVER "APPL_SERVER" |
Definition at line 56 of file broker_admin_so.c.
Referenced by conf_copy_broker(), uc_change_config(), and uc_conf_broker_add().
#define UC_CONF_PARAM_APPL_SERVER_HARD_LIMIT "APPL_SERVER_MAX_SIZE_HARD_LIMIT" |
Definition at line 63 of file broker_admin_so.c.
Referenced by conf_copy_broker().
#define UC_CONF_PARAM_APPL_SERVER_MAX_SIZE "APPL_SERVER_MAX_SIZE" |
Definition at line 62 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_APPL_SERVER_SHM_ID "APPL_SERVER_SHM_ID" |
Definition at line 61 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_AUTO_ADD_APPL_SERVER "AUTO_ADD_APPL_SERVER" |
Definition at line 60 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_BROKER_NAME "%" |
Definition at line 54 of file broker_admin_so.c.
Referenced by conf_copy_broker(), get_broker_name(), and uc_conf_broker_add().
#define UC_CONF_PARAM_BROKER_PORT "BROKER_PORT" |
Definition at line 57 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_ERROR_LOG_DIR "ERROR_LOG_DIR" |
Definition at line 66 of file broker_admin_so.c.
Referenced by conf_copy_broker().
#define UC_CONF_PARAM_JOB_QUEUE_SIZE "JOB_QUEUE_SIZE" |
Definition at line 76 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_KEEP_CONNECTION "KEEP_CONNECTION" |
Definition at line 81 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_LOG_BACKUP "LOG_BACKUP" |
Definition at line 67 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_LOG_DIR "LOG_DIR" |
Definition at line 64 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_LONG_QUERY_TIME "LONG_QUERY_TIME" |
Definition at line 72 of file broker_admin_so.c.
Referenced by uc_conf_broker_add().
#define UC_CONF_PARAM_LONG_TRANSACTION_TIME "LONG_TRANSACTION_TIME" |
Definition at line 73 of file broker_admin_so.c.
Referenced by uc_conf_broker_add().
#define UC_CONF_PARAM_MASTER_SHM_ID "MASTER_SHM_ID" |
Definition at line 51 of file broker_admin_so.c.
Referenced by conf_copy_header().
#define UC_CONF_PARAM_MAX_NUM_APPL_SERVER "MAX_NUM_APPL_SERVER" |
Definition at line 59 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_MAX_STRING_LENGTH "MAX_STRING_LENGTH" |
Definition at line 79 of file broker_admin_so.c.
Referenced by change_conf_as_type(), conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_MIN_NUM_APPL_SERVER "MIN_NUM_APPL_SERVER" |
Definition at line 58 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_SERVICE "SERVICE" |
Definition at line 55 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_SESSION_TIMEOUT "SESSION_TIMEOUT" |
Definition at line 75 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_SLOW_LOG "SLOW_LOG" |
Definition at line 71 of file broker_admin_so.c.
Referenced by conf_copy_broker().
#define UC_CONF_PARAM_SLOW_LOG_DIR "SLOW_LOG_DIR" |
Definition at line 65 of file broker_admin_so.c.
Referenced by conf_copy_broker().
#define UC_CONF_PARAM_SOURCE_ENV "SOURCE_ENV" |
Definition at line 68 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_SQL_LOG "SQL_LOG" |
Definition at line 70 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_SQL_LOG2 "SQL_LOG2" |
Definition at line 78 of file broker_admin_so.c.
Referenced by conf_copy_broker().
#define UC_CONF_PARAM_SQL_LOG_MAX_SIZE "SQL_LOG_MAX_SIZE" |
Definition at line 82 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_STRIPPED_COLUMN_NAME "STRIPPED_COLUMN_NAME" |
Definition at line 80 of file broker_admin_so.c.
Referenced by change_conf_as_type(), conf_copy_broker(), and uc_conf_broker_add().
#define UC_CONF_PARAM_TIME_TO_KILL "TIME_TO_KILL" |
Definition at line 74 of file broker_admin_so.c.
Referenced by conf_copy_broker(), and uc_conf_broker_add().
|
static |
Definition at line 1149 of file broker_admin_so.c.
References admin_init_env(), broker_config_read(), CP_ADMIN_ERR_MSG, NULL, ut_cd_work_dir(), and wsa_initialize().
Referenced by uc_add(), uc_as_info(), uc_br_info(), uc_broker_shm_open(), uc_changer_internal(), uc_del_cas_log(), uc_drop(), uc_off(), uc_on(), uc_restart(), uc_start(), uc_stop(), and uc_unicas_conf().
Definition at line 1295 of file broker_admin_so.c.
References NULL.
Referenced by uc_add(), uc_drop(), uc_off(), uc_on(), uc_restart(), uc_start(), and uc_stop().
|
static |
Definition at line 1257 of file broker_admin_so.c.
References IS_APPL_SERVER_TYPE_CAS, t_br_conf::item, t_br_conf::num, reset_conf_value(), UC_CONF_PARAM_MAX_STRING_LENGTH, and UC_CONF_PARAM_STRIPPED_COLUMN_NAME.
Referenced by uc_change_config().
|
static |
Definition at line 1059 of file broker_admin_so.c.
References t_broker_info::appl_server, appl_server_shm_id, t_uc_conf::br_conf, FMT_D, FMT_X, get_as_type_str(), i, IS_APPL_SERVER_TYPE_CAS, t_br_conf::item, MAX_NUM_CONF, NULL, t_br_conf::num, t_uc_conf::num_broker, ONE_K, SET_CONF_ITEM_INT, SET_CONF_ITEM_KEEP_CON, SET_CONF_ITEM_ONOFF, SET_CONF_ITEM_SQL_LOG_MODE, SET_CONF_ITEM_STR, stripped_column_name, UC_CONF_PARAM_ACCESS_LIST, UC_CONF_PARAM_ACCESS_LOG, UC_CONF_PARAM_APPL_SERVER, UC_CONF_PARAM_APPL_SERVER_HARD_LIMIT, UC_CONF_PARAM_APPL_SERVER_MAX_SIZE, UC_CONF_PARAM_APPL_SERVER_SHM_ID, UC_CONF_PARAM_AUTO_ADD_APPL_SERVER, UC_CONF_PARAM_BROKER_NAME, UC_CONF_PARAM_BROKER_PORT, UC_CONF_PARAM_ERROR_LOG_DIR, UC_CONF_PARAM_JOB_QUEUE_SIZE, UC_CONF_PARAM_KEEP_CONNECTION, UC_CONF_PARAM_LOG_BACKUP, UC_CONF_PARAM_LOG_DIR, UC_CONF_PARAM_MAX_NUM_APPL_SERVER, UC_CONF_PARAM_MAX_STRING_LENGTH, UC_CONF_PARAM_MIN_NUM_APPL_SERVER, UC_CONF_PARAM_SERVICE, UC_CONF_PARAM_SESSION_TIMEOUT, UC_CONF_PARAM_SLOW_LOG, UC_CONF_PARAM_SLOW_LOG_DIR, UC_CONF_PARAM_SOURCE_ENV, UC_CONF_PARAM_SQL_LOG, UC_CONF_PARAM_SQL_LOG2, UC_CONF_PARAM_SQL_LOG_MAX_SIZE, UC_CONF_PARAM_STRIPPED_COLUMN_NAME, and UC_CONF_PARAM_TIME_TO_KILL.
Referenced by uc_unicas_conf().
|
static |
Definition at line 1128 of file broker_admin_so.c.
References FMT_X, t_uc_conf::header_conf, NULL, t_uc_conf::num_header, SET_CONF_ITEM_INT, SET_CONF_ITEM_STR, UC_CONF_PARAM_ADMIN_LOG_FILE, and UC_CONF_PARAM_MASTER_SHM_ID.
Referenced by uc_unicas_conf().
|
static |
Definition at line 1043 of file broker_admin_so.c.
References FREE_MEM, i, and NULL.
Referenced by uc_unicas_conf_free().
|
static |
Definition at line 1187 of file broker_admin_so.c.
References i, t_max_heap_node::id, t_job_info::id, t_max_heap_node::ip_addr, max_heap_delete(), NULL, t_max_heap_node::prg_name, t_max_heap_node::priority, t_job_info::priority, t_max_heap_node::recv_time, t_job_info::recv_time, and t_max_heap_node::script.
Referenced by uc_as_info().
|
static |
Definition at line 1239 of file broker_admin_so.c.
References APPL_SERVER_CAS, APPL_SERVER_CAS_MYSQL, APPL_SERVER_CAS_MYSQL51, APPL_SERVER_CAS_MYSQL51_TYPE_NAME, APPL_SERVER_CAS_MYSQL_TYPE_NAME, APPL_SERVER_CAS_ORACLE, and APPL_SERVER_CAS_ORACLE_TYPE_NAME.
Referenced by uc_change_config().
|
static |
Definition at line 1221 of file broker_admin_so.c.
References APPL_SERVER_CAS_MYSQL, APPL_SERVER_CAS_MYSQL51, APPL_SERVER_CAS_MYSQL51_TYPE_NAME, APPL_SERVER_CAS_MYSQL_TYPE_NAME, APPL_SERVER_CAS_ORACLE, APPL_SERVER_CAS_ORACLE_TYPE_NAME, and APPL_SERVER_CAS_TYPE_NAME.
Referenced by conf_copy_broker(), uc_br_info(), and uc_conf_broker_add().
|
static |
Definition at line 1020 of file broker_admin_so.c.
References i, t_br_conf::item, NULL, t_br_conf::num, UC_CONF_PARAM_BROKER_NAME, and t_uc_conf_item::value.
Referenced by uc_change_config().
|
static |
Definition at line 1277 of file broker_admin_so.c.
References i, and t_uc_conf_item::value.
Referenced by change_conf_as_type().
DLL_EXPORT int uc_add | ( | const char * | br_name, |
char * | err_msg | ||
) |
Definition at line 369 of file broker_admin_so.c.
References admin_add_cmd(), admin_common(), admin_log_write(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_as_info | ( | const char * | br_name, |
T_AS_INFO ** | ret_as_info, | ||
T_JOB_INFO ** | job_info, | ||
int * | num_job, | ||
char * | err_msg | ||
) |
Definition at line 494 of file broker_admin_so.c.
References admin_common(), t_broker_info::appl_server, t_broker_info::appl_server_max_num, t_broker_info::appl_server_shm_id, as_info, t_shm_appl_server::as_info, t_as_info::as_port, AS_STATUS_BUSY, AS_STATUS_CLIENT_WAIT, AS_STATUS_CLOSE_WAIT, AS_STATUS_IDLE, AS_STATUS_RESTART, br_index, t_shm_broker::br_info, BROKER_PATH_MAX, t_appl_server_info::cas_clt_ip, t_appl_server_info::clt_appl_name, t_appl_server_info::clt_req_path_info, t_appl_server_info::con_status, CON_STATUS_OUT_TRAN, copy_job_info(), t_psinfo::cpu_time, t_as_info::cpu_time, t_appl_server_info::database_host, t_appl_server_info::database_name, database_name, DLL_EXPORT, get_psinfo(), getsize(), i, t_max_heap_node::id, IS_APPL_SERVER_TYPE_CAS, t_shm_appl_server::job_queue, JOB_QUEUE_MAX_SIZE, t_as_info::last_access_time, t_appl_server_info::last_access_time, t_as_info::last_connect_time, t_appl_server_info::last_connect_time, t_appl_server_info::log_msg, MAX_BROKER_NUM, t_broker_info::name, NULL, t_shm_broker::num_broker, t_as_info::num_error_queries, t_appl_server_info::num_error_queries, t_as_info::num_interrupts, t_appl_server_info::num_interrupts, t_as_info::num_long_queries, t_appl_server_info::num_long_queries, t_as_info::num_long_transactions, t_appl_server_info::num_long_transactions, t_as_info::num_queries_processed, t_appl_server_info::num_queries_processed, t_as_info::num_request, t_appl_server_info::num_request, t_as_info::num_requests_received, t_appl_server_info::num_requests_received, t_psinfo::num_thr, t_as_info::num_thr, t_as_info::num_transactions_processed, t_appl_server_info::num_transactions_processed, t_psinfo::pcpu, t_as_info::pcpu, t_as_info::pid, t_appl_server_info::pid, pid, t_as_info::psize, t_as_info::service_flag, t_appl_server_info::service_flag, SERVICE_ON, shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, SHM_MODE_ADMIN, t_as_info::status, TRUE, uc_info_free(), ut_get_ipv4_string(), t_appl_server_info::uts_status, UTS_STATUS_BUSY, UTS_STATUS_RESTART, uw_shm_detach(), and uw_shm_open().
DLL_EXPORT void* uc_as_shm_open | ( | void * | shm_br, |
int | br_index, | ||
char * | err_msg | ||
) |
Definition at line 208 of file broker_admin_so.c.
References appl_server_shm_id, DLL_EXPORT, NULL, SHM_APPL_SERVER, SHM_MODE_MONITOR, and uw_shm_open().
DLL_EXPORT int uc_br_info | ( | T_BR_INFO ** | ret_br_info, |
char * | err_msg | ||
) |
Definition at line 682 of file broker_admin_so.c.
References t_br_info::access_list_flag, t_broker_info::access_log_file, t_br_info::access_mode, t_broker_info::access_mode, t_broker_info::acl_file, admin_common(), t_broker_info::appl_server, t_broker_info::appl_server_hard_limit, t_broker_info::appl_server_max_num, t_broker_info::appl_server_max_size, t_broker_info::appl_server_min_num, t_broker_info::appl_server_num, t_broker_info::appl_server_shm_id, t_br_info::as_hard_limit, t_shm_appl_server::as_info, t_br_info::as_max_size, t_broker_info::auto_add_appl_server, t_br_info::auto_add_flag, t_shm_broker::br_info, BROKER_PATH_MAX, t_psinfo::cpu_time, t_br_info::cpu_time, DLL_EXPORT, get_as_type_str(), get_psinfo(), i, t_max_heap_node::id, t_shm_appl_server::job_queue, t_br_info::keep_connection, t_shm_appl_server::keep_connection, t_broker_info::log_backup, t_br_info::log_backup_flag, t_br_info::long_query_time, t_broker_info::long_query_time, t_br_info::long_transaction_time, t_broker_info::long_transaction_time, t_br_info::max_as, MAX_BROKER_NUM, t_br_info::min_as, t_broker_info::name, NULL, t_br_info::num_as, t_shm_broker::num_broker, t_br_info::num_busy_count, t_broker_info::num_busy_count, t_appl_server_info::num_error_queries, t_br_info::num_error_query, t_br_info::num_interrupts, t_appl_server_info::num_interrupts, t_br_info::num_job_q, t_appl_server_info::num_long_queries, t_br_info::num_long_query, t_br_info::num_long_tran, t_appl_server_info::num_long_transactions, t_appl_server_info::num_queries_processed, t_br_info::num_query, t_br_info::num_req, t_appl_server_info::num_request, t_psinfo::num_thr, t_br_info::num_thr, t_br_info::num_tran, t_appl_server_info::num_transactions_processed, ON, p, t_psinfo::pcpu, t_br_info::pcpu, t_br_info::pid, t_broker_info::pid, pid, t_br_info::port, t_broker_info::port, t_broker_info::service_flag, t_br_info::session_timeout, t_broker_info::session_timeout, SET_FLAG, shm_appl, SHM_APPL_SERVER, shm_br, SHM_BROKER, t_br_info::shm_id, SHM_MODE_ADMIN, t_br_info::slow_log_mode, t_broker_info::slow_log_mode, t_broker_info::source_env, t_br_info::source_env_flag, t_br_info::sql_log_mode, t_broker_info::sql_log_mode, t_br_info::status, t_br_info::time_to_kill, t_broker_info::time_to_kill, uc_info_free(), uw_shm_detach(), and uw_shm_open().
DLL_EXPORT void* uc_broker_shm_open | ( | char * | err_msg | ) |
Definition at line 164 of file broker_admin_so.c.
References admin_common(), BROKER_PATH_MAX, DLL_EXPORT, MAX_BROKER_NUM, NULL, SHM_BROKER, SHM_MODE_ADMIN, and uw_shm_open().
DLL_EXPORT int uc_cas_changer | ( | const char * | br_name, |
const char * | name, | ||
const char * | value, | ||
int | as_number, | ||
char * | err_msg | ||
) |
Definition at line 983 of file broker_admin_so.c.
References DLL_EXPORT, and uc_changer_internal().
DLL_EXPORT void uc_change_config | ( | T_UC_CONF * | unicas_conf, |
const char * | br_name, | ||
const char * | name, | ||
const char * | value | ||
) |
Definition at line 942 of file broker_admin_so.c.
References t_uc_conf::br_conf, change_conf_as_type(), DLL_EXPORT, FREE_MEM, get_as_type(), get_broker_name(), i, t_br_conf::item, t_uc_conf_item::name, NULL, t_br_conf::num, t_uc_conf::num_broker, strdup(), UC_CONF_PARAM_APPL_SERVER, and t_uc_conf_item::value.
DLL_EXPORT int uc_changer | ( | const char * | br_name, |
const char * | name, | ||
const char * | value, | ||
char * | err_msg | ||
) |
Definition at line 977 of file broker_admin_so.c.
References DLL_EXPORT, and uc_changer_internal().
|
static |
Definition at line 1314 of file broker_admin_so.c.
References admin_common(), admin_conf_change(), BROKER_PATH_MAX, MAX_BROKER_NUM, and NULL.
Referenced by uc_cas_changer(), and uc_changer().
DLL_EXPORT int uc_conf_broker_add | ( | T_UC_CONF * | unicas_conf, |
const char * | br_name, | ||
char * | err_msg | ||
) |
Definition at line 887 of file broker_admin_so.c.
References APPL_SERVER_CAS, t_uc_conf::br_conf, DEFAULT_LOG_DIR, DEFAULT_LONG_QUERY_TIME, DEFAULT_LONG_TRANSACTION_TIME, DEFAULT_SERVER_MAX_SIZE, DEFAULT_SQL_LOG_MAX_SIZE, DEFAULT_TIME_TO_KILL, DLL_EXPORT, FMT_D, FMT_X, get_as_type_str(), t_br_conf::item, KEEP_CON_DEFAULT, MAX_NUM_CONF, NULL, t_br_conf::num, t_uc_conf::num_broker, OFF, ON, SET_CONF_ITEM_INT, SET_CONF_ITEM_KEEP_CON, SET_CONF_ITEM_ONOFF, SET_CONF_ITEM_SQL_LOG_MODE, SET_CONF_ITEM_STR, SQL_LOG_MODE_ERROR, UC_CONF_PARAM_ACCESS_LIST, UC_CONF_PARAM_ACCESS_LOG, UC_CONF_PARAM_APPL_SERVER, UC_CONF_PARAM_APPL_SERVER_MAX_SIZE, UC_CONF_PARAM_APPL_SERVER_SHM_ID, UC_CONF_PARAM_AUTO_ADD_APPL_SERVER, UC_CONF_PARAM_BROKER_NAME, UC_CONF_PARAM_BROKER_PORT, UC_CONF_PARAM_JOB_QUEUE_SIZE, UC_CONF_PARAM_KEEP_CONNECTION, UC_CONF_PARAM_LOG_BACKUP, UC_CONF_PARAM_LOG_DIR, UC_CONF_PARAM_LONG_QUERY_TIME, UC_CONF_PARAM_LONG_TRANSACTION_TIME, UC_CONF_PARAM_MAX_NUM_APPL_SERVER, UC_CONF_PARAM_MAX_STRING_LENGTH, UC_CONF_PARAM_MIN_NUM_APPL_SERVER, UC_CONF_PARAM_SERVICE, UC_CONF_PARAM_SESSION_TIMEOUT, UC_CONF_PARAM_SOURCE_ENV, UC_CONF_PARAM_SQL_LOG, UC_CONF_PARAM_SQL_LOG_MAX_SIZE, UC_CONF_PARAM_STRIPPED_COLUMN_NAME, and UC_CONF_PARAM_TIME_TO_KILL.
DLL_EXPORT int uc_del_cas_log | ( | const char * | br_name, |
int | asid, | ||
char * | err_msg | ||
) |
Definition at line 989 of file broker_admin_so.c.
References admin_common(), admin_del_cas_log(), BROKER_PATH_MAX, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_drop | ( | const char * | br_name, |
char * | err_msg | ||
) |
Definition at line 419 of file broker_admin_so.c.
References admin_common(), admin_drop_cmd(), admin_log_write(), CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_get_active_session_with_opened_shm | ( | void * | shm_p, |
char * | err_msg | ||
) |
Definition at line 260 of file broker_admin_so.c.
References t_shm_broker::br_info, CHECK_SHARED_MEMORY, DLL_EXPORT, i, t_shm_broker::num_broker, t_broker_info::num_busy_count, ON, t_broker_info::service_flag, and shm_br.
DLL_EXPORT int uc_get_as_num_with_opened_shm | ( | void * | shm_br, |
int | br_index, | ||
char * | err_msg | ||
) |
Definition at line 231 of file broker_admin_so.c.
References br_index, CHECK_SHARED_MEMORY, and DLL_EXPORT.
DLL_EXPORT int uc_get_as_query_processed_with_opened_shm | ( | void * | shm_as, |
long long | array[], | ||
int | array_size, | ||
char * | err_msg | ||
) |
Definition at line 294 of file broker_admin_so.c.
References CHECK_SHARED_MEMORY, DLL_EXPORT, and i.
DLL_EXPORT int uc_get_as_reqs_received_with_opened_shm | ( | void * | shm_as, |
long long | array[], | ||
int | array_size, | ||
char * | err_msg | ||
) |
Definition at line 238 of file broker_admin_so.c.
References CHECK_SHARED_MEMORY, DLL_EXPORT, and i.
DLL_EXPORT int uc_get_as_tran_processed_with_opened_shm | ( | void * | shm_as, |
long long | array[], | ||
int | array_size, | ||
char * | err_msg | ||
) |
Definition at line 279 of file broker_admin_so.c.
References CHECK_SHARED_MEMORY, DLL_EXPORT, and i.
DLL_EXPORT int uc_get_br_name_with_opened_shm | ( | void * | shm_br, |
int | br_index, | ||
char * | name, | ||
int | buffer_size, | ||
char * | err_msg | ||
) |
Definition at line 191 of file broker_admin_so.c.
References CHECK_SHARED_MEMORY, DLL_EXPORT, and NULL.
DLL_EXPORT int uc_get_br_num_with_opened_shm | ( | void * | shm_br, |
char * | err_msg | ||
) |
Definition at line 184 of file broker_admin_so.c.
References CHECK_SHARED_MEMORY, and DLL_EXPORT.
DLL_EXPORT void uc_info_free | ( | void * | info | ) |
Definition at line 676 of file broker_admin_so.c.
References DLL_EXPORT, and FREE_MEM.
Referenced by uc_as_info(), and uc_br_info().
DLL_EXPORT int uc_off | ( | const char * | br_name, |
char * | err_msg | ||
) |
Definition at line 469 of file broker_admin_so.c.
References admin_common(), admin_log_write(), admin_off_cmd(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_on | ( | const char * | br_name, |
char * | err_msg | ||
) |
Definition at line 444 of file broker_admin_so.c.
References admin_common(), admin_log_write(), admin_on_cmd(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_restart | ( | const char * | br_name, |
int | as_index, | ||
char * | err_msg | ||
) |
Definition at line 394 of file broker_admin_so.c.
References admin_common(), admin_log_write(), admin_restart_cmd(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT void uc_shm_detach | ( | void * | p | ) |
Definition at line 309 of file broker_admin_so.c.
References DLL_EXPORT, and uw_shm_detach().
DLL_EXPORT int uc_start | ( | char * | err_msg | ) |
Definition at line 321 of file broker_admin_so.c.
References admin_common(), admin_log_write(), admin_start_cmd(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, and MAX_BROKER_NUM.
DLL_EXPORT int uc_stop | ( | char * | err_msg | ) |
Definition at line 346 of file broker_admin_so.c.
References admin_common(), admin_log_write(), admin_stop_cmd(), BROKER_PATH_MAX, CP_ADMIN_ERR_MSG, DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT int uc_unicas_conf | ( | T_UC_CONF * | unicas_conf, |
int * | ret_mst_shmid, | ||
char * | err_msg | ||
) |
Definition at line 840 of file broker_admin_so.c.
References admin_common(), BROKER_PATH_MAX, conf_copy_broker(), conf_copy_header(), DLL_EXPORT, MAX_BROKER_NUM, and NULL.
DLL_EXPORT void uc_unicas_conf_free | ( | T_UC_CONF * | unicas_conf | ) |
Definition at line 870 of file broker_admin_so.c.
References t_uc_conf::br_conf, conf_item_free(), DLL_EXPORT, FREE_MEM, t_uc_conf::header_conf, i, t_br_conf::item, t_br_conf::num, t_uc_conf::num_broker, and t_uc_conf::num_header.
DLL_EXPORT const char* uc_version | ( | void | ) |
Definition at line 315 of file broker_admin_so.c.
References DLL_EXPORT, and makestring.