react 前端框架如何驱动企业数字化转型与创新发展
812
2022-11-26
docker mysql:5.6镜像安装mysqlreport、pt-query-digest
更新debian源
echo "deb stretch main" > /etc/apt/sources.listecho "deb stretch-updates main" >> /etc/apt/sources.list echo "deb stretch/updates main" >> /etc/apt/sources.list
mysqlreport安装
安装DBI、DBD::mysql
rm -f /root/.cpan/sources/modules/02packages.details.txt.gzrm -f /root/.cpan/sources/modules/03modlist.data.gzapt install make gcc g++ wget libmysqlclient-devperl -MCPAN -e shellinstall DBIinstall DBD::mysql
安装&运行mysqlreport
#-mysqlreport tgzwget -zxvf mysqlreport-3.5.tgz #使用mysqlreport收集信息mv mysqlreport-3.5 mysqlreportcd mysqlreport && mkdir report./mysqlreport --user=root --port 3306 --outfile=../mysqlreport/report/mysqlreport20201217.txt
# ./mysqlreport --user=root --port 3306 --outfile=../mysqlreport/report/mysqlreport20201217.txtUse of uninitialized value in formline at ./mysqlreport line 1099.Use of uninitialized value $is in multiplication (*) at ./mysqlreport line 829.Use of uninitialized value in formline at ./mysqlreport line 1227.Use of uninitialized value in formline at ./mysqlreport line 1235.MySQL 5.6.42-log uptime 0 1:45:48 Wed Mar 9 04:43:05 2022__ Key _________________________________________________________________Buffer used 104.00k of 8.00M %Used: 1.27 Current 1.56M %Usage: 19.51Write hit 92.75%Read hit 100.00%__ Questions ___________________________________________________________Total 2.35k 0.4/s Com_ 1.51k 0.2/s %Total: 64.52 DMS 1.33k 0.2/s 56.52 -Unknown 591 0.1/s 25.17 COM_QUIT 97 0.0/s 4.13Slow 10 s 0 0/s 0.00 %DMS: 0.00 Log:DMS 1.33k 0.2/s 56.52 INSERT 884 0.1/s 37.65 66.62 SELECT 421 0.1/s 17.93 31.73 UPDATE 17 0.0/s 0.72 1.28 DELETE 5 0.0/s 0.21 0.38 REPLACE 0 0/s 0.00 0.00Com_ 1.51k 0.2/s 64.52 show_warnin 527 0.1/s 22.44 stmt_execut 254 0.0/s 10.82 stmt_prepar 156 0.0/s 6.64__ SELECT and Sort _____________________________________________________Scan 245 0.0/s %SELECT: 58.19Range 0 0/s 0.00Full join 3 0.0/s 0.71Range check 0 0/s 0.00Full rng join 0 0/s 0.00Sort scan 4 0.0/sSort range 0 0/sSort mrg pass 0 0/s__ Query Cache _________________________________________________________Memory usage 16.82k of 1.00M %Used: 1.64Block Fragmnt 100.00%Hits 0 0/sInserts 1 0.0/sInsrt:Prune 1:1 0/sHit:Insert 0.00:1__ Table Locks _________________________________________________________Waited 0 0/s %Total: 0.00Immediate 1.39k 0.2/s__ Tables ______________________________________________________________Open 81 of 2000 %Cache: 4.05Opened 216 0.0/s__ Connections _________________________________________________________Max used 2 of 151 %Max: 1.32Total 101 0.0/s__ Created Temp ________________________________________________________Disk table 99 0.0/sTable 335 0.1/s Size: 1.0MFile 9 0.0/s__ Threads _____________________________________________________________Running 1 of 1Cached 1 of 9 %Hit: 98.02Created 2 0.0/sSlow 0 0/s__ Aborted _____________________________________________________________Clients 4 0.0/sConnects 5 0.0/s__ Bytes _______________________________________________________________Sent 3.12M 490.8/sReceived 516.43M 81.4k/s__ InnoDB Buffer Pool __________________________________________________Usage 4.02M of 5.00M %Used: 80.31Read hit 97.05%Pages Free 63 %Total: 19.69 Data 256 80.00 %Drty: 0.00 Misc 1 0.31 Latched 0.00Reads 35.49k 5.6/s From file 1.05k 0.2/s 2.95 Ahead Rnd 0 0/s Ahead Sql 0/sWrites 15.71k 2.5/sFlushes 1.38k 0.2/sWait Free 0 0/s__ InnoDB Lock _________________________________________________________Waits 1 0.0/sCurrent 0Time acquiring Total 2000 ms Average 2000 ms Max 2000 ms__ InnoDB Data, Pages, Rows ____________________________________________Data Reads 1.06k 0.2/s Writes 2.62k 0.4/s fsync 1.22k 0.2/s Pending Reads 0 Writes 0 fsync 0Pages Created 747 0.1/s Read 1.05k 0.2/s Written 1.38k 0.2/sRows Deleted 10 0.0/s Inserted 331 0.1/s Read 846 0.1/s Updated 96 0.0/s
pt-query-digest
安装Digest::MD5
perl -MCPAN -e shellinstall Digest::MD5
pt-query-digest安装与使用
官方:percona.com/get/pt-query-digestchmod u+x pt-query-digestmv pt-query-digest /usr/bin/pt-query-digest --help
# pt-query-digest --helppt-query-digest analyzes MySQL queries from slow, general, and binary log files.It can also analyze queries from C
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~