描述
使用show proxynet connection [thread_id [LIMIT xx]]
语句:
- 展示proxy当前各个连接内部属性状态;也可展示指定thread上的各连接状态,支持limit。
- 默认不指定thread id时展示proxy内部全部connection内部属性状态,指定thread id时展示指定thread上connection。
- 在指定thread id时,支持
LIMIT [offset,] rows
和LIMIT rows OFFSET offset
,格式与mysql完全兼容,并且当rows == -1时,展示全部行。
示例
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 | 97 | 1 | MCS_ACTIVE_READER | 14531 | 14531 |
+------------+--------+------+--------------------+-----------+-------------+-------------------+-------------------+-------+-------+
1 row in set (0.01 sec)
OceanBase (root@oceanbase)> show proxynet connection\G
*************************** 1. row ***************************
thread_id: 0
connect_id: 1
socket_fd: 4
type: inner connected
src_ip: 10.125.111.18
src_port: 43051
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 2864
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28791
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 2. row ***************************
thread_id: 0
connect_id: 3
socket_fd: 24
type: accepted
src_ip: 10.125.111.4
src_port: 48292
dst_ip: 10.125.111.18
dst_port: 13205
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1214
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 30
timeout_close_in(sec): 29
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 3. row ***************************
thread_id: 0
connect_id: 4
socket_fd: 28
type: connected
src_ip: 10.125.111.18
src_port: 43154
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1214
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28788
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 4. row ***************************
thread_id: 1
connect_id: 5
socket_fd: 29
type: inner connected
src_ip: 10.125.111.18
src_port: 43156
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1194
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28791
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 5. row ***************************
thread_id: 3
connect_id: 2
socket_fd: 25
type: inner connected
src_ip: 10.125.111.18
src_port: 43052
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 2853
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28799
last_error_no: 0
shutdown: 0
comments: not closed
5 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxynet connection 2\G
Empty set (0.00 sec)
OceanBase (root@oceanbase)> show proxynet connection 0\G
*************************** 1. row ***************************
thread_id: 0
connect_id: 1
socket_fd: 4
type: inner connected
src_ip: 10.125.111.18
src_port: 43051
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 11958
write_ndone: 11958
alive_time(sec): 2919
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 30
timeout_close_in(sec): 30
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 2. row ***************************
thread_id: 0
connect_id: 3
socket_fd: 24
type: accepted
src_ip: 10.125.111.4
src_port: 48292
dst_ip: 10.125.111.18
dst_port: 13205
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1269
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 30
timeout_close_in(sec): 29
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 3. row ***************************
thread_id: 0
connect_id: 4
socket_fd: 28
type: connected
src_ip: 10.125.111.18
src_port: 43154
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1269
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28733
last_error_no: 0
shutdown: 0
comments: not closed
3 rows in set (0.01 sec)
OceanBase (root@oceanbase)> show proxynet connection 0 limit 2 offset 1\G
*************************** 1. row ***************************
thread_id: 0
connect_id: 3
socket_fd: 24
type: accepted
src_ip: 10.125.111.4
src_port: 48292
dst_ip: 10.125.111.18
dst_port: 13205
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1299
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 30
timeout_close_in(sec): 29
last_error_no: 0
shutdown: 0
comments: not closed
*************************** 2. row ***************************
thread_id: 0
connect_id: 4
socket_fd: 28
type: connected
src_ip: 10.125.111.18
src_port: 43154
dst_ip: 10.111.4.27
dst_port: 13203
virtual_ip: *Not IP address [0]*
virtual_port: 0
bind_style: any
read_enabled: 1
read_nbytes: 9223372036854775807
read_ndone: 0
write_enabled: 0
write_nbyte: 0
write_ndone: 0
alive_time(sec): 1299
activity_timeout_in(sec): 0
inactivity_timeout_in(sec): 28800
timeout_close_in(sec): 28703
last_error_no: 0
shutdown: 0
comments: not closed
2 rows in set (0.00 sec)