描述

    使用show proxysession stat id [like 'xx']语句:

    • 展示指定cs的内部统计项,支持like模糊匹配(支持’%’和’_‘的匹配)。
    • id既可以是cs id,也可以是connection id, 展示结果相同。
    • cs id为proxy内部标记每个client的id号, connection id为整个OceanBase数据库标记每个client的id号。

    示例

    1. OceanBase (root@oceanbase)> show proxysession stat 3;
    2. +--------------------------------------------------+-----------+
    3. | stat_name | value |
    4. +--------------------------------------------------+-----------+
    5. | mysql__total_transaction_count_stat | 100 |
    6. | mysql__client_request_total_size_stat | 2391 |
    7. | mysql__client_response_total_size_stat | 16968 |
    8. | mysql__server_request_total_size_stat | 2068 |
    9. | mysql__server_response_total_size_stat | 7676 |
    10. | mysql__total_transactions_time_stat | 406854594 |
    11. | mysql__total_client_request_read_time_stat | 10823905 |
    12. | mysql__total_client_response_write_time_stat | 0 |
    13. | mysql__total_client_request_analyze_time_stat | 4147091 |
    14. | mysql__total_server_process_request_time_stat | 244970812 |
    15. | mysql__total_server_response_read_time_stat | 33951745 |
    16. | mysql__total_send_saved_login_time_stat | 16869682 |
    17. | mysql__total_send_all_session_vars_time_stat | 0 |
    18. | mysql__total_send_use_database_time_stat | 3165510 |
    19. | mysql__total_send_changed_session_vars_time_stat | 0 |
    20. | mysql__total_send_last_insert_id_time_stat | 0 |
    21. | mysql__total_send_start_trans_time_stat | 0 |
    22. | mysql__total_pl_lookup_time_stat | 756611 |
    23. | mysql__total_server_connect_time_stat | 3196171 |
    24. | mysql__client_requests_stat | 100 |
    25. | mysql__client_large_requests_stat | 0 |
    26. | mysql__client_internal_requests_stat | 14 |
    27. | mysql__client_missing_pk_requests_stat | 85 |
    28. | mysql__client_completed_requests_stat | 99 |
    29. | mysql__client_connection_abort_count_stat | 0 |
    30. | mysql__client_select_requests_stat | 4 |
    31. | mysql__client_insert_requests_stat | 0 |
    32. | mysql__client_update_requests_stat | 0 |
    33. | mysql__client_delete_requests_stat | 0 |
    34. | mysql__client_other_requests_stat | 3 |
    35. | mysql__request_size_100_count_stat | 99 |
    36. | mysql__request_size_1K_count_stat | 0 |
    37. | mysql__request_size_3K_count_stat | 0 |
    38. | mysql__request_size_5K_count_stat | 0 |
    39. | mysql__request_size_10K_count_stat | 0 |
    40. | mysql__request_size_1M_count_stat | 0 |
    41. | mysql__request_size_inf_count_stat | 0 |
    42. | mysql__response_size_100_count_stat | 96 |
    43. | mysql__response_size_1K_count_stat | 1 |
    44. | mysql__response_size_3K_count_stat | 2 |
    45. | mysql__response_size_5K_count_stat | 0 |
    46. | mysql__response_size_10K_count_stat | 0 |
    47. | mysql__response_size_1M_count_stat | 0 |
    48. | mysql__response_size_inf_count_stat | 0 |
    49. | mysql__client_speed_bytes_per_sec_100_stat | 0 |
    50. | mysql__client_speed_bytes_per_sec_1K_stat | 0 |
    51. | mysql__client_speed_bytes_per_sec_10K_stat | 0 |
    52. | mysql__client_speed_bytes_per_sec_100K_stat | 0 |
    53. | mysql__client_speed_bytes_per_sec_1M_stat | 0 |
    54. | mysql__client_speed_bytes_per_sec_10M_stat | 0 |
    55. | mysql__client_speed_bytes_per_sec_100M_stat | 0 |
    56. | mysql__server_speed_bytes_per_sec_100_stat | 0 |
    57. | mysql__server_speed_bytes_per_sec_1K_stat | 0 |
    58. | mysql__server_speed_bytes_per_sec_10K_stat | 0 |
    59. | mysql__server_speed_bytes_per_sec_100K_stat | 2 |
    60. | mysql__server_speed_bytes_per_sec_1M_stat | 81 |
    61. | mysql__server_speed_bytes_per_sec_10M_stat | 2 |
    62. | mysql__server_speed_bytes_per_sec_100M_stat | 0 |
    63. | mysql__server_connect_count_stat | 4 |
    64. | mysql__server_connect_retries_stat | 0 |
    65. | mysql__server_pl_lookup_count_stat | 4 |
    66. | mysql__server_pl_lookup_retries_stat | 0 |
    67. | mysql__broken_server_connections_stat | 0 |
    68. | mysql__server_requests_stat | 91 |
    69. | mysql__server_responses_stat | 95 |
    70. | mysql__server_error_responses_stat | 77 |
    71. | mysql__server_resultset_responses_stat | 7 |
    72. | mysql__server_ok_responses_stat | 7 |
    73. | mysql__server_other_responses_stat | 4 |
    74. | mysql__send_saved_login_requests_stat | 3 |
    75. | mysql__send_all_session_vars_requests_stat | 0 |
    76. | mysql__send_use_database_requests_stat | 3 |
    77. | mysql__send_changed_session_vars_requests_stat | 0 |
    78. | mysql__send_last_insert_id_requests_stat | 0 |
    79. | mysql__send_start_trans_requests_stat | 0 |
    80. | mysql__vip_to_tenant_cache_hit_stat | 0 |
    81. | mysql__vip_to_tenant_cache_miss_stat | 0 |
    82. +--------------------------------------------------+-----------+
    83. 77 rows in set (0.01 sec)
    84. OceanBase (root@oceanbase)> show proxysession stat 2147549231;
    85. +--------------------------------------------------+-----------+
    86. | stat_name | value |
    87. +--------------------------------------------------+-----------+
    88. | mysql__total_transaction_count_stat | 101 |
    89. | mysql__client_request_total_size_stat | 2420 |
    90. | mysql__client_response_total_size_stat | 20576 |
    91. | mysql__server_request_total_size_stat | 2068 |
    92. | mysql__server_response_total_size_stat | 7676 |
    93. | mysql__total_transactions_time_stat | 408855677 |
    94. | mysql__total_client_request_read_time_stat | 10987827 |
    95. | mysql__total_client_response_write_time_stat | 0 |
    96. | mysql__total_client_request_analyze_time_stat | 4244033 |
    97. | mysql__total_server_process_request_time_stat | 244970812 |
    98. | mysql__total_server_response_read_time_stat | 33951745 |
    99. | mysql__total_send_saved_login_time_stat | 16869682 |
    100. | mysql__total_send_all_session_vars_time_stat | 0 |
    101. | mysql__total_send_use_database_time_stat | 3165510 |
    102. | mysql__total_send_changed_session_vars_time_stat | 0 |
    103. | mysql__total_send_last_insert_id_time_stat | 0 |
    104. | mysql__total_send_start_trans_time_stat | 0 |
    105. | mysql__total_pl_lookup_time_stat | 756611 |
    106. | mysql__total_server_connect_time_stat | 3196171 |
    107. | mysql__client_requests_stat | 101 |
    108. | mysql__client_large_requests_stat | 0 |
    109. | mysql__client_internal_requests_stat | 15 |
    110. | mysql__client_missing_pk_requests_stat | 85 |
    111. | mysql__client_completed_requests_stat | 100 |
    112. | mysql__client_connection_abort_count_stat | 0 |
    113. | mysql__client_select_requests_stat | 4 |
    114. | mysql__client_insert_requests_stat | 0 |
    115. | mysql__client_update_requests_stat | 0 |
    116. | mysql__client_delete_requests_stat | 0 |
    117. | mysql__client_other_requests_stat | 3 |
    118. | mysql__request_size_100_count_stat | 100 |
    119. | mysql__request_size_1K_count_stat | 0 |
    120. | mysql__request_size_3K_count_stat | 0 |
    121. | mysql__request_size_5K_count_stat | 0 |
    122. | mysql__request_size_10K_count_stat | 0 |
    123. | mysql__request_size_1M_count_stat | 0 |
    124. | mysql__request_size_inf_count_stat | 0 |
    125. | mysql__response_size_100_count_stat | 97 |
    126. | mysql__response_size_1K_count_stat | 1 |
    127. | mysql__response_size_3K_count_stat | 2 |
    128. | mysql__response_size_5K_count_stat | 0 |
    129. | mysql__response_size_10K_count_stat | 0 |
    130. | mysql__response_size_1M_count_stat | 0 |
    131. | mysql__response_size_inf_count_stat | 0 |
    132. | mysql__client_speed_bytes_per_sec_100_stat | 0 |
    133. | mysql__client_speed_bytes_per_sec_1K_stat | 0 |
    134. | mysql__client_speed_bytes_per_sec_10K_stat | 0 |
    135. | mysql__client_speed_bytes_per_sec_100K_stat | 0 |
    136. | mysql__client_speed_bytes_per_sec_1M_stat | 0 |
    137. | mysql__client_speed_bytes_per_sec_10M_stat | 0 |
    138. | mysql__client_speed_bytes_per_sec_100M_stat | 0 |
    139. | mysql__server_speed_bytes_per_sec_100_stat | 0 |
    140. | mysql__server_speed_bytes_per_sec_1K_stat | 0 |
    141. | mysql__server_speed_bytes_per_sec_10K_stat | 0 |
    142. | mysql__server_speed_bytes_per_sec_100K_stat | 2 |
    143. | mysql__server_speed_bytes_per_sec_1M_stat | 81 |
    144. | mysql__server_speed_bytes_per_sec_10M_stat | 2 |
    145. | mysql__server_speed_bytes_per_sec_100M_stat | 0 |
    146. | mysql__server_connect_count_stat | 4 |
    147. | mysql__server_connect_retries_stat | 0 |
    148. | mysql__server_pl_lookup_count_stat | 4 |
    149. | mysql__server_pl_lookup_retries_stat | 0 |
    150. | mysql__broken_server_connections_stat | 0 |
    151. | mysql__server_requests_stat | 91 |
    152. | mysql__server_responses_stat | 95 |
    153. | mysql__server_error_responses_stat | 77 |
    154. | mysql__server_resultset_responses_stat | 7 |
    155. | mysql__server_ok_responses_stat | 7 |
    156. | mysql__server_other_responses_stat | 4 |
    157. | mysql__send_saved_login_requests_stat | 3 |
    158. | mysql__send_all_session_vars_requests_stat | 0 |
    159. | mysql__send_use_database_requests_stat | 3 |
    160. | mysql__send_changed_session_vars_requests_stat | 0 |
    161. | mysql__send_last_insert_id_requests_stat | 0 |
    162. | mysql__send_start_trans_requests_stat | 0 |
    163. | mysql__vip_to_tenant_cache_hit_stat | 0 |
    164. | mysql__vip_to_tenant_cache_miss_stat | 0 |
    165. +--------------------------------------------------+-----------+
    166. 77 rows in set (0.00 sec)
    167. OceanBase (root@oceanbase)> show proxysession stat 2147549231 like "%time%";
    168. +--------------------------------------------------+-----------+
    169. | stat_name | value |
    170. +--------------------------------------------------+-----------+
    171. | mysql__total_transactions_time_stat | 410877642 |
    172. | mysql__total_client_request_read_time_stat | 11192818 |
    173. | mysql__total_client_response_write_time_stat | 0 |
    174. | mysql__total_client_request_analyze_time_stat | 4355363 |
    175. | mysql__total_server_process_request_time_stat | 244970812 |
    176. | mysql__total_server_response_read_time_stat | 33951745 |
    177. | mysql__total_send_saved_login_time_stat | 16869682 |
    178. | mysql__total_send_all_session_vars_time_stat | 0 |
    179. | mysql__total_send_use_database_time_stat | 3165510 |
    180. | mysql__total_send_changed_session_vars_time_stat | 0 |
    181. | mysql__total_send_last_insert_id_time_stat | 0 |
    182. | mysql__total_send_start_trans_time_stat | 0 |
    183. | mysql__total_pl_lookup_time_stat | 756611 |
    184. | mysql__total_server_connect_time_stat | 3196171 |
    185. +--------------------------------------------------+-----------+
    186. 14 rows in set (0.00 sec)