1. 云栖社区>
  2. 博客>
  3. 正文


余二五 2017-11-17 21:28:00 浏览715


mysql dba技术群 378190849

武汉-linux运维群 236415619


[root@tong1 ~]# yum install perl-ExtUtils-MakeMaker

[root@tong1 ~]# rpm -aq | grep perl-ExtUtils-MakeMaker
[root@tong1 ~]# 


[root@tong1 ~]# wget

[root@tong1 ~]# tar xvf innotop-1.9.0.tar.gz -C /usr/local/

[root@tong1 ~]# cd /usr/local/innotop-1.9.0/
[root@tong1 innotop-1.9.0]# perl Makefile.PL 
Checking if your kit is complete...
Looks good
Writing Makefile for innotop

[root@tong1 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@tong1 innotop-1.9.0]# echo $?
[root@tong1 innotop-1.9.0]# 



[root@tong1 innotop-1.9.0]# ./innotop  --help
Usage: innotop <options> <innodb-status-file>

  --[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@tong1 innotop-1.9.0]# ./innotop  -u root -psystem -h localhost -S /tmp/mysql.sock 
[RO] Dashboard (? for        help)            --输入?或htlp查看帮助信息
Uptime  MaxSQL  ReplLag  Cxns  Lock  QPS   QPS  Run  Run  Tbls  Repl  SQL

    6d                      1     0  0.40  ^_____  _____   551  Off      


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

   d  Change refresh interval        p  Pause innotop
   k  Kill a query's connection      q  Quit innotop
   n  Switch to the next connection  x  Kill a query

 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

本文转自 z597011036 51CTO博客,原文链接:,如需转载请自行联系原作者


+ 关注