#连接数mysql> show variables like %max_connections%;+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 1000 |+-----------------+-------+1 row in set (0.00 sec)mysql> show status like Threads%; #其中,Threads_connected 表当前连接数,Threads_running 表当前的并发数+-------------------+-------+| Variable_name | Value |+-------------------+-------+| Threads_cached | 17 || Threads_connected | 40 || Threads_created | 319 || Threads_running | 2 |+-------------------+-------+4 rows in set (0.00 sec)mysql> show variables like %slave_parallel_workers%; #从数据库用来还原的并发线程数##QPS (Query per second) (每秒查询量)查询mysql> SHOW GLOBAL STATUS LIKE Questions;mysql> SHOW GLOBAL STATUS LIKE Uptime;mysql> select 42260778868/26924936 AS QPS from dual;##TPS(Transaction per second) (每秒事务量,如果是InnoDB会显示,没有InnoDB就不会显示)查看mysql> SHOW GLOBAL STATUS LIKE Com_commit;mysql> SHOW GLOBAL STATUS LIKE Com_rollback;mysql> SHOW GLOBAL STATUS LIKE Uptime;mysql> select (1676595+1)/26925163 as TPS from dual;#进程相关mysql> show processlist; #查询数据库当前连接mysql> show full processlist; #查询数据库的所有链接mysql> kill thd_id; #杀死线程/进程

分类: 软件分享 标签: 暂无标签

评论

暂无评论数据

暂无评论数据

目录