Mycat 管理命令8

2021-12-02 09:31:25 浏览数 (1)

查看分析器状态

代码语言:javascript复制
mysql> show @@parser;
 ---------------- ------------- ------------ ---------------- ------------------ -------------- ------------ 
| PROCESSOR_NAME | PARSE_COUNT | TIME_COUNT | MAX_PARSE_TIME | MAX_PARSE_SQL_ID | CACHED_COUNT | CACHE_SIZE |
 ---------------- ------------- ------------ ---------------- ------------------ -------------- ------------ 
| NULL           |        NULL |       NULL |           NULL |             NULL |         NULL |       NULL |
 ---------------- ------------- ------------ ---------------- ------------------ -------------- ------------ 
1 row in set (0.01 sec)

mysql> 

查看路由状态

代码语言:javascript复制
mysql> show @@router;
 ---------------- ------------- ------------ ---------------- ------------------ 
| PROCESSOR_NAME | ROUTE_COUNT | TIME_COUNT | MAX_ROUTE_TIME | MAX_ROUTE_SQL_ID |
 ---------------- ------------- ------------ ---------------- ------------------ 
| Processor0     |        NULL |       NULL |           NULL |             NULL |
| Processor1     |        NULL |       NULL |           NULL |             NULL |
 ---------------- ------------- ------------ ---------------- ------------------ 
2 rows in set (0.00 sec)

mysql> 

查看心跳状态

代码语言:javascript复制
mysql> show @@heartbeat;
 -------- ------- ----------------- ------ --------- ------- ---------- --------- -------------- --------------------- ------- 
| NAME   | TYPE  | HOST            | PORT | RS_CODE | RETRY | STATUS   | TIMEOUT | EXECUTE_TIME | LAST_ACTIVE_TIME    | STOP  |
 -------- ------- ----------------- ------ --------- ------- ---------- --------- -------------- --------------------- ------- 
| h202M1 | mysql | 192.168.100.202 | 3306 |      -1 |     0 | checking |       0 | 750,600,610  | 1970-01-01 08:00:00 | false |
| h101M1 | mysql | 192.168.100.101 | 3306 |       1 |     0 | idle     |       0 | 2,2,2        | 2016-03-08 21:11:58 | false |
| hostM1 | mysql | localhost       | 3306 |      -1 |     0 | idle     |       0 | 0,0,0        | 2016-03-08 21:11:58 | false |
| hostS1 | mysql | localhost       | 3316 |      -1 |     0 | idle     |       0 | 0,0,0        | 2016-03-08 21:11:58 | false |
 -------- ------- ----------------- ------ --------- ------- ---------- --------- -------------- --------------------- ------- 
4 rows in set (0.01 sec)

mysql> 

查看某一台主机的心跳记录

代码语言:javascript复制
mysql> show @@heartbeat.detail where name= h101M1;
 -------- ------- ----------------- ------ --------------------- -------------- 
| NAME   | TYPE  | HOST            | PORT | TIME                | EXECUTE_TIME |
 -------- ------- ----------------- ------ --------------------- -------------- 
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:14:48 | 2            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:14:58 | 1            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:15:08 | 4            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:15:18 | 1            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:15:28 | 2            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 20:15:38 | 2            |
...
...
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 21:13:18 | 1            |
| h101M1 | mysql | 192.168.100.101 | 3306 | 2016-03-08 21:13:28 | 2            |
 -------- ------- ----------------- ------ --------------------- -------------- 
353 rows in set (0.03 sec)

mysql> 

0 人点赞