cheng029 发表于 2018-9-28 08:49:54

mysql监控工具之innotop

  innotop是一个通过文本模式显示MySQL和InnoDB存储引擎的监测工具。innotop是用perl语言开发,这是它能更加灵活的使用在各种操作平台之上,它能详细的的监控出当前mysql和innodb存储引擎运行的状态,以便维护人员根据结果合理的优化数据库,让数据库更稳定更高效的运行.innotop依赖于系统的perl-ExtUtils-MakeMaker软件包.
  mysql dba技术群 378190849
  武汉-linux运维群 236415619
  1.安装perl依赖包
  # yum install perl-ExtUtils-MakeMaker
  # rpm -aq | grep perl-ExtUtils-MakeMaker
  perl-ExtUtils-MakeMaker-6.55-136.el6_6.1.x86_64
  #
  2.下载安装innotop监控工具
  # wget http://innotop.googlecode.com/files/innotop-1.9.0.tar.gz
  # tar xvf innotop-1.9.0.tar.gz -C /usr/local/
  # cd /usr/local/innotop-1.9.0/
  # perl Makefile.PL
  Checking if your kit is complete...
  Looks good
  Writing Makefile for innotop
  # 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
  # echo $?
  0
  #
  3.innotop使用帮助和监控实例
  # ./innotop--help
  Usage: innotop
  --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
  --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.
  # ./innotop-u root -psystem -h localhost -S /tmp/mysql.sock
   Dashboard (? for      help)            --输入?或htlp查看帮助信息
  UptimeMaxSQLReplLagCxnsLockQPS   QPSRunRunTblsReplSQL
  6d                      1   00.40^__________   551Off
  输入?号可看帮助信息
  Switch to a different mode:
  ADashboard         IInnoDB I/O Info   QQuery List
  BInnoDB Buffers    KInnoDB Lock Waits   RInnoDB Row Ops
  CCommand Summary   LLocks               SVariables & Status
  DInnoDB DeadlocksMReplication StatusTInnoDB Txns
  FInnoDB FK Err   OOpen Tables         UUser Statistics
  Actions:
  dChange refresh interval      pPause innotop
  kKill a query's connection      qQuit innotop
  nSwitch to the next connectionxKill a query
  Other:
  TABSwitch 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

页: [1]
查看完整版本: mysql监控工具之innotop