CUBRID Engine  latest
broker_admin_so.c File Reference
#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"
Include dependency graph for broker_admin_so.c:

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)
 

Macro Definition Documentation

#define CHECK_SHARED_MEMORY (   p_shm,
  err_msg 
)
Value:
do { \
if (!p_shm) { \
if (err_msg) strcpy(err_msg, "Shared memory is not opened."); \
return -1; \
} \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

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 
)
Value:
do { \
(CONF_ITEM)[IDX].name = NAME; \
(CONF_ITEM)[IDX].value = VALUE; \
(IDX)++; \
} while (0)

Definition at line 86 of file broker_admin_so.c.

#define SET_CONF_ITEM_INT (   CONF_ITEM,
  IDX,
  NAME,
  VALUE,
  FMT 
)
Value:
do { \
char _macro_tmp_buf[32]; \
sprintf(_macro_tmp_buf, FMT, (VALUE)); \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup(_macro_tmp_buf)); \
} while (0)
char * strdup(const char *str)
Definition: porting.c:901
#define SET_CONF_ITEM(CONF_ITEM, IDX, NAME, VALUE)

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 
)
Value:
do { \
const char *_macro_tmp_ptr; \
if ((VALUE) == KEEP_CON_AUTO) \
_macro_tmp_ptr = "AUTO"; \
else \
_macro_tmp_ptr = "ON"; \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup(_macro_tmp_ptr)); \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
#define const
Definition: cnvlex.c:77
char * strdup(const char *str)
Definition: porting.c:901
#define SET_CONF_ITEM(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 
)
Value:
do { \
if ((VALUE) == ON) \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup("ON")); \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup("OFF")); \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
char * strdup(const char *str)
Definition: porting.c:901
#define SET_CONF_ITEM(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 
)
Value:
do { \
const char *_macro_tmp_ptr; \
if ((VALUE) & SQL_LOG_MODE_ALL) \
_macro_tmp_ptr = "ALL"; \
else if ((VALUE) & SQL_LOG_MODE_ERROR) \
_macro_tmp_ptr = "ERROR"; \
else /*((VALUE) == SQL_LOG_MODE_NONE)*/ \
_macro_tmp_ptr = "NONE"; \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup(_macro_tmp_ptr)); \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
#define const
Definition: cnvlex.c:77
else
char * strdup(const char *str)
Definition: porting.c:901
#define SET_CONF_ITEM(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 
)
Value:
do { \
SET_CONF_ITEM(CONF_ITEM, IDX, NAME, strdup(VALUE)); \
} while (0)
char * strdup(const char *str)
Definition: porting.c:901
#define SET_CONF_ITEM(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().

#define SET_FLAG (   ONOFF)    ((ONOFF) == ON ? FLAG_ON : FLAG_OFF)

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().

Function Documentation

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
static void admin_log_write ( const char *  log_file,
const char *  msg 
)
static

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().

Here is the caller graph for this function:

static void change_conf_as_type ( T_BR_CONF br_conf,
int  old_as_type,
int  new_as_type 
)
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().

Here is the caller graph for this function:

static int conf_copy_header ( T_UC_CONF unicas_conf,
int  master_shm_id,
char *  admin_log_file,
char *  err_msg 
)
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().

Here is the caller graph for this function:

static void conf_item_free ( T_UC_CONF_ITEM conf_item,
int  num 
)
static

Definition at line 1043 of file broker_admin_so.c.

References FREE_MEM, i, and NULL.

Referenced by uc_unicas_conf_free().

Here is the caller graph for this function:

static int copy_job_info ( T_JOB_INFO **  job_info,
T_MAX_HEAP_NODE job_q 
)
static
static int get_as_type ( const char *  type_str)
static
static const char * get_as_type_str ( char  as_type)
static
static char * get_broker_name ( T_BR_CONF br_conf)
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().

Here is the caller graph for this function:

static void reset_conf_value ( int  num_item,
T_UC_CONF_ITEM item,
const char *  name 
)
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().

Here is the caller graph for this function:

DLL_EXPORT int uc_add ( 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 
)

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 
)
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)
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 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 int uc_changer_internal ( const char *  br_name,
const char *  name,
const char *  value,
int  as_number,
char *  err_msg 
)
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().

Here is the caller graph for this function:

DLL_EXPORT int uc_del_cas_log ( const char *  br_name,
int  asid,
char *  err_msg 
)
DLL_EXPORT int uc_drop ( const char *  br_name,
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_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().

Here is the caller graph for this function:

DLL_EXPORT int uc_off ( const char *  br_name,
char *  err_msg 
)
DLL_EXPORT int uc_on ( const char *  br_name,
char *  err_msg 
)
DLL_EXPORT int uc_restart ( const char *  br_name,
int  as_index,
char *  err_msg 
)
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)
DLL_EXPORT int uc_stop ( char *  err_msg)
DLL_EXPORT int uc_unicas_conf ( T_UC_CONF unicas_conf,
int *  ret_mst_shmid,
char *  err_msg 
)
DLL_EXPORT const char* uc_version ( void  )

Definition at line 315 of file broker_admin_so.c.

References DLL_EXPORT, and makestring.