1. Connect Mycat 9066 Management port
Command: mysql-uroot-proot-p9066-h127.0.0.1
-U: User name
-P: Password
-P: Port
-h:ip Address Example: TheLinux path switches to the bin directory of the Mycat installation path : Enter command
This indicates that the login was successful.
2, display the back-end physical library connection information, including the current number of connections, ports and other information.
Command: Show @ @backend
3, display the current front-end client connection situation
Command: Show @ @connection
4, the current thread pool execution, whether there is a backlog (active_count) and Task_queue_size, the latter for the backlog of SQL to be processed, if the backlog has been preserved, it means that the backend physical connection may not be enough or SQL execution is relatively slow
Command: show @ @threadpool;
5, the current back-end of the physical library heartbeat detection situation, Rs_code 1 indicates normal heartbeat
Command: show @ @heartbeat;
6, display the data node's access, including the number of active connections per data node (active), the number of idle connections (idle) and the maximum number of connections (MAXCON) Size,execute parameter indicates the number of times the connection is obtained from the node, the more the number of times, the more access to the node
Command: show @ @datanode;
6, display the current processors processing situation, including the IO Throughput (net_in/net_out) of each processor, the backlog of Io queues (r_quey/w_queue), the use of the Socket Buffer pool bu_ Percent for a percentage that has been used, bu_warns is not enough for the socket Buffer pool, the number of new buffer created temporarily, if the percentage is often more than 90% and bu_warns>0, indicates that Buffer is insufficient and needs to be increased. Refer to the Performance Tuning manual.
Command: show @ @processor;
7, display the use of the cache, for performance monitoring and tuning is very valuable
Command: show @ @cache;
Max is the maximum cache value (number of records), CUR is currently in the cache, Acess is the number of cache reads, hit is the number of cache hits, put is the number of write cache, last_xx for the last operation timestamp, more important parameters: CUR: If CUR is near Max, The put is larger than Max, which indicates that Max needs to increase, hit/access is the cache hit ratio, and the higher the value the better.
8, kill the client connection, the parameter is the ID value of the connection, through show @ @connection, you can show all the client processes currently connected to the MYCAT, if a process is abnormal, you can kill the connection through the command, such as Kill @ @CONNECTION 26907;
9. Reload the configuration file Schema.xml
If we have made changes in the original schema.xml, we need to reload the file to make it effective.
Command: reload @ @config;
Finally, you only need to restart the mycat.
10. Exit Order: Exit;
11. Restart Mycat
Enter the installation directory for Mycat: Enter the command ./bin/mycat Stop
Enter the installation directory for Mycat: Enter the command ./bin/mycat start
Reboot successful.
Mycat 9066 common commands for Management ports