初识innotop

下载地址

https://github.com/innotop/innotop

功能介绍

1.显示当前innodb的全部事务列表;
2.显示当前正运行着的查询;
3.显示当前锁和锁等等的列表;
4.服务器状态和变量的摘要信息 显示了数值的相对变化幅度;
5.有多种模式可用来显示Innodb 内部信息,如缓冲区、死锁、外键错误、I/O情况、行操作、信号量等。
6.复制健康,将主机和从机的状态显示一起;
7.有一个显示任意服务器变量的模式;
8.服务器组可以帮你更方便的组织多台服务器;
9.在命令行脚本下可以使用非交互模式。

系统环境

[root@lineqi ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

软件安装

[root@lineqi opt]# tar -xvf innotop-master.zip
[root@lineqi opt]# cd innotop-master/
[root@lineqi innotop-master]# perl Makefile.PL
Checking if your kit is complete…
Looks good
Writing Makefile for innotop
Writing MYMETA.yml and MYMETA.json
[root@lineqi innotop-master]# 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 /root/perl5/man/man1/innotop.1
Installing /root/perl5/bin/innotop
Appending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
[root@lineqi innotop-master]#

[root@lineqi innotop-master]# innotop --help
Usage: innotop

–askpass Prompt for a password when connecting to MySQL
–[no]color -C Use terminal coloring (default)
–config -c Config file to read
–count Number of updates before exiting
–delay -d Delay between updates in seconds
–help Show this help message
–host -h Connect to host
–[no]inc -i Measure incremental differences
–mode -m Operating mode to start in
–nonint -n Non-interactive, output tab-separated fields
–password -p Password to use for connection
–port -P Port number to use for connection
–skipcentral -s Skip reading the central configuration file
–socket -S MySQL socket to use for connection
–spark Length of status sparkline (default 10)
–timestamp -t Print timestamp in -n mode (1: per iter; 2: per line)
–user -u User for login if not current user
–version Output version information and exit
–write -w Write running configuration into home directory if no config files were loaded

innotop is a MySQL and InnoDB transaction/status monitor, like ‘top’ for
MySQL. It displays queries, InnoDB transactions, lock waits, deadlocks,
foreign key errors, open tables, replication status, buffer information,
row operations, logs, I/O operations, load graph, and more. You can
monitor many servers at once with innotop.

软件使用

[root@lineqi innotop-master]# innotop -S /data/mysql_13306/mysql.sock -P 13306 -uroot -pyer -d 2
[RO] Dashboard (? for help) localhost, 20h, 3.45 QPS, 6/4/0 con/run/cac thds, 5.6.48-log

Switch to a different mode:
A Dashboard I InnoDB I/O Info Q Query List
B InnoDB Buffers K InnoDB Lock Waits R InnoDB Row Ops
C Command Summary L Locks S 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 interval q Quit innotop
k Kill a query’s connection r Reverse sort order
n Switch to the next connection s Choose sort column
p Pause innotop 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
Press any key to continue

参考资料

https://www.jianshu.com/p/b8508fe10b8e

猜你喜欢

转载自blog.csdn.net/weixin_41561946/article/details/108432967
今日推荐