CUBRID Engine  latest
broker_monitor.c File Reference
#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
 

Enumerations

enum  FIELD_NAME {
  FIELD_BROKER_NAME = 0, FIELD_PID, FIELD_PSIZE, FIELD_PORT,
  FIELD_APPL_SERVER_NUM_TOTAL, FIELD_APPL_SERVER_NUM_CLIENT_WAIT, FIELD_APPL_SERVER_NUM_BUSY, FIELD_APPL_SERVER_NUM_CLIENT_WAIT_IN_SEC,
  FIELD_APPL_SERVER_NUM_BUSY_IN_SEC, FIELD_JOB_QUEUE_ID, FIELD_THREAD, FIELD_CPU_USAGE,
  FIELD_CPU_TIME, FIELD_TPS, FIELD_QPS, FIELD_NUM_OF_SELECT_QUERIES,
  FIELD_NUM_OF_INSERT_QUERIES, FIELD_NUM_OF_UPDATE_QUERIES, FIELD_NUM_OF_DELETE_QUERIES, FIELD_NUM_OF_OTHERS_QUERIES,
  FIELD_LONG_TRANSACTION, FIELD_LONG_QUERY, FIELD_ERROR_QUERIES, FIELD_UNIQUE_ERROR_QUERIES,
  FIELD_CANCELED, FIELD_ACCESS_MODE, FIELD_SQL_LOG, FIELD_NUMBER_OF_CONNECTION,
  FIELD_ID, FIELD_LQS, FIELD_STATUS, FIELD_LAST_ACCESS_TIME,
  FIELD_DB_NAME, FIELD_HOST, FIELD_LAST_CONNECT_TIME, FIELD_CLIENT_IP,
  FIELD_CLIENT_VERSION, FIELD_SQL_LOG_MODE, FIELD_TRANSACTION_STIME, FIELD_CONNECT,
  FIELD_RESTART, FIELD_REQUEST, FIELD_SHARD_ID, FIELD_PROXY_ID,
  FIELD_SHARD_Q_SIZE, FIELD_STMT_POOL_RATIO, FIELD_NUMBER_OF_CONNECTION_REJECTED, FIELD_UNUSABLE_DATABASES,
  FIELD_LAST = FIELD_UNUSABLE_DATABASES
}
 
enum  FIELD_TYPE {
  FIELD_T_STRING = 0, FIELD_T_INT, FIELD_T_FLOAT, FIELD_T_UINT64,
  FIELD_T_INT64, FIELD_T_TIME
}
 
enum  MONITOR_TYPE { MONITOR_T_BROKER = 0, MONITOR_T_SHARDDB, MONITOR_T_PROXY, MONITOR_T_LAST = MONITOR_T_PROXY }
 
enum  FIELD_ALIGN { FIELD_LEFT_ALIGN = 0, FIELD_RIGHT_ALIGN }
 

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_BROKERshm_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
 

Macro Definition Documentation

#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   ' '
#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 Documentation

Definition at line 252 of file broker_monitor.c.

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.

Definition at line 299 of file broker_monitor.c.

Enumeration Type Documentation

Enumerator
FIELD_LEFT_ALIGN 
FIELD_RIGHT_ALIGN 

Definition at line 170 of file broker_monitor.c.

enum FIELD_NAME
Enumerator
FIELD_BROKER_NAME 
FIELD_PID 
FIELD_PSIZE 
FIELD_PORT 
FIELD_APPL_SERVER_NUM_TOTAL 
FIELD_APPL_SERVER_NUM_CLIENT_WAIT 
FIELD_APPL_SERVER_NUM_BUSY 
FIELD_APPL_SERVER_NUM_CLIENT_WAIT_IN_SEC 
FIELD_APPL_SERVER_NUM_BUSY_IN_SEC 
FIELD_JOB_QUEUE_ID 
FIELD_THREAD 
FIELD_CPU_USAGE 
FIELD_CPU_TIME 
FIELD_TPS 
FIELD_QPS 
FIELD_NUM_OF_SELECT_QUERIES 
FIELD_NUM_OF_INSERT_QUERIES 
FIELD_NUM_OF_UPDATE_QUERIES 
FIELD_NUM_OF_DELETE_QUERIES 
FIELD_NUM_OF_OTHERS_QUERIES 
FIELD_LONG_TRANSACTION 
FIELD_LONG_QUERY 
FIELD_ERROR_QUERIES 
FIELD_UNIQUE_ERROR_QUERIES 
FIELD_CANCELED 
FIELD_ACCESS_MODE 
FIELD_SQL_LOG 
FIELD_NUMBER_OF_CONNECTION 
FIELD_ID 
FIELD_LQS 
FIELD_STATUS 
FIELD_LAST_ACCESS_TIME 
FIELD_DB_NAME 
FIELD_HOST 
FIELD_LAST_CONNECT_TIME 
FIELD_CLIENT_IP 
FIELD_CLIENT_VERSION 
FIELD_SQL_LOG_MODE 
FIELD_TRANSACTION_STIME 
FIELD_CONNECT 
FIELD_RESTART 
FIELD_REQUEST 
FIELD_SHARD_ID 
FIELD_PROXY_ID 
FIELD_SHARD_Q_SIZE 
FIELD_STMT_POOL_RATIO 
FIELD_NUMBER_OF_CONNECTION_REJECTED 
FIELD_UNUSABLE_DATABASES 
FIELD_LAST 

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.

