一、功能
LogService 当前状态信息视图。
二、支持版本
适用于 TDSQL Boundless V17.0.0 及以上版本。
各版本变更如下:
·V17.0.0:首次引入 LOGSERVICE_STAT。
·V21.2.0:新增 unconsumed_msg_count 字段,代表整体缓存中的消息数量(仅 MySQL Client 模式)。
三、字段说明
| 字段名 | 类型 | 描述 |
| client_type | varchar(64) | LogService 类型。 |
| sid | bigint unsigned | LogService 唯一 ID。 |
| product_msgs | bigint unsigned | 产生的消息数量。 |
| send_success_msgs | bigint unsigned | 发送成功的消息数量。 |
| consume_msgs | bigint unsigned | 消费的消息数量。 |
| msg_count_in_conflict_detector | bigint unsigned | 在冲突处理器缓存中的消息数量(仅 MySQLClient 模式)。 |
| unconsumed_msg_count | bigint unsigned | 整体缓存中的消息数量(仅 MySQLClient 模式)。 |
| send_avg_ms | bigint unsigned | 每毫秒发送的消息数量。 |
| send_lastest_ms | bigint unsigned | 最新一毫秒中发送的消息数量。 |
| send_kb_total | bigint unsigned | 总体发送的数据量(单位 KB)。 |
| send_avg_kb_per_second | bigint unsigned | 每秒发送的数据量(KB)。 |
四、示例
tdsql> SELECT * FROM LOGSERVICE_STAT\\G*************************** 1. row *************************** client_type: MYSQL sid: 29472565546188807 product_msgs: 112313 send_success_msgs: 112313 consume_msgs: 0msg_count_in_conflict_detector: 0 unconsumed_msg_count: 0 send_avg_ms: 1657588598 send_lastest_ms: 270 consume_avg_ms: 0 consume_lastest_ms: 0 send_kb_total: 26087 send_avg_kb_per_second: 01 row in set (0.00 sec)