CUBRID Engine
latest
|
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <time.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include <curses.h>
#include <sys/types.h>
#include <regex.h>
#include <sys/time.h>
#include "cubrid_getopt.h"
#include "porting.h"
#include "cas_common.h"
#include "broker_config.h"
#include "broker_shm.h"
#include "broker_util.h"
#include "broker_process_size.h"
#include "broker_process_info.h"
#include "cas_util.h"
#include "shard_shm.h"
#include "shard_metadata.h"
#include "util_func.h"
Go to the source code of this file.
Classes | |
struct | status_field |
struct | appl_monitoring_item |
struct | br_monitoring_item |
struct | shard_stat_item |
struct | key_stat_item |
Macros | |
#define | __STDC_FORMAT_MACROS |
#define | DEFAULT_CHECK_PERIOD 300 /* seconds */ |
#define | MAX_APPL_NUM 100 |
#define | FIELD_DELIMITER ' ' |
#define | FIELD_WIDTH_BROKER_NAME 20 |
#define | FIELD_WIDTH_AS_ID 10 |
#define | BROKER_MONITOR_FLAG_MASK 0x01 |
#define | SHARDDB_MONITOR_FLAG_MASK 0x02 |
#define | PROXY_MONITOR_FLAG_MASK 0x04 |
#define | METADATA_MONITOR_FLAG_MASK 0x08 |
#define | CLIENT_MONITOR_FLAG_MASK 0x10 |
#define | UNUSABLE_DATABASES_FLAG_MASK 0x20 |
Typedefs | |
typedef struct appl_monitoring_item | APPL_MONITORING_ITEM |
typedef struct br_monitoring_item | BR_MONITORING_ITEM |
typedef struct shard_stat_item | SHARD_STAT_ITEM |
typedef struct key_stat_item | KEY_STAT_ITEM |
Functions | |
static void | str_to_screen (const char *msg) |
static void | print_newline () |
static int | get_char (void) |
static void | print_usage (void) |
static int | get_args (int argc, char *argv[], char *br_vector) |
static void | print_job_queue (T_MAX_HEAP_NODE *) |
static void | ip2str (unsigned char *ip, char *ip_str) |
static void | time2str (const time_t t, char *str) |
static void | print_monitor_header (MONITOR_TYPE mnt_type) |
static void | set_monitor_items (BR_MONITORING_ITEM *mnt_items, T_BROKER_INFO *br_info, T_SHM_APPL_SERVER *shm_appl, T_SHM_PROXY *shm_proxy, MONITOR_TYPE mnt_type) |
static void | print_monitor_items (BR_MONITORING_ITEM *mnt_items_cur, BR_MONITORING_ITEM *mnt_items_old, int num_mnt_items, double elapsed_time, T_BROKER_INFO *br_info_p, T_SHM_APPL_SERVER *shm_appl, MONITOR_TYPE mnt_type) |
static void | appl_info_display (T_SHM_APPL_SERVER *shm_appl, T_APPL_SERVER_INFO *as_info_p, int br_index, int as_index, APPL_MONITORING_ITEM *appl_mnt_old, time_t current_time, double elapsed_time) |
static int | appl_monitor (char *br_vector, double elapsed_time) |
static int | brief_monitor (char *br_vector, MONITOR_TYPE mnt_type, double elapsed_time) |
static void | print_appl_header (bool use_pdh_flag) |
static int | print_title (char *buf_p, int buf_offset, FIELD_NAME name, const char *new_title_p) |
static void | print_value (FIELD_NAME name, const void *value, FIELD_TYPE type) |
static int | get_num_monitor_items (MONITOR_TYPE mnt_type, T_SHM_PROXY *shm_proxy_p) |
static const char * | get_access_mode_string (T_ACCESS_MODE_VALUE mode, int replica_only_flag) |
static const char * | get_sql_log_mode_string (T_SQL_LOG_MODE_VALUE mode) |
static const char * | get_status_string (T_APPL_SERVER_INFO *as_info_p, char appl_server) |
static void | get_cpu_usage_string (char *buf_p, float usage) |
static int | metadata_monitor (double elapsed_time) |
static int | client_monitor (void) |
static int | unusable_databases_monitor (void) |
static void | str_out (const char *fmt,...) |
int | main (int argc, char **argv) |
Variables | |
struct status_field | fields [FIELD_LAST+1] |
static T_SHM_BROKER * | shm_br |
static bool | display_job_queue = false |
static int | refresh_sec = 0 |
static int | last_access_sec = 0 |
static bool | tty_mode = false |
static bool | full_info_flag = false |
static int | state_interval = 1 |
static char | service_filter_value = SERVICE_UNKNOWN |
static unsigned int | monitor_flag = 0 |
#define __STDC_FORMAT_MACROS |
Definition at line 27 of file broker_monitor.c.
#define BROKER_MONITOR_FLAG_MASK 0x01 |
Definition at line 88 of file broker_monitor.c.
Referenced by get_args(), main(), and print_monitor_header().
#define CLIENT_MONITOR_FLAG_MASK 0x10 |
Definition at line 92 of file broker_monitor.c.
Referenced by get_args(), and main().
#define DEFAULT_CHECK_PERIOD 300 /* seconds */ |
Definition at line 80 of file broker_monitor.c.
#define FIELD_DELIMITER ' ' |
Definition at line 83 of file broker_monitor.c.
Referenced by appl_monitor(), brief_monitor(), print_title(), print_value(), and unusable_databases_monitor().
#define FIELD_WIDTH_AS_ID 10 |
Definition at line 86 of file broker_monitor.c.
Referenced by appl_info_display().
#define FIELD_WIDTH_BROKER_NAME 20 |
Definition at line 85 of file broker_monitor.c.
Referenced by brief_monitor().
#define MAX_APPL_NUM 100 |
Definition at line 81 of file broker_monitor.c.
#define METADATA_MONITOR_FLAG_MASK 0x08 |
Definition at line 91 of file broker_monitor.c.
Referenced by get_args(), and main().
#define PROXY_MONITOR_FLAG_MASK 0x04 |
Definition at line 90 of file broker_monitor.c.
Referenced by get_args(), and main().
#define SHARDDB_MONITOR_FLAG_MASK 0x02 |
Definition at line 89 of file broker_monitor.c.
Referenced by get_args(), and main().
#define UNUSABLE_DATABASES_FLAG_MASK 0x20 |
Definition at line 93 of file broker_monitor.c.
Referenced by get_args(), and main().
typedef struct appl_monitoring_item APPL_MONITORING_ITEM |
Definition at line 252 of file broker_monitor.c.
typedef struct br_monitoring_item BR_MONITORING_ITEM |
Definition at line 262 of file broker_monitor.c.
typedef struct key_stat_item KEY_STAT_ITEM |
Definition at line 309 of file broker_monitor.c.
typedef struct shard_stat_item SHARD_STAT_ITEM |
Definition at line 299 of file broker_monitor.c.
enum FIELD_ALIGN |
Enumerator | |
---|---|
FIELD_LEFT_ALIGN | |
FIELD_RIGHT_ALIGN |
Definition at line 170 of file broker_monitor.c.
enum FIELD_NAME |
Definition at line 99 of file broker_monitor.c.
enum FIELD_TYPE |
Enumerator | |
---|---|
FIELD_T_STRING | |
FIELD_T_INT | |
FIELD_T_FLOAT | |
FIELD_T_UINT64 | |
FIELD_T_INT64 | |
FIELD_T_TIME |
Definition at line 152 of file broker_monitor.c.
enum MONITOR_TYPE |
Enumerator | |
---|---|
MONITOR_T_BROKER | |
MONITOR_T_SHARDDB | |
MONITOR_T_PROXY | |
MONITOR_T_LAST |
Definition at line 162 of file broker_monitor.c.
|
static |
Definition at line 883 of file broker_monitor.c.
References t_broker_info::appl_server, t_shm_broker::br_info, t_appl_server_info::cas_clt_ip, t_appl_server_info::con_status, CON_STATUS_OUT_TRAN, t_appl_server_info::cur_sql_log_mode, t_appl_server_info::database_host, t_appl_server_info::database_name, t_appl_server_info::driver_version, FIELD_CLIENT_IP, FIELD_CLIENT_VERSION, FIELD_CONNECT, FIELD_CPU_TIME, FIELD_CPU_USAGE, FIELD_DB_NAME, FIELD_HOST, FIELD_ID, FIELD_LAST_ACCESS_TIME, FIELD_LAST_CONNECT_TIME, FIELD_LQS, FIELD_PID, FIELD_PORT, FIELD_PSIZE, FIELD_QPS, FIELD_RESTART, FIELD_SQL_LOG_MODE, FIELD_STATUS, FIELD_T_INT, FIELD_T_STRING, FIELD_T_TIME, FIELD_T_UINT64, FIELD_TRANSACTION_STIME, FIELD_WIDTH_AS_ID, full_info_flag, get_cpu_usage_string(), get_psinfo(), get_sql_log_mode_string(), get_status_string(), getsize(), IS_APPL_SERVER_TYPE_CAS, last_access_sec, t_appl_server_info::last_access_time, t_appl_server_info::last_connect_time, t_appl_server_info::log_msg, appl_monitoring_item::lqs, t_appl_server_info::num_connect_requests, t_appl_server_info::num_long_queries, appl_monitoring_item::num_long_query, t_appl_server_info::num_queries_processed, appl_monitoring_item::num_query_processed, t_appl_server_info::num_restarts, ON, t_appl_server_info::pid, print_newline(), print_value(), proxy_id, t_appl_server_info::proxy_id, appl_monitoring_item::qps, t_appl_server_info::service_flag, SERVICE_ON, t_appl_server_info::shard_cas_id, t_shm_appl_server::shard_flag, t_appl_server_info::shard_id, t_shm_appl_server::sql_log_mode, str_out(), tran_start_time, t_appl_server_info::transaction_start_time, TRUE, ut_get_ipv4_string(), t_appl_server_info::uts_status, and UTS_STATUS_BUSY.
Referenced by appl_monitor().
|
static |
Definition at line 1048 of file broker_monitor.c.
References appl_info_display(), t_broker_info::appl_server_max_num, t_broker_info::appl_server_shm_id, t_shm_appl_server::as_info, t_shm_broker::br_info, display_job_queue, FIELD_DELIMITER, i, JOB_QUEUE_MAX_SIZE, t_broker_info::name, NULL, t_shm_broker::num_broker, OFF, print_appl_header(), print_job_queue(), print_newline(), service_filter_value, t_broker_info::service_flag, SERVICE_ON, SERVICE_UNKNOWN, t_shm_appl_server::shard_flag, shm_appl, SHM_APPL_SERVER, SHM_MODE_MONITOR, str_out(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
|
static |
Definition at line 1603 of file broker_monitor.c.
References t_broker_info::appl_server_shm_id, assert, br_index, t_shm_broker::br_info, br_info_p, broker_name, BROKER_NAME_LEN, error(), FIELD_BROKER_NAME, FIELD_DELIMITER, FIELD_T_STRING, FIELD_WIDTH_BROKER_NAME, get_num_monitor_items(), MAX_PROXY_NUM, MAX_SHARD_CONN, min, MONITOR_T_BROKER, MONITOR_T_LAST, MONITOR_T_PROXY, MONITOR_T_SHARDDB, t_broker_info::name, NULL, t_shm_broker::num_broker, OFF, ON, print_monitor_header(), print_monitor_items(), print_newline(), print_value(), t_broker_info::proxy_shm_id, service_filter_value, t_broker_info::service_flag, SERVICE_ON, SERVICE_UNKNOWN, set_monitor_items(), t_broker_info::shard_flag, shm_appl, SHM_APPL_SERVER, SHM_MODE_MONITOR, SHM_PROXY, shm_proxy_p, str_out(), strlen, uw_shm_detach(), uw_shm_open(), and status_field::width.
Referenced by main().
|
static |
Definition at line 2362 of file broker_monitor.c.
References t_shm_broker::br_info, t_client_info::client_id, t_client_info::client_ip, t_client_info::connect_time, t_proxy_info::cur_client, full_info_flag, t_client_info::func_code, i, t_proxy_info::max_client, t_proxy_info::max_context, t_broker_info::name, NULL, t_shm_broker::num_broker, t_shm_proxy::num_proxy, OFF, print_newline(), proxy_info_p, t_broker_info::proxy_shm_id, t_client_info::req_time, t_client_info::res_time, t_broker_info::service_flag, SERVICE_ON, t_broker_info::shard_flag, shard_shm_find_proxy_info(), shard_shm_get_client_info(), SHM_MODE_MONITOR, SHM_PROXY, shm_proxy_p, str_out(), ut_uchar2ipstr(), uw_shm_detach(), and uw_shm_open().
Referenced by main().
|
static |
Definition at line 2715 of file broker_monitor.c.
References READ_ONLY_ACCESS_MODE, READ_WRITE_ACCESS_MODE, and SLAVE_ONLY_ACCESS_MODE.
Referenced by print_monitor_items().
|
static |
Definition at line 704 of file broker_monitor.c.
References argc, t_shm_broker::br_info, BROKER_MONITOR_FLAG_MASK, CLIENT_MONITOR_FLAG_MASK, display_job_queue, full_info_flag, getopt(), last_access_sec, METADATA_MONITOR_FLAG_MASK, monitor_flag, t_broker_info::name, NULL, t_shm_broker::num_broker, optarg, optind, print_usage(), PROXY_MONITOR_FLAG_MASK, refresh_sec, service_filter_value, SERVICE_OFF, SERVICE_ON, SERVICE_UNKNOWN, SHARDDB_MONITOR_FLAG_MASK, state_interval, strlen, tty_mode, and UNUSABLE_DATABASES_FLAG_MASK.
Referenced by main().
|
static |
Definition at line 422 of file broker_monitor.c.
References i, t_shm_broker::magic, NULL, refresh_sec, and SLEEP_MILISEC.
Referenced by main().
|
static |
Definition at line 2780 of file broker_monitor.c.
Referenced by appl_info_display(), and print_monitor_items().
|
static |
Definition at line 2668 of file broker_monitor.c.
References assert, t_proxy_info::max_shard, MONITOR_T_BROKER, MONITOR_T_PROXY, MONITOR_T_SHARDDB, t_shm_proxy::num_proxy, and t_shm_proxy::proxy_info.
Referenced by brief_monitor().
|
static |
Definition at line 2695 of file broker_monitor.c.
References SQL_LOG_MODE_ALL, SQL_LOG_MODE_ERROR, SQL_LOG_MODE_NONE, SQL_LOG_MODE_NOTICE, and SQL_LOG_MODE_TIMEOUT.
Referenced by appl_info_display(), and print_monitor_items().
|
static |
Definition at line 2731 of file broker_monitor.c.
References assert, t_appl_server_info::con_status, CON_STATUS_OUT_TRAN, IS_APPL_SERVER_TYPE_CAS, t_appl_server_info::log_msg, NULL, t_appl_server_info::uts_status, UTS_STATUS_BUSY, UTS_STATUS_CON_WAIT, and UTS_STATUS_RESTART.
Referenced by appl_info_display().
|
static |
Definition at line 863 of file broker_monitor.c.
Referenced by print_job_queue().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 450 of file broker_monitor.c.
References appl_monitor(), brief_monitor(), broker_config_read(), BROKER_MONITOR_FLAG_MASK, cubregex::clear(), client_monitor(), CLIENT_MONITOR_FLAG_MASK, err, get_args(), get_char(), i, t_shm_broker::magic, makestring, MAX_BROKER_NUM, metadata_monitor(), METADATA_MONITOR_FLAG_MASK, monitor_flag, MONITOR_T_BROKER, MONITOR_T_PROXY, MONITOR_T_SHARDDB, NULL, t_shm_broker::num_broker, PRINT_AND_LOG_ERR_MSG, print_newline(), PROXY_MONITOR_FLAG_MASK, refresh_sec, SHARDDB_MONITOR_FLAG_MASK, SHM_BROKER, SHM_MODE_MONITOR, SLEEP_MILISEC, str_out(), tty_mode, UNUSABLE_DATABASES_FLAG_MASK, unusable_databases_monitor(), ut_cd_work_dir(), uw_shm_detach(), and uw_shm_open().
|
static |
Definition at line 1930 of file broker_monitor.c.
References assert, t_shm_broker::br_info, t_shard_conn::db_conn_info, t_shard_user::db_name, t_shard_conn::db_name, t_shard_user::db_user, FIELD_SHARD_Q_SIZE, FIELD_T_INT, full_info_flag, i, t_shard_key::key_column, t_shard_key_range::max, MAX_PROXY_NUM, MAX_SHARD_CONN, MAX_SHARD_KEY, t_shard_key_range::min, t_broker_info::name, NULL, t_shm_broker::num_broker, t_proxy_info::num_hint_err_queries_processed, shard_stat_item::num_hint_id_queries_requested, t_shm_shard_conn_stat::num_hint_id_queries_requested, shard_stat_item::num_hint_key_queries_requested, t_shm_shard_conn_stat::num_hint_key_queries_requested, t_shard_key::num_key_range, t_shm_shard_key_stat::num_key_range, shard_stat_item::num_no_hint_queries_requested, t_shm_shard_conn_stat::num_no_hint_queries_requested, t_shm_proxy::num_proxy, key_stat_item::num_range_queries_requested, t_shm_shard_key_range_stat::num_range_queries_requested, t_shm_shard_conn::num_shard_conn, t_proxy_info::num_shard_conn, t_shm_shard_key::num_shard_key, t_proxy_info::num_shard_key, t_shm_shard_user::num_shard_user, OFF, print_newline(), print_value(), t_shm_proxy::proxy_info, proxy_info_p, t_broker_info::proxy_shm_id, t_shard_key::range, t_broker_info::service_flag, SERVICE_ON, t_shm_shard_conn::shard_conn, t_broker_info::shard_flag, t_shard_key_range::shard_id, t_shard_conn::shard_id, SHARD_INFO_SIZE_LIMIT, t_shm_shard_key::shard_key, t_broker_info::shard_key_function_name, t_broker_info::shard_key_library_name, t_broker_info::shard_key_modular, shard_metadata_get_conn(), shard_metadata_get_key(), shard_metadata_get_user(), shard_shm_find_proxy_info(), shard_shm_find_shard_info(), shard_shm_get_key_stat(), shard_shm_get_shard_stat(), t_shm_shard_user::shard_user, shm_conn_p, shm_key_p, SHM_MODE_MONITOR, SHM_PROXY, shm_proxy_p, shm_user_p, t_shm_shard_key_stat::stat, str_out(), uw_shm_detach(), uw_shm_open(), and t_shard_info::waiter_count.
Referenced by main().
|
static |
Definition at line 1799 of file broker_monitor.c.
References cubregex::clear(), FIELD_CLIENT_IP, FIELD_CLIENT_VERSION, FIELD_CONNECT, FIELD_CPU_TIME, FIELD_CPU_USAGE, FIELD_DB_NAME, FIELD_HOST, FIELD_ID, FIELD_LAST_ACCESS_TIME, FIELD_LAST_CONNECT_TIME, FIELD_LQS, FIELD_PID, FIELD_PORT, FIELD_PSIZE, FIELD_QPS, FIELD_RESTART, FIELD_SQL_LOG_MODE, FIELD_STATUS, FIELD_TRANSACTION_STIME, full_info_flag, i, NULL, print_newline(), print_title(), and str_out().
Referenced by appl_monitor().
|
static |
Definition at line 830 of file broker_monitor.c.
References t_max_heap_node::id, ip2str(), t_max_heap_node::ip_addr, max_heap_delete(), t_max_heap_node::prg_name, print_newline(), t_max_heap_node::priority, t_max_heap_node::recv_time, t_max_heap_node::script, str_out(), and time2str().
Referenced by appl_monitor().
|
static |
Definition at line 1153 of file broker_monitor.c.
References assert, BROKER_MONITOR_FLAG_MASK, FIELD_ACCESS_MODE, FIELD_APPL_SERVER_NUM_BUSY, FIELD_APPL_SERVER_NUM_BUSY_IN_SEC, FIELD_APPL_SERVER_NUM_CLIENT_WAIT, FIELD_APPL_SERVER_NUM_CLIENT_WAIT_IN_SEC, FIELD_APPL_SERVER_NUM_TOTAL, FIELD_BROKER_NAME, FIELD_CANCELED, FIELD_CPU_TIME, FIELD_CPU_USAGE, FIELD_ERROR_QUERIES, FIELD_JOB_QUEUE_ID, FIELD_LONG_QUERY, FIELD_LONG_TRANSACTION, FIELD_NUM_OF_DELETE_QUERIES, FIELD_NUM_OF_INSERT_QUERIES, FIELD_NUM_OF_OTHERS_QUERIES, FIELD_NUM_OF_SELECT_QUERIES, FIELD_NUM_OF_UPDATE_QUERIES, FIELD_NUMBER_OF_CONNECTION, FIELD_NUMBER_OF_CONNECTION_REJECTED, FIELD_PID, FIELD_PORT, FIELD_PROXY_ID, FIELD_PSIZE, FIELD_QPS, FIELD_REQUEST, FIELD_RESTART, FIELD_SHARD_ID, FIELD_SHARD_Q_SIZE, FIELD_SQL_LOG, FIELD_STMT_POOL_RATIO, FIELD_THREAD, FIELD_TPS, FIELD_UNIQUE_ERROR_QUERIES, full_info_flag, i, monitor_flag, MONITOR_T_BROKER, MONITOR_T_LAST, MONITOR_T_PROXY, MONITOR_T_SHARDDB, NULL, print_newline(), print_title(), state_interval, str_out(), and tty_mode.
Referenced by brief_monitor().
|
static |
Definition at line 1420 of file broker_monitor.c.
References t_broker_info::access_mode, assert, t_psinfo::cpu_time, br_monitoring_item::eqs, br_monitoring_item::eqs_ui, FIELD_ACCESS_MODE, FIELD_APPL_SERVER_NUM_BUSY, FIELD_APPL_SERVER_NUM_BUSY_IN_SEC, FIELD_APPL_SERVER_NUM_CLIENT_WAIT, FIELD_APPL_SERVER_NUM_CLIENT_WAIT_IN_SEC, FIELD_APPL_SERVER_NUM_TOTAL, FIELD_CANCELED, FIELD_CPU_TIME, FIELD_CPU_USAGE, FIELD_ERROR_QUERIES, FIELD_JOB_QUEUE_ID, FIELD_LONG_QUERY, FIELD_LONG_TRANSACTION, FIELD_NUM_OF_DELETE_QUERIES, FIELD_NUM_OF_INSERT_QUERIES, FIELD_NUM_OF_OTHERS_QUERIES, FIELD_NUM_OF_SELECT_QUERIES, FIELD_NUM_OF_UPDATE_QUERIES, FIELD_NUMBER_OF_CONNECTION, FIELD_NUMBER_OF_CONNECTION_REJECTED, FIELD_PID, FIELD_PORT, FIELD_PROXY_ID, FIELD_PSIZE, FIELD_QPS, FIELD_REQUEST, FIELD_RESTART, FIELD_SHARD_ID, FIELD_SHARD_Q_SIZE, FIELD_SQL_LOG, FIELD_STMT_POOL_RATIO, FIELD_T_FLOAT, FIELD_T_INT, FIELD_T_INT64, FIELD_T_STRING, FIELD_T_UINT64, FIELD_THREAD, FIELD_TPS, FIELD_UNIQUE_ERROR_QUERIES, full_info_flag, get_access_mode_string(), get_cpu_usage_string(), get_psinfo(), get_sql_log_mode_string(), getsize(), i, t_max_heap_node::id, br_monitoring_item::its, t_shm_appl_server::job_queue, t_shm_appl_server::long_query_time, t_shm_appl_server::long_transaction_time, br_monitoring_item::lqs, br_monitoring_item::lts, MONITOR_T_BROKER, MONITOR_T_LAST, MONITOR_T_PROXY, MONITOR_T_SHARDDB, NULL, br_monitoring_item::num_appl_server, br_monitoring_item::num_busy, br_monitoring_item::num_busy_nsec, br_monitoring_item::num_client_wait, br_monitoring_item::num_client_wait_nsec, br_monitoring_item::num_connect, br_monitoring_item::num_connect_reject, br_monitoring_item::num_delete_query, br_monitoring_item::num_eq, br_monitoring_item::num_eq_ui, br_monitoring_item::num_insert_query, br_monitoring_item::num_interrupt, br_monitoring_item::num_interrupts, br_monitoring_item::num_lq, br_monitoring_item::num_lt, br_monitoring_item::num_others_query, br_monitoring_item::num_qx, br_monitoring_item::num_request, br_monitoring_item::num_request_stmt, br_monitoring_item::num_request_stmt_in_pool, br_monitoring_item::num_restart, br_monitoring_item::num_select_query, t_psinfo::num_thr, br_monitoring_item::num_tx, br_monitoring_item::num_update_query, t_psinfo::pcpu, t_broker_info::pid, t_broker_info::port, print_newline(), print_value(), proxy_id, br_monitoring_item::qps, t_broker_info::replica_only_flag, br_monitoring_item::shard_waiter_count, t_broker_info::sql_log_mode, br_monitoring_item::tps, and TRUE.
Referenced by brief_monitor().
|
static |
Definition at line 408 of file broker_monitor.c.
References refresh_sec, str_to_screen(), and tty_mode.
Referenced by appl_info_display(), appl_monitor(), brief_monitor(), client_monitor(), main(), metadata_monitor(), print_appl_header(), print_job_queue(), print_monitor_header(), print_monitor_items(), and unusable_databases_monitor().
|
static |
Definition at line 2537 of file broker_monitor.c.
References status_field::align, assert, FIELD_BROKER_NAME, FIELD_DELIMITER, FIELD_LEFT_ALIGN, status_field::name, NULL, status_field::title, and status_field::width.
Referenced by print_appl_header(), print_monitor_header(), and unusable_databases_monitor().
|
static |
Definition at line 688 of file broker_monitor.c.
Referenced by get_args().
|
static |
Definition at line 2586 of file broker_monitor.c.
References status_field::align, assert, FIELD_DELIMITER, FIELD_LEFT_ALIGN, FIELD_T_FLOAT, FIELD_T_INT, FIELD_T_INT64, FIELD_T_STRING, FIELD_T_TIME, FIELD_T_UINT64, status_field::name, NULL, str_out(), and status_field::width.
Referenced by appl_info_display(), brief_monitor(), metadata_monitor(), print_monitor_items(), and unusable_databases_monitor().
|
static |
Definition at line 1277 of file broker_monitor.c.
References t_broker_info::appl_server_max_num, t_broker_info::appl_server_num, t_shm_appl_server::as_info, assert, t_appl_server_info::con_status, CON_STATUS_OUT_TRAN, full_info_flag, i, t_appl_server_info::last_access_time, t_appl_server_info::log_msg, t_proxy_info::max_shard, MONITOR_T_BROKER, MONITOR_T_LAST, MONITOR_T_PROXY, MONITOR_T_SHARDDB, NULL, br_monitoring_item::num_appl_server, t_shard_info::num_appl_server, br_monitoring_item::num_busy, br_monitoring_item::num_busy_nsec, br_monitoring_item::num_client_wait, br_monitoring_item::num_client_wait_nsec, br_monitoring_item::num_connect, br_monitoring_item::num_connect_reject, t_appl_server_info::num_connect_rejected, t_proxy_info::num_connect_rejected, t_appl_server_info::num_connect_requests, t_proxy_info::num_connect_requests, t_appl_server_info::num_delete_queries, br_monitoring_item::num_delete_query, br_monitoring_item::num_eq, br_monitoring_item::num_eq_ui, t_appl_server_info::num_error_queries, t_appl_server_info::num_insert_queries, br_monitoring_item::num_insert_query, br_monitoring_item::num_interrupts, t_appl_server_info::num_interrupts, t_appl_server_info::num_long_queries, t_appl_server_info::num_long_transactions, br_monitoring_item::num_lq, br_monitoring_item::num_lt, br_monitoring_item::num_others_query, t_shm_proxy::num_proxy, t_proxy_info::num_proxy_error_processed, t_appl_server_info::num_queries_processed, br_monitoring_item::num_qx, br_monitoring_item::num_request, t_appl_server_info::num_request, br_monitoring_item::num_request_stmt, t_proxy_info::num_request_stmt, br_monitoring_item::num_request_stmt_in_pool, t_proxy_info::num_request_stmt_in_pool, t_appl_server_info::num_requests_received, br_monitoring_item::num_restart, t_proxy_info::num_restarts, t_appl_server_info::num_select_queries, br_monitoring_item::num_select_query, t_appl_server_info::num_transactions_processed, br_monitoring_item::num_tx, t_appl_server_info::num_unique_error_queries, t_appl_server_info::num_update_queries, br_monitoring_item::num_update_query, OFF, ON, t_appl_server_info::proxy_id, t_shm_proxy::proxy_info, proxy_info_p, t_appl_server_info::service_flag, t_shm_appl_server::shard_flag, t_appl_server_info::shard_id, t_proxy_info::shard_info, br_monitoring_item::shard_waiter_count, state_interval, t_appl_server_info::uts_status, UTS_STATUS_BUSY, and t_shard_info::waiter_count.
Referenced by brief_monitor().
|
static |
Definition at line 389 of file broker_monitor.c.
References refresh_sec, str_to_screen(), and tty_mode.
Referenced by appl_info_display(), appl_monitor(), brief_monitor(), client_monitor(), main(), metadata_monitor(), print_appl_header(), print_job_queue(), print_monitor_header(), print_value(), unicode_compose_string(), unicode_decompose_string(), and unusable_databases_monitor().
|
static |
Definition at line 378 of file broker_monitor.c.
Referenced by print_newline(), and str_out().
|
static |
Definition at line 870 of file broker_monitor.c.
References NULL.
Referenced by print_job_queue().
|
static |
Definition at line 2475 of file broker_monitor.c.
References t_broker_info::appl_server_shm_id, t_shm_broker::br_info, t_db_server::database_host, t_db_server::database_name, FIELD_BROKER_NAME, FIELD_DELIMITER, FIELD_T_STRING, FIELD_UNUSABLE_DATABASES, i, t_shm_appl_server::monitor_server_flag, t_broker_info::name, NULL, t_shm_broker::num_broker, print_newline(), print_title(), print_value(), t_broker_info::service_flag, SERVICE_ON, shm_appl, SHM_APPL_SERVER, SHM_MODE_MONITOR, str_out(), strlen, t_shm_appl_server::unusable_databases, t_shm_appl_server::unusable_databases_cnt, t_shm_appl_server::unusable_databases_seq, uw_shm_detach(), and uw_shm_open().
Referenced by main().
|
static |
Definition at line 363 of file broker_monitor.c.
Referenced by appl_monitor(), and get_args().
struct status_field fields[FIELD_LAST+1] |
Definition at line 184 of file broker_monitor.c.
Referenced by pp_print_link().
|
static |
Definition at line 367 of file broker_monitor.c.
Referenced by admin_getid_cmd(), appl_info_display(), client_monitor(), get_args(), metadata_monitor(), print_appl_header(), print_monitor_header(), print_monitor_items(), and set_monitor_items().
|
static |
Definition at line 365 of file broker_monitor.c.
Referenced by appl_info_display(), and get_args().
|
static |
Definition at line 371 of file broker_monitor.c.
Referenced by get_args(), main(), and print_monitor_header().
|
static |
Definition at line 364 of file broker_monitor.c.
Referenced by get_args(), get_char(), main(), print_newline(), and str_out().
|
static |
Definition at line 369 of file broker_monitor.c.
Referenced by appl_monitor(), brief_monitor(), and get_args().
|
static |
Definition at line 362 of file broker_monitor.c.
|
static |
Definition at line 368 of file broker_monitor.c.
Referenced by get_args(), print_monitor_header(), and set_monitor_items().
|
static |
Definition at line 366 of file broker_monitor.c.
Referenced by get_args(), main(), print_monitor_header(), print_newline(), and str_out().