首页 技术 正文
技术 2022年11月14日
0 收藏 669 点赞 2,917 浏览 962 个字

在监控中,都是去探测这些状态数据,然后换算到时间刻度上,像zabbix。

show status like ‘uptime’;

–查看select语句的执行数

show [global] status like ‘com_select’;

–查看insert语句的执行数

show [global] status like ‘com_insert’;

–查看update语句的执行数

show [global] status like ‘com_update’;

–查看delete语句的执行数

show [global] status like ‘com_delete’;

–查看试图连接到MySQL(不管是否连接成功)的连接数

show status like ‘connections’;

–查看线程缓存内的线程的数量。

show status like ‘threads_cached’;

–查看当前打开的连接的数量。

show status like ‘threads_connected’;

–查看当前打开的连接的数量。

show status like ‘threads_connected’;

–查看创建用来处理连接的线程数。如果Threads_created较大,你可能要增加thread_cache_size值。

show status like ‘threads_created’;

–查看激活的(非睡眠状态)线程数。

show status like ‘threads_running’;

–查看立即获得的表的锁的次数。

show status like ‘table_locks_immediate’;

–查看不能立即获得的表的锁的次数。如果该值较高,并且有性能问题,你应首先优化查询,然后拆分表或使用复制。

show status like ‘table_locks_waited’;

–查看创建时间超过slow_launch_time秒的线程数。

show status like ‘slow_launch_threads’;

–查看查询时间超过long_query_time秒的查询的个数。

show status like ‘slow_queries’;
———————

原文:https://blog.csdn.net/qq_29168493/article/details/79149132

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,084
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,559
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,408
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,181
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,818
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,901