描述

    使用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() 不一致。

    示例

    1. mysql> show proxysession;
    2. +--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
    3. | proxy_sessid | Id | Cluster | Tenant | User | Host | db | trans_count | svr_session_count | state | tid | pid |
    4. +--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
    5. | 756006681247547396 | 2 | ob1.jianhua.sjh | sys | root | 127.0.0.1:22540 | NULL | 0 | 1 | MCS_ACTIVE_READER | 2230520 | 2230520 |
    6. +--------------------+------+-----------------+--------+------+-----------------+------+-------------+-------------------+-------------------+---------+---------+
    7. 1 row in set (0.00 sec)