描述
使用show proxysession
语句:
- 展示proxy各个client session内部状态,与
show processlist
不同的地方在于show proxysession
可以展示所有租户下client session内部状态,并包括每个租户的所在的cluster。 Id
为proxy内部标记每个client的id号, 也即cs id,proxy_sessid
为整个ob数据库标记每个client的64位id号,与标准的select connection_id()
不一致。
示例
mysql> show proxysession;
+--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
| proxy_sessid | Id | Cluster | Tenant | User | Host | db | trans_count | svr_session_count | state | tid | pid |
+--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
| 756006681247547396 | 2 | ob1.jianhua.sjh | sys | root | 127.0.0.1:22540 | NULL | 0 | 1 | MCS_ACTIVE_READER | 2230520 | 2230520 |
+--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
1 row in set (0.00 sec)