12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-26 22:16:13
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
首先到网址https://code.google.com/archive/p/innotop/downloads里下载innotop-1.9.0.tar.gz,见下图,选择innotop-1.9.0.tar.gz下载然后上传到Linux服务器进行解压[root@idb
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
首先到网址https://code.google.com/archive/p/innotop/downloads里下载innotop-1.9.0.tar.gz,见下图,选择innotop-1.9.0.tar.gz下载
然后上传到Linux服务器进行解压
[root@idb4 ~]# tar zxvf innotop-1.9.0.tar.gz
innotop-1.9.0/
innotop-1.9.0/t/
innotop-1.9.0/t/InnoDBParser.t
innotop-1.9.0/t/innodb-status-001
innotop-1.9.0/t/innodb-status-002
innotop-1.9.0/t/innodb-status-003
innotop-1.9.0/t/innodb-status-004
innotop-1.9.0/t/innodb-status-005
innotop-1.9.0/t/innodb-status-006
innotop-1.9.0/t/innodb-status-007
innotop-1.9.0/innotop.spec
innotop-1.9.0/Makefile.PL
innotop-1.9.0/INSTALL
innotop-1.9.0/Changelog
innotop-1.9.0/innotop
innotop-1.9.0/COPYING
innotop-1.9.0/MANIFEST
[root@idb4 innotop-1.9.0]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for innotop
报以上错误,缺少ReadKey包,解决方法:
[root@idb4 innotop-1.9.0]# yum install perl-DBI perl-DBD-MySQL perl-TermReadKey
安装完再次运行后无报错:
[root@idb4 innotop-1.9.0]# perl Makefile.PL
Writing Makefile for innotop
[root@idb4 innotop-1.9.0]#
[root@idb4 innotop-1.9.0]#
[root@idb4 innotop-1.9.0]# make install
cp innotop blib/script/innotop
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/innotop
Manifying blib/man1/innotop.1
Installing /usr/local/share/man/man1/innotop.1
Installing /usr/local/bin/innotop
Appending installation info to /usr/lib64/perl5/perllocal.pod
[root@idb4 innotop-1.9.0]#
运行innotop命令后发现报错:
[root@idb4 innotop-1.9.0]# innotop -u mdba -p123456
localhost, 0.00, 0 QPS, 0/0/0 con/run/cac thds, !localhost
Uptime MaxSQL ReplLag Cxns Lock QPS QPS Run Run Tbls Repl SQL
localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
查看一下帮助:
[root@idb4 innotop-1.9.0]# innotop --help
Usage: innotop
--[no]color-CUse terminal coloring (default)
--config -cConfig file to read
--countNumber of updates before exiting
--delay-dDelay between updates in seconds
--help Show this help message
--host-hConnect to host
--[no]inc -iMeasure incremental differences
--mode-mOperating mode to start in
--nonint -nNon-interactive, output tab-separated fields
--password-pPassword to use for connection
--port-PPort number to use for connection
--skipcentral -sSkip reading the central configuration file
--socket -SMySQL socket to use for connection
--sparkLength of status sparkline (default 10)
--timestamp-tPrint timestamp in -n mode (1: per iter; 2: per line)
--user-uUser for login if not current user
--version Output version information and exit
--write-wWrite running configuration into home directory if no config files were loaded
需要加-S后再运行:
[root@idb4 innotop-1.9.0]# innotop -u mdba -p123456-S /tmp/mysql.sock
localhost, 44d, 1.53k QPS, 119/6/29 con/run/cac thds, 5.6.27-log
按?号显示帮助
Switch to a different mode:
A Dashboard I InnoDB I/O Info Q Query List
B InnoDB BuffersK InnoDB Lock WaitsR InnoDB Row Ops
C Command SummaryL LocksS Variables & Status
D InnoDB Deadlocks M Replication Status T InnoDB Txns
F InnoDB FK Err O Open Tables U User Statistics
Actions:
d Change refresh intervalp Pause innotop
k Kill a query's connection q Quit innotop
n Switch to the next connection x Kill a query
Other:
TAB Switch to the next server group/ Quickly filter what you see
! Show license and warranty = Toggle aggregation
# Select/create server groups@ Select/create server connections
$ Edit configuration settings\ Clear quick-filters
按Q,显示以下信息
WhenLoad Cxns QPSSlowSe/In/Up/De% QCacheHit KCacheHit BpsInBpsOut
Now0.16135 1.53k 0 26/ 1/ 0/ 00.00%100.00% 174.93k 427.61k
Total 0.00 1000 1.53k 2.09k 29/ 3/ 0/ 00.00% 90.42% 156.93k 463.33k
CmdIDState User HostDBTimeQuery
Query 3978017 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4051691 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4054981 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4064304 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4083366 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4083368 Sending data ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 select id, SH, KPJH, ZFJH, TYPE, MONTH, STATUS, CREATE_TIME, UPDAT
Query 4083370 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4083372 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4083375 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4139383 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4146551 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4155188 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4157873 init ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 commit
Query 4223328 Sending data ixinnuo_ 172.16.16.10ixinnuo_sjcj 00:01 select id, SH, KPJH, ZFJH, TYPE, MONTH, STATUS, CREATE_TIME, UPDAT
其中 Load 是负载
QPS (Query Per Second) 表示每秒的查询率
Slow 代表慢查询的个数
Se/In/Up/De%: 增,删,改,查的比率
QCacheHit:查询缓冲的命中率
KCacheHit:索引的命中率
BpsIn (bytes Per Second in) 每秒钟输入的字节数
BpsOut(bytes Per Second Out)每秒钟输出的字节数
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19