Mycat 管理命令5

2021-12-02 09:30:16 浏览数 (1)

查看某一个数据节点的数据源
代码语言:javascript复制
mysql> show @@datasource where dataNode = sd2;
 ---------- -------- ------- ----------------- ------ ------ -------- ------ ------ --------- 
| DATANODE | NAME   | TYPE  | HOST            | PORT | W/R  | ACTIVE | IDLE | SIZE | EXECUTE |
 ---------- -------- ------- ----------------- ------ ------ -------- ------ ------ --------- 
| sd2      | h101M1 | mysql | 192.168.100.101 | 3306 | W    |      0 |   10 |  100 |     203 |
 ---------- -------- ------- ----------------- ------ ------ -------- ------ ------ --------- 
1 row in set (0.00 sec)

mysql> 

查看处理器状态

代码语言:javascript复制
mysql> show @@processor;
 ------------ -------- --------- ------------- --------- --------- ------------- -------------- ------------ ---------- ---------- ---------- 
| NAME       | NET_IN | NET_OUT | REACT_COUNT | R_QUEUE | W_QUEUE | FREE_BUFFER | TOTAL_BUFFER | BU_PERCENT | BU_WARNS | FC_COUNT | BC_COUNT |
 ------------ -------- --------- ------------- --------- --------- ------------- -------------- ------------ ---------- ---------- ---------- 
| Processor0 |  14212 |    3804 |           0 |       0 |       0 |         186 |          200 |          7 |      277 |        0 |        7 |
| Processor1 |   8229 |   25989 |           0 |       0 |       0 |         186 |          200 |          7 |      277 |        2 |        3 |
 ------------ -------- --------- ------------- --------- --------- ------------- -------------- ------------ ---------- ---------- ---------- 
2 rows in set (0.00 sec)

mysql> 

查看命令状态(统计)

代码语言:javascript复制
mysql> show @@command;
 ------------ --------- ------- -------------- -------------- ------------ ------ ------ ------ ------- 
| PROCESSOR  | INIT_DB | QUERY | STMT_PREPARE | STMT_EXECUTE | STMT_CLOSE | PING | KILL | QUIT | OTHER |
 ------------ --------- ------- -------------- -------------- ------------ ------ ------ ------ ------- 
| Processor0 |       0 |     0 |            0 |            0 |          0 |    0 |    0 |    0 |     0 |
| Processor1 |       0 |    32 |            0 |            0 |          0 |    0 |    0 |    0 |     0 |
 ------------ --------- ------- -------------- -------------- ------------ ------ ------ ------ ------- 
2 rows in set (0.00 sec)

mysql> 

查看连接状态

代码语言:javascript复制
mysql> show @@connection;
 ------------ ------ ----------------- ------ ------------ ------ -------- --------- -------- --------- --------------- ------------- ------------ --------- ------------ 
| PROCESSOR  | ID   | HOST            | PORT | LOCAL_PORT | USER | SCHEMA | CHARSET | NET_IN | NET_OUT | ALIVE_TIME(S) | RECV_BUFFER | SEND_QUEUE | txlevel | autocommit |
 ------------ ------ ----------------- ------ ------------ ------ -------- --------- -------- --------- --------------- ------------- ------------ --------- ------------ 
| Processor1 |    2 | 192.168.100.101 | 9066 |      41013 | cc   | NULL   | utf8:33 |    113 |    3108 |           190 |       40960 |          0 |         |            |
| Processor1 |    1 | 192.168.100.102 | 9066 |      43190 | cc   | NULL   | utf8:45 |    846 |   21755 |          1981 |       40960 |          0 |         |            |
 ------------ ------ ----------------- ------ ------------ ------ -------- --------- -------- --------- --------------- ------------- ------------ --------- ------------ 
2 rows in set (0.01 sec)

mysql> 

查看缓存状态

代码语言:javascript复制
mysql> show @@cache;
 ------------------------------------- ------- ------ -------- ------ ------ ------------- ---------- 
| CACHE                               | MAX   | CUR  | ACCESS | HIT  | PUT  | LAST_ACCESS | LAST_PUT |
 ------------------------------------- ------- ------ -------- ------ ------ ------------- ---------- 
| SQLRouteCache                       | 10000 |    0 |      0 |    0 |    0 |           0 |        0 |
| TableID2DataNodeCache.TESTDB_ORDERS | 50000 |    0 |      0 |    0 |    0 |           0 |        0 |
| ER_SQL2PARENTID                     |  1000 |    0 |      0 |    0 |    0 |           0 |        0 |
 ------------------------------------- ------- ------ -------- ------ ------ ------------- ---------- 
3 rows in set (0.01 sec)

mysql>

查看后端连接状态

代码语言:javascript复制
mysql> show @@backend;
 ------------ ------ --------- ----------------- ------ -------- -------- --------- ------ -------- ---------- ------------ -------- ---------- --------- ------------ 
| processor  | id   | mysqlId | host            | port | l_port | net_in | net_out | life | closed | borrowed | SEND_QUEUE | schema | charset  | txlevel | autocommit |
 ------------ ------ --------- ----------------- ------ -------- -------- --------- ------ -------- ---------- ------------ -------- ---------- --------- ------------ 
| Processor0 |   12 |      12 | 192.168.100.101 | 3306 |  34828 |   3127 |     804 | 2338 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor0 |   13 |      14 | 192.168.100.101 | 3306 |  35206 |   2609 |     678 | 2038 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor0 |    8 |       2 | 192.168.100.101 | 3306 |  34416 |   3867 |     984 | 2657 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor0 |    2 |       8 | 192.168.100.101 | 3306 |  34422 |    463 |     156 | 2657 | false  | false    |          0 | my1    | latin1:8 | 0       | true       |
| Processor0 |   10 |      11 | 192.168.100.101 | 3306 |  34425 |    463 |     156 | 2657 | false  | false    |          0 | my1    | latin1:8 | 0       | true       |
| Processor0 |   15 |      16 | 192.168.100.101 | 3306 |  37083 |    611 |     192 |  538 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor0 |    4 |       7 | 192.168.100.101 | 3306 |  34421 |   3941 |    1002 | 2657 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor1 |   14 |      15 | 192.168.100.101 | 3306 |  35582 |   2091 |     552 | 1738 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor1 |    3 |       3 | 192.168.100.101 | 3306 |  34417 |   3941 |    1002 | 2657 | false  | false    |          0 | my3    | latin1:8 | 0       | true       |
| Processor1 |   11 |      13 | 192.168.100.101 | 3306 |  34829 |    315 |     120 | 2338 | false  | false    |          0 | my1    | latin1:8 | 0       | true       |
 ------------ ------ --------- ----------------- ------ -------- -------- --------- ------ -------- ---------- ------------ -------- ---------- --------- ------------ 
10 rows in set (0.00 sec)

mysql> 

0 人点赞