描述
使用show proxysession stat id [like 'xx']
语句:
- 展示指定cs的内部统计项,支持like模糊匹配(支持’%’和’
_
‘的匹配)。 id
既可以是cs id,也可以是connection id, 展示结果相同。- cs id为proxy内部标记每个client的id号, connection id为整个OceanBase数据库标记每个client的id号。
示例
OceanBase (root@oceanbase)> show proxysession stat 3;
+--------------------------------------------------+-----------+
| stat_name | value |
+--------------------------------------------------+-----------+
| mysql__total_transaction_count_stat | 100 |
| mysql__client_request_total_size_stat | 2391 |
| mysql__client_response_total_size_stat | 16968 |
| mysql__server_request_total_size_stat | 2068 |
| mysql__server_response_total_size_stat | 7676 |
| mysql__total_transactions_time_stat | 406854594 |
| mysql__total_client_request_read_time_stat | 10823905 |
| mysql__total_client_response_write_time_stat | 0 |
| mysql__total_client_request_analyze_time_stat | 4147091 |
| mysql__total_server_process_request_time_stat | 244970812 |
| mysql__total_server_response_read_time_stat | 33951745 |
| mysql__total_send_saved_login_time_stat | 16869682 |
| mysql__total_send_all_session_vars_time_stat | 0 |
| mysql__total_send_use_database_time_stat | 3165510 |
| mysql__total_send_changed_session_vars_time_stat | 0 |
| mysql__total_send_last_insert_id_time_stat | 0 |
| mysql__total_send_start_trans_time_stat | 0 |
| mysql__total_pl_lookup_time_stat | 756611 |
| mysql__total_server_connect_time_stat | 3196171 |
| mysql__client_requests_stat | 100 |
| mysql__client_large_requests_stat | 0 |
| mysql__client_internal_requests_stat | 14 |
| mysql__client_missing_pk_requests_stat | 85 |
| mysql__client_completed_requests_stat | 99 |
| mysql__client_connection_abort_count_stat | 0 |
| mysql__client_select_requests_stat | 4 |
| mysql__client_insert_requests_stat | 0 |
| mysql__client_update_requests_stat | 0 |
| mysql__client_delete_requests_stat | 0 |
| mysql__client_other_requests_stat | 3 |
| mysql__request_size_100_count_stat | 99 |
| mysql__request_size_1K_count_stat | 0 |
| mysql__request_size_3K_count_stat | 0 |
| mysql__request_size_5K_count_stat | 0 |
| mysql__request_size_10K_count_stat | 0 |
| mysql__request_size_1M_count_stat | 0 |
| mysql__request_size_inf_count_stat | 0 |
| mysql__response_size_100_count_stat | 96 |
| mysql__response_size_1K_count_stat | 1 |
| mysql__response_size_3K_count_stat | 2 |
| mysql__response_size_5K_count_stat | 0 |
| mysql__response_size_10K_count_stat | 0 |
| mysql__response_size_1M_count_stat | 0 |
| mysql__response_size_inf_count_stat | 0 |
| mysql__client_speed_bytes_per_sec_100_stat | 0 |
| mysql__client_speed_bytes_per_sec_1K_stat | 0 |
| mysql__client_speed_bytes_per_sec_10K_stat | 0 |
| mysql__client_speed_bytes_per_sec_100K_stat | 0 |
| mysql__client_speed_bytes_per_sec_1M_stat | 0 |
| mysql__client_speed_bytes_per_sec_10M_stat | 0 |
| mysql__client_speed_bytes_per_sec_100M_stat | 0 |
| mysql__server_speed_bytes_per_sec_100_stat | 0 |
| mysql__server_speed_bytes_per_sec_1K_stat | 0 |
| mysql__server_speed_bytes_per_sec_10K_stat | 0 |
| mysql__server_speed_bytes_per_sec_100K_stat | 2 |
| mysql__server_speed_bytes_per_sec_1M_stat | 81 |
| mysql__server_speed_bytes_per_sec_10M_stat | 2 |
| mysql__server_speed_bytes_per_sec_100M_stat | 0 |
| mysql__server_connect_count_stat | 4 |
| mysql__server_connect_retries_stat | 0 |
| mysql__server_pl_lookup_count_stat | 4 |
| mysql__server_pl_lookup_retries_stat | 0 |
| mysql__broken_server_connections_stat | 0 |
| mysql__server_requests_stat | 91 |
| mysql__server_responses_stat | 95 |
| mysql__server_error_responses_stat | 77 |
| mysql__server_resultset_responses_stat | 7 |
| mysql__server_ok_responses_stat | 7 |
| mysql__server_other_responses_stat | 4 |
| mysql__send_saved_login_requests_stat | 3 |
| mysql__send_all_session_vars_requests_stat | 0 |
| mysql__send_use_database_requests_stat | 3 |
| mysql__send_changed_session_vars_requests_stat | 0 |
| mysql__send_last_insert_id_requests_stat | 0 |
| mysql__send_start_trans_requests_stat | 0 |
| mysql__vip_to_tenant_cache_hit_stat | 0 |
| mysql__vip_to_tenant_cache_miss_stat | 0 |
+--------------------------------------------------+-----------+
77 rows in set (0.01 sec)
OceanBase (root@oceanbase)> show proxysession stat 2147549231;
+--------------------------------------------------+-----------+
| stat_name | value |
+--------------------------------------------------+-----------+
| mysql__total_transaction_count_stat | 101 |
| mysql__client_request_total_size_stat | 2420 |
| mysql__client_response_total_size_stat | 20576 |
| mysql__server_request_total_size_stat | 2068 |
| mysql__server_response_total_size_stat | 7676 |
| mysql__total_transactions_time_stat | 408855677 |
| mysql__total_client_request_read_time_stat | 10987827 |
| mysql__total_client_response_write_time_stat | 0 |
| mysql__total_client_request_analyze_time_stat | 4244033 |
| mysql__total_server_process_request_time_stat | 244970812 |
| mysql__total_server_response_read_time_stat | 33951745 |
| mysql__total_send_saved_login_time_stat | 16869682 |
| mysql__total_send_all_session_vars_time_stat | 0 |
| mysql__total_send_use_database_time_stat | 3165510 |
| mysql__total_send_changed_session_vars_time_stat | 0 |
| mysql__total_send_last_insert_id_time_stat | 0 |
| mysql__total_send_start_trans_time_stat | 0 |
| mysql__total_pl_lookup_time_stat | 756611 |
| mysql__total_server_connect_time_stat | 3196171 |
| mysql__client_requests_stat | 101 |
| mysql__client_large_requests_stat | 0 |
| mysql__client_internal_requests_stat | 15 |
| mysql__client_missing_pk_requests_stat | 85 |
| mysql__client_completed_requests_stat | 100 |
| mysql__client_connection_abort_count_stat | 0 |
| mysql__client_select_requests_stat | 4 |
| mysql__client_insert_requests_stat | 0 |
| mysql__client_update_requests_stat | 0 |
| mysql__client_delete_requests_stat | 0 |
| mysql__client_other_requests_stat | 3 |
| mysql__request_size_100_count_stat | 100 |
| mysql__request_size_1K_count_stat | 0 |
| mysql__request_size_3K_count_stat | 0 |
| mysql__request_size_5K_count_stat | 0 |
| mysql__request_size_10K_count_stat | 0 |
| mysql__request_size_1M_count_stat | 0 |
| mysql__request_size_inf_count_stat | 0 |
| mysql__response_size_100_count_stat | 97 |
| mysql__response_size_1K_count_stat | 1 |
| mysql__response_size_3K_count_stat | 2 |
| mysql__response_size_5K_count_stat | 0 |
| mysql__response_size_10K_count_stat | 0 |
| mysql__response_size_1M_count_stat | 0 |
| mysql__response_size_inf_count_stat | 0 |
| mysql__client_speed_bytes_per_sec_100_stat | 0 |
| mysql__client_speed_bytes_per_sec_1K_stat | 0 |
| mysql__client_speed_bytes_per_sec_10K_stat | 0 |
| mysql__client_speed_bytes_per_sec_100K_stat | 0 |
| mysql__client_speed_bytes_per_sec_1M_stat | 0 |
| mysql__client_speed_bytes_per_sec_10M_stat | 0 |
| mysql__client_speed_bytes_per_sec_100M_stat | 0 |
| mysql__server_speed_bytes_per_sec_100_stat | 0 |
| mysql__server_speed_bytes_per_sec_1K_stat | 0 |
| mysql__server_speed_bytes_per_sec_10K_stat | 0 |
| mysql__server_speed_bytes_per_sec_100K_stat | 2 |
| mysql__server_speed_bytes_per_sec_1M_stat | 81 |
| mysql__server_speed_bytes_per_sec_10M_stat | 2 |
| mysql__server_speed_bytes_per_sec_100M_stat | 0 |
| mysql__server_connect_count_stat | 4 |
| mysql__server_connect_retries_stat | 0 |
| mysql__server_pl_lookup_count_stat | 4 |
| mysql__server_pl_lookup_retries_stat | 0 |
| mysql__broken_server_connections_stat | 0 |
| mysql__server_requests_stat | 91 |
| mysql__server_responses_stat | 95 |
| mysql__server_error_responses_stat | 77 |
| mysql__server_resultset_responses_stat | 7 |
| mysql__server_ok_responses_stat | 7 |
| mysql__server_other_responses_stat | 4 |
| mysql__send_saved_login_requests_stat | 3 |
| mysql__send_all_session_vars_requests_stat | 0 |
| mysql__send_use_database_requests_stat | 3 |
| mysql__send_changed_session_vars_requests_stat | 0 |
| mysql__send_last_insert_id_requests_stat | 0 |
| mysql__send_start_trans_requests_stat | 0 |
| mysql__vip_to_tenant_cache_hit_stat | 0 |
| mysql__vip_to_tenant_cache_miss_stat | 0 |
+--------------------------------------------------+-----------+
77 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxysession stat 2147549231 like "%time%";
+--------------------------------------------------+-----------+
| stat_name | value |
+--------------------------------------------------+-----------+
| mysql__total_transactions_time_stat | 410877642 |
| mysql__total_client_request_read_time_stat | 11192818 |
| mysql__total_client_response_write_time_stat | 0 |
| mysql__total_client_request_analyze_time_stat | 4355363 |
| mysql__total_server_process_request_time_stat | 244970812 |
| mysql__total_server_response_read_time_stat | 33951745 |
| mysql__total_send_saved_login_time_stat | 16869682 |
| mysql__total_send_all_session_vars_time_stat | 0 |
| mysql__total_send_use_database_time_stat | 3165510 |
| mysql__total_send_changed_session_vars_time_stat | 0 |
| mysql__total_send_last_insert_id_time_stat | 0 |
| mysql__total_send_start_trans_time_stat | 0 |
| mysql__total_pl_lookup_time_stat | 756611 |
| mysql__total_server_connect_time_stat | 3196171 |
+--------------------------------------------------+-----------+
14 rows in set (0.00 sec)