mycat管理命令⼤全
STATEMENT | DESCRIPTION |
+--------------------------------------------------------------+--------------------------------------------+
| show @@time.current |报告当前时间戳
| show @@time.startup |报告启动时间戳|
| show @@version | Report Mycat Server version |
| show @@server | Report server status |
| show @@threadpool | Report threadPool status |
| show @@database | Report databases |
| show @@datanode | Report dataNodes |
| show @@datanode where schema = ? | Report dataNodes |
| show @@datasource | Report dataSources |
| show @@datasource where dataNode = ? | Report dataSources |
| show @@datasource.synstatus | Report datasource data synchronous |
| show @@datasource.syndetail where name=? | Report datasource data synchronous detail |
| show @@datasource.cluster | Report datasource galary cluster variables |
| show @@processor | Report processor status |
| show @@command | Report commands status |
| show @@connection | Report connection status |
| show @@cache | Report system cache usage |
| show @@backend | Report backend connection status |
| show @@session | Report front session details |
| show @@connection.sql | Report connection sql |
| show @@ute | Report execute status |
| show @@sql.detail where id= ? | Report execute detail status |
| show @@sql | Report SQL list |
| show @@sql.high | Report Hight Frequency SQL |
| show @@sql.slow | Report slow SQL |
| show @@sultset | Report BIG RESULTSET SQL |
| show @@sql.sum | Report User RW Stat |
| show @@sql.sum.user | Report User RW Stat |
| show @@sql.sum.table | Report Table RW Stat |
| show @@parser | Report parser status |
| show @@router | Report router status |
| show @@heartbeat | Report heartbeat status |
| show @@heartbeat.detail where name=? | Report heartbeat current detail |
| show @@slow where schema = ? | Report schema slow sql |
| show @@slow where datanode = ? | Report datanode slow sql |
| show @@sysparam | Report system param |
| show @@syslog limit=? | Report system mycat.log |
| show @@white | show mycat white host |
| show @@white.set=?,? |set mycat white host,[ip,user]|
| show @@directmemory=1 or 2 | show mycat direct memory usage |
| show @@check_global -SCHEMA= ? -TABLE=? -retry=? -interval=? | check mycat global table con
sistency | | switch @@datasource name:index | Switch dataSource |
|kill @@connection id1,id2,... | Kill the specified connections |
| stop @@heartbeat name:time | Pause dataNode heartbeat |
xml标签大全| reload @@config | Reload basic config from file|
| reload @@config_all | Reload all config from file|
| reload @@route | Reload route config from file|
| reload @@user | Reload user config from file|
| reload @@sqlslow=| Set Slow SQL Time(ms)|
| reload @@user_stat | Reset show @@sql @@sql.sum @@sql.slow |
| rollback @@config | Rollback all config from memory |
| rollback @@route | Rollback route config from memory |
| rollback @@user | Rollback user config from memory |
| reload @@sqlstat=open | Open real-time sql stat analyzer |
| reload @@sqlstat=close | Close real-time sql stat analyzer |
| offline | Change MyCat status to OFF |
| online | Change MyCat status to ON |
|clear @@slow where schema = ? | Clear slow sql by schema |
|clear @@slow where datanode = ? | Clear slow sql by datanode
常⽤监控命令
1. reload @@config;
该命令⽤于更新配置⽂件,例如更新l⽂件后在命令⾏窗⼝输⼊该命令,可不⽤重启即进⾏配置⽂件更新。
2. show @@database;
该命令⽤于显⽰MyCAT的数据库的列表,对应l配置⽂件的schema⼦节点
3. show @@datanode;
该命令⽤于显⽰MyCAT的数据节点的列表,对应l配置⽂件的dataNode节点
其中,“NAME”表⽰dataNode的名称;“dataHost”表⽰对应dataHost属性的值,即数据主机;“ACTIVE”表⽰活跃连接数;“IDLE”表⽰闲置连接数;“SIZE”对应总连接数量。
4. show @@datanode where schema = ?
该命令⽤于查对应的schema下⾯的dataNode列表:
5. show @@heartbeat;
该命令⽤于报告⼼跳状态,RS_CODE为1表⽰⼼跳正常
6. show @@version;
该命令⽤于获取MyCAT的版本
7. show @@sql.slow;
该命令⽤于查询运⾏缓慢的SQL语句
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论