描述

    使用show proxynet connection [thread_id [LIMIT xx]]语句:

    • 展示proxy当前各个连接内部属性状态;也可展示指定thread上的各连接状态,支持limit。
    • 默认不指定thread id时展示proxy内部全部connection内部属性状态,指定thread id时展示指定thread上connection。
    • 在指定thread id时,支持LIMIT [offset,] rowsLIMIT rows OFFSET offset,格式与mysql完全兼容,并且当rows == -1时,展示全部行。

    示例

    1. OceanBase (root@oceanbase)> show processlist;
    2. +------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
    3. | Id | Tenant | User | Host | db | trans_count | svr_session_count | state | tid | pid |
    4. +------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
    5. | 2147549229 | sys | root | 10.125.111.4:48292 | oceanbase | 97 | 1 | MCS_ACTIVE_READER | 14531 | 14531 |
    6. +------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
    7. 1 row in set (0.01 sec)
    8. OceanBase (root@oceanbase)> show proxynet connection\G
    9. *************************** 1. row ***************************
    10. thread_id: 0
    11. connect_id: 1
    12. socket_fd: 4
    13. type: inner connected
    14. src_ip: 10.125.111.18
    15. src_port: 43051
    16. dst_ip: 10.111.4.27
    17. dst_port: 13203
    18. virtual_ip: *Not IP address [0]*
    19. virtual_port: 0
    20. bind_style: any
    21. read_enabled: 1
    22. read_nbytes: 9223372036854775807
    23. read_ndone: 0
    24. write_enabled: 0
    25. write_nbyte: 0
    26. write_ndone: 0
    27. alive_time(sec): 2864
    28. activity_timeout_in(sec): 0
    29. inactivity_timeout_in(sec): 28800
    30. timeout_close_in(sec): 28791
    31. last_error_no: 0
    32. shutdown: 0
    33. comments: not closed
    34. *************************** 2. row ***************************
    35. thread_id: 0
    36. connect_id: 3
    37. socket_fd: 24
    38. type: accepted
    39. src_ip: 10.125.111.4
    40. src_port: 48292
    41. dst_ip: 10.125.111.18
    42. dst_port: 13205
    43. virtual_ip: *Not IP address [0]*
    44. virtual_port: 0
    45. bind_style: any
    46. read_enabled: 1
    47. read_nbytes: 9223372036854775807
    48. read_ndone: 0
    49. write_enabled: 0
    50. write_nbyte: 0
    51. write_ndone: 0
    52. alive_time(sec): 1214
    53. activity_timeout_in(sec): 0
    54. inactivity_timeout_in(sec): 30
    55. timeout_close_in(sec): 29
    56. last_error_no: 0
    57. shutdown: 0
    58. comments: not closed
    59. *************************** 3. row ***************************
    60. thread_id: 0
    61. connect_id: 4
    62. socket_fd: 28
    63. type: connected
    64. src_ip: 10.125.111.18
    65. src_port: 43154
    66. dst_ip: 10.111.4.27
    67. dst_port: 13203
    68. virtual_ip: *Not IP address [0]*
    69. virtual_port: 0
    70. bind_style: any
    71. read_enabled: 1
    72. read_nbytes: 9223372036854775807
    73. read_ndone: 0
    74. write_enabled: 0
    75. write_nbyte: 0
    76. write_ndone: 0
    77. alive_time(sec): 1214
    78. activity_timeout_in(sec): 0
    79. inactivity_timeout_in(sec): 28800
    80. timeout_close_in(sec): 28788
    81. last_error_no: 0
    82. shutdown: 0
    83. comments: not closed
    84. *************************** 4. row ***************************
    85. thread_id: 1
    86. connect_id: 5
    87. socket_fd: 29
    88. type: inner connected
    89. src_ip: 10.125.111.18
    90. src_port: 43156
    91. dst_ip: 10.111.4.27
    92. dst_port: 13203
    93. virtual_ip: *Not IP address [0]*
    94. virtual_port: 0
    95. bind_style: any
    96. read_enabled: 1
    97. read_nbytes: 9223372036854775807
    98. read_ndone: 0
    99. write_enabled: 0
    100. write_nbyte: 0
    101. write_ndone: 0
    102. alive_time(sec): 1194
    103. activity_timeout_in(sec): 0
    104. inactivity_timeout_in(sec): 28800
    105. timeout_close_in(sec): 28791
    106. last_error_no: 0
    107. shutdown: 0
    108. comments: not closed
    109. *************************** 5. row ***************************
    110. thread_id: 3
    111. connect_id: 2
    112. socket_fd: 25
    113. type: inner connected
    114. src_ip: 10.125.111.18
    115. src_port: 43052
    116. dst_ip: 10.111.4.27
    117. dst_port: 13203
    118. virtual_ip: *Not IP address [0]*
    119. virtual_port: 0
    120. bind_style: any
    121. read_enabled: 1
    122. read_nbytes: 9223372036854775807
    123. read_ndone: 0
    124. write_enabled: 0
    125. write_nbyte: 0
    126. write_ndone: 0
    127. alive_time(sec): 2853
    128. activity_timeout_in(sec): 0
    129. inactivity_timeout_in(sec): 28800
    130. timeout_close_in(sec): 28799
    131. last_error_no: 0
    132. shutdown: 0
    133. comments: not closed
    134. 5 rows in set (0.00 sec)
    135. OceanBase (root@oceanbase)> show proxynet connection 2\G
    136. Empty set (0.00 sec)
    137. OceanBase (root@oceanbase)> show proxynet connection 0\G
    138. *************************** 1. row ***************************
    139. thread_id: 0
    140. connect_id: 1
    141. socket_fd: 4
    142. type: inner connected
    143. src_ip: 10.125.111.18
    144. src_port: 43051
    145. dst_ip: 10.111.4.27
    146. dst_port: 13203
    147. virtual_ip: *Not IP address [0]*
    148. virtual_port: 0
    149. bind_style: any
    150. read_enabled: 1
    151. read_nbytes: 9223372036854775807
    152. read_ndone: 0
    153. write_enabled: 0
    154. write_nbyte: 11958
    155. write_ndone: 11958
    156. alive_time(sec): 2919
    157. activity_timeout_in(sec): 0
    158. inactivity_timeout_in(sec): 30
    159. timeout_close_in(sec): 30
    160. last_error_no: 0
    161. shutdown: 0
    162. comments: not closed
    163. *************************** 2. row ***************************
    164. thread_id: 0
    165. connect_id: 3
    166. socket_fd: 24
    167. type: accepted
    168. src_ip: 10.125.111.4
    169. src_port: 48292
    170. dst_ip: 10.125.111.18
    171. dst_port: 13205
    172. virtual_ip: *Not IP address [0]*
    173. virtual_port: 0
    174. bind_style: any
    175. read_enabled: 1
    176. read_nbytes: 9223372036854775807
    177. read_ndone: 0
    178. write_enabled: 0
    179. write_nbyte: 0
    180. write_ndone: 0
    181. alive_time(sec): 1269
    182. activity_timeout_in(sec): 0
    183. inactivity_timeout_in(sec): 30
    184. timeout_close_in(sec): 29
    185. last_error_no: 0
    186. shutdown: 0
    187. comments: not closed
    188. *************************** 3. row ***************************
    189. thread_id: 0
    190. connect_id: 4
    191. socket_fd: 28
    192. type: connected
    193. src_ip: 10.125.111.18
    194. src_port: 43154
    195. dst_ip: 10.111.4.27
    196. dst_port: 13203
    197. virtual_ip: *Not IP address [0]*
    198. virtual_port: 0
    199. bind_style: any
    200. read_enabled: 1
    201. read_nbytes: 9223372036854775807
    202. read_ndone: 0
    203. write_enabled: 0
    204. write_nbyte: 0
    205. write_ndone: 0
    206. alive_time(sec): 1269
    207. activity_timeout_in(sec): 0
    208. inactivity_timeout_in(sec): 28800
    209. timeout_close_in(sec): 28733
    210. last_error_no: 0
    211. shutdown: 0
    212. comments: not closed
    213. 3 rows in set (0.01 sec)
    214. OceanBase (root@oceanbase)> show proxynet connection 0 limit 2 offset 1\G
    215. *************************** 1. row ***************************
    216. thread_id: 0
    217. connect_id: 3
    218. socket_fd: 24
    219. type: accepted
    220. src_ip: 10.125.111.4
    221. src_port: 48292
    222. dst_ip: 10.125.111.18
    223. dst_port: 13205
    224. virtual_ip: *Not IP address [0]*
    225. virtual_port: 0
    226. bind_style: any
    227. read_enabled: 1
    228. read_nbytes: 9223372036854775807
    229. read_ndone: 0
    230. write_enabled: 0
    231. write_nbyte: 0
    232. write_ndone: 0
    233. alive_time(sec): 1299
    234. activity_timeout_in(sec): 0
    235. inactivity_timeout_in(sec): 30
    236. timeout_close_in(sec): 29
    237. last_error_no: 0
    238. shutdown: 0
    239. comments: not closed
    240. *************************** 2. row ***************************
    241. thread_id: 0
    242. connect_id: 4
    243. socket_fd: 28
    244. type: connected
    245. src_ip: 10.125.111.18
    246. src_port: 43154
    247. dst_ip: 10.111.4.27
    248. dst_port: 13203
    249. virtual_ip: *Not IP address [0]*
    250. virtual_port: 0
    251. bind_style: any
    252. read_enabled: 1
    253. read_nbytes: 9223372036854775807
    254. read_ndone: 0
    255. write_enabled: 0
    256. write_nbyte: 0
    257. write_ndone: 0
    258. alive_time(sec): 1299
    259. activity_timeout_in(sec): 0
    260. inactivity_timeout_in(sec): 28800
    261. timeout_close_in(sec): 28703
    262. last_error_no: 0
    263. shutdown: 0
    264. comments: not closed
    265. 2 rows in set (0.00 sec)