描述
使用show proxystat [refresh] [like 'xx']
语句:
- 默认不带
refresh
时展示proxy内部上一次汇总的统计项,带refresh
参数则强制执行一次本地统计项汇总更新后,再进行展示。 - 支持like模糊匹配(支持’%’和
_
的匹配),默认不带like
时展示全部的统计项。 - 统计项
persist_type
值为PERSISTENT
的表示该统计项会持久化更新到远程数据库的ob_all_proxy_stat
表中。 - 本地统计项默认
stat_table_sync_interval
更新一次,该配置项的默认值分别为60s。
关键统计项
global_client_connections_currently_open 代表app到proxy的当前连接数。
global_connections_currently_open 代表app到proxy + proxy到observer的当前连接数。
示例
OceanBase (root@oceanbase)> show processlist;
+------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
| Id | Tenant | User | Host | db | trans_count | svr_session_count | state | tid | pid |
+------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
| 2147549229 | sys | root | 10.125.111.4:48292 | oceanbase | 84 | 1 | MCS_ACTIVE_READER | 14531 | 14531 |
+------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
1 row in set (0.00 sec)
OceanBase (root@oceanbase)> show proxystat;
+----------------------------------------------------+-------------+--------------+
| stat_name | value | persist_type |
+----------------------------------------------------+-------------+--------------+
| mysql__alive_congested_stat | 0 | NULL |
| mysql__dead_congested_stat | 0 | NULL |
| proxy__get_pl_from_remote_for_updating_stat | 0 | PERSISTENT |
| proxy__get_pl_by_rs_list_succ_stat | 0 | PERSISTENT |
| proxy__get_pl_by_last_session_succ_stat | 1039 | PERSISTENT |
| proxy__get_pl_from_remote_fail_stat | 0 | PERSISTENT |
| proxy__get_pl_from_remote_succ_stat | 0 | PERSISTENT |
| proxy__get_pl_from_remote_stat | 0 | PERSISTENT |
| proxy__get_pl_by_all_dummy_stat | 4 | PERSISTENT |
| proxy__get_pl_from_cache_hit_stat | 4 | PERSISTENT |
| proxy__get_pl_total_stat | 4 | PERSISTENT |
| mysql__total_server_connect_time_stat | 3301634 | NULL |
| mysql__total_pl_lookup_time_stat | 38511128 | NULL |
| mysql__total_send_start_trans_time_stat | 0 | NULL |
| mysql__total_send_last_insert_id_time_stat | 0 | NULL |
| mysql__total_send_changed_session_vars_time_stat | 0 | NULL |
| mysql__total_send_use_database_time_stat | 0 | NULL |
| mysql__total_send_all_session_vars_time_stat | 0 | NULL |
| mysql__total_send_saved_login_time_stat | 0 | NULL |
| mysql__total_server_response_read_time_stat | 496287880 | NULL |
| mysql__total_server_process_request_time_stat | 23198559799 | NULL |
| mysql__total_client_request_analyze_time_stat | 135431530 | NULL |
| mysql__total_client_response_write_time_stat | 0 | NULL |
| mysql__total_client_request_read_time_stat | 205598668 | NULL |
| mysql__total_transactions_time_stat | 25035477703 | PERSISTENT |
| mysql__server_response_total_size_stat | 495653 | PERSISTENT |
| mysql__server_request_total_size_stat | 780276 | PERSISTENT |
| mysql__client_response_total_size_stat | 495888 | PERSISTENT |
| mysql__client_request_total_size_stat | 779996 | PERSISTENT |
| mysql__send_start_trans_requests_stat | 0 | NULL |
| mysql__send_last_insert_id_requests_stat | 0 | PERSISTENT |
| mysql__send_changed_session_vars_requests_stat | 0 | NULL |
| mysql__send_use_database_requests_stat | 0 | NULL |
| mysql__send_all_session_vars_requests_stat | 0 | NULL |
| mysql__send_saved_login_requests_stat | 0 | PERSISTENT |
| mysql__server_other_responses_stat | 4 | NULL |
| mysql__server_ok_responses_stat | 220 | NULL |
| mysql__server_resultset_responses_stat | 746 | NULL |
| mysql__server_error_responses_stat | 77 | NULL |
| mysql__server_requests_stat | 1043 | NULL |
| mysql__server_responses_stat | 1047 | NULL |
| mysql__broken_server_connections_stat | 0 | PERSISTENT |
| mysql__server_pl_lookup_retries_stat | 0 | NULL |
| mysql__server_pl_lookup_count_stat | 4 | NULL |
| mysql__server_connect_retries_stat | 0 | NULL |
| mysql__server_connect_count_stat | 4 | NULL |
| mysql__server_speed_bytes_per_sec_100M_stat | 0 | NULL |
| mysql__server_speed_bytes_per_sec_10M_stat | 371 | NULL |
| mysql__server_speed_bytes_per_sec_1M_stat | 655 | NULL |
| mysql__server_speed_bytes_per_sec_100K_stat | 16 | NULL |
| mysql__server_speed_bytes_per_sec_10K_stat | 1 | NULL |
| mysql__server_speed_bytes_per_sec_1K_stat | 0 | NULL |
| mysql__server_speed_bytes_per_sec_100_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_100M_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_10M_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_1M_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_100K_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_10K_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_1K_stat | 0 | NULL |
| mysql__client_speed_bytes_per_sec_100_stat | 0 | NULL |
| mysql__response_size_inf_count_stat | 0 | NULL |
| mysql__response_size_1M_count_stat | 0 | NULL |
| mysql__response_size_10K_count_stat | 0 | NULL |
| mysql__response_size_5K_count_stat | 0 | NULL |
| mysql__response_size_3K_count_stat | 164 | NULL |
| mysql__response_size_1K_count_stat | 581 | NULL |
| mysql__response_size_100_count_stat | 303 | NULL |
| mysql__request_size_inf_count_stat | 0 | NULL |
| mysql__request_size_1M_count_stat | 53 | NULL |
| mysql__request_size_10K_count_stat | 0 | NULL |
| mysql__request_size_5K_count_stat | 0 | NULL |
| mysql__request_size_3K_count_stat | 0 | NULL |
| mysql__request_size_1K_count_stat | 697 | NULL |
| mysql__request_size_100_count_stat | 298 | NULL |
| mysql__client_other_requests_stat | 2 | NULL |
| mysql__client_delete_requests_stat | 0 | NULL |
| mysql__client_update_requests_stat | 163 | NULL |
| mysql__client_insert_requests_stat | 53 | NULL |
| mysql__client_select_requests_stat | 744 | NULL |
| mysql__client_connection_abort_count_stat | 0 | NULL |
| mysql__client_completed_requests_stat | 1048 | NULL |
| mysql__client_missing_pk_requests_stat | 1043 | NULL |
| mysql__client_internal_requests_stat | 5 | NULL |
| mysql__client_large_requests_stat | 0 | NULL |
| mysql__client_requests_stat | 1048 | NULL |
| mysql__avg_transactions_per_server_connection | 0 | PERSISTENT |
| mysql__avg_transactions_per_client_connection | 0 | PERSISTENT |
| mysql__vip_to_tenant_cache_miss_stat | 0 | PERSISTENT |
| mysql__vip_to_tenant_cache_hit_stat | 0 | PERSISTENT |
| mysql__current_server_connections_stat | 4 | PERSISTENT |
| mysql__total_server_connections_stat | 4 | PERSISTENT |
| mysql__total_client_connections_ipv6_stat | 0 | NULL |
| mysql__total_client_connections_ipv4_stat | 1 | NULL |
| mysql__total_internal_client_connections_stat | 3 | PERSISTENT |
| mysql__total_client_connections_stat | 1 | PERSISTENT |
| mysql__current_server_transactions_stat | 0 | PERSISTENT |
| mysql__current_client_transactions_stat | 0 | PERSISTENT |
| mysql__current_active_client_connections_stat | 0 | PERSISTENT |
| mysql__current_client_connections_stat | 4 | PERSISTENT |
| mysql__total_transaction_count_stat | 1044 | NULL |
| net__default_inactivity_timeout | 0 | NULL |
| net__keep_alive_lru_timeout_count | 0 | NULL |
| net__keep_alive_lru_timeout_total | 0 | NULL |
| net__inactivity_cop_lock_acquire_failure | 0 | NULL |
| net__calls_to_write_nodata | 0 | NULL |
| net__calls_to_write | 1127 | NULL |
| net__calls_to_writetonet | 1131 | NULL |
| net__calls_to_read_nodata | 4 | NULL |
| net__calls_to_read | 1134 | NULL |
| net__calls_to_readfromnet | 1134 | NULL |
| net__global_accepts_currently_open | 2 | PERSISTENT |
| net__global_connections_currently_open | 5 | PERSISTENT |
| net__global_client_connections_currently_open_stat | 1 | PERSISTENT |
| net__client_connections_currently_open | 1 | NULL |
| net__write_bytes | 786102 | PERSISTENT |
| net__read_bytes | 514392 | PERSISTENT |
| net__net_handler_run | 1937335 | NULL |
+----------------------------------------------------+-------------+--------------+
117 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxystat refresh like '%total%';
+--------------------------------------------------+-------------+--------------+
| stat_name | value | persist_type |
+--------------------------------------------------+-------------+--------------+
| proxy__get_pl_total_stat | 4 | PERSISTENT |
| mysql__total_server_connect_time_stat | 3301634 | NULL |
| mysql__total_pl_lookup_time_stat | 38511128 | NULL |
| mysql__total_send_start_trans_time_stat | 0 | NULL |
| mysql__total_send_last_insert_id_time_stat | 0 | NULL |
| mysql__total_send_changed_session_vars_time_stat | 0 | NULL |
| mysql__total_send_use_database_time_stat | 0 | NULL |
| mysql__total_send_all_session_vars_time_stat | 0 | NULL |
| mysql__total_send_saved_login_time_stat | 0 | NULL |
| mysql__total_server_response_read_time_stat | 503418949 | NULL |
| mysql__total_server_process_request_time_stat | 23716596431 | NULL |
| mysql__total_client_request_analyze_time_stat | 137932059 | NULL |
| mysql__total_client_response_write_time_stat | 0 | NULL |
| mysql__total_client_request_read_time_stat | 209417696 | NULL |
| mysql__total_transactions_time_stat | 25588921524 | PERSISTENT |
| mysql__server_response_total_size_stat | 504473 | PERSISTENT |
| mysql__server_request_total_size_stat | 794521 | PERSISTENT |
| mysql__client_response_total_size_stat | 511316 | PERSISTENT |
| mysql__client_request_total_size_stat | 794281 | PERSISTENT |
| mysql__total_server_connections_stat | 4 | PERSISTENT |
| mysql__total_client_connections_ipv6_stat | 0 | NULL |
| mysql__total_client_connections_ipv4_stat | 1 | NULL |
| mysql__total_internal_client_connections_stat | 3 | PERSISTENT |
| mysql__total_client_connections_stat | 1 | PERSISTENT |
| mysql__total_transaction_count_stat | 1064 | NULL |
| net__keep_alive_lru_timeout_total | 0 | NULL |
+--------------------------------------------------+-------------+--------------+
26 rows in set (0.00 sec)