Enumerator
MONITOR_T_BROKER 
MONITOR_T_SHARDDB 
MONITOR_T_PROXY 
MONITOR_T_LAST 

Definition at line 162 of file broker_monitor.c.

Function Documentation

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

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

Here is the caller graph for this function:

static const char * get_access_mode_string ( T_ACCESS_MODE_VALUE  mode,
int  replica_only_flag 
)
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().

Here is the caller graph for this function:

static int get_char ( void  )
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().

Here is the caller graph for this function:

static void get_cpu_usage_string ( char *  buf_p,
float  usage 
)
static

Definition at line 2780 of file broker_monitor.c.

References assert, and NULL.

Referenced by appl_info_display(), and print_monitor_items().

Here is the caller graph for this function:

static int get_num_monitor_items ( MONITOR_TYPE  mnt_type,
T_SHM_PROXY shm_proxy_p 
)
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().

Here is the caller graph for this function:

static const char * get_sql_log_mode_string ( T_SQL_LOG_MODE_VALUE  mode)
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().

Here is the caller graph for this function:

static const char * get_status_string ( T_APPL_SERVER_INFO as_info_p,
char  appl_server 
)
static
static void ip2str ( unsigned char *  ip,
char *  ip_str 
)
static

Definition at line 863 of file broker_monitor.c.

Referenced by print_job_queue().

Here is the caller graph for this function:

static int metadata_monitor ( double  elapsed_time)
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().

Here is the caller graph for this function:

static void print_job_queue ( T_MAX_HEAP_NODE job_queue)
static
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

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

Here is the caller graph for this function:

static void print_newline ( )
static
static int print_title ( char *  buf_p,
int  buf_offset,
FIELD_NAME  name,
const char *  new_title_p 
)
static
static void print_usage ( void  )
static

Definition at line 688 of file broker_monitor.c.

Referenced by get_args().

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

static void str_to_screen ( const char *  msg)
static

Definition at line 378 of file broker_monitor.c.

References NULL, and strlen.

Referenced by print_newline(), and str_out().

Here is the caller graph for this function:

static void time2str ( const time_t  t,
char *  str 
)
static

Definition at line 870 of file broker_monitor.c.

References NULL.

Referenced by print_job_queue().

Here is the caller graph for this function:

Variable Documentation

bool display_job_queue = false
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().

int last_access_sec = 0
static

Definition at line 365 of file broker_monitor.c.

Referenced by appl_info_display(), and get_args().

unsigned int monitor_flag = 0
static

Definition at line 371 of file broker_monitor.c.

Referenced by get_args(), main(), and print_monitor_header().

int refresh_sec = 0
static

Definition at line 364 of file broker_monitor.c.

Referenced by get_args(), get_char(), main(), print_newline(), and str_out().

char service_filter_value = SERVICE_UNKNOWN
static

Definition at line 369 of file broker_monitor.c.

Referenced by appl_monitor(), brief_monitor(), and get_args().

T_SHM_BROKER* shm_br
static

Definition at line 362 of file broker_monitor.c.

int state_interval = 1
static

Definition at line 368 of file broker_monitor.c.

Referenced by get_args(), print_monitor_header(), and set_monitor_items().

bool tty_mode = false
static

Definition at line 366 of file broker_monitor.c.

Referenced by get_args(), main(), print_monitor_header(), print_newline(), and str_out().