设为首页 收藏本站
查看: 1102|回复: 0

[经验分享] mysql监控工具之innotop

[复制链接]

尚未签到

发表于 2018-9-28 08:49:54 | 显示全部楼层 |阅读模式
  innotop是一个通过文本模式显示MySQL和InnoDB存储引擎的监测工具。innotop是用perl语言开发,这是它能更加灵活的使用在各种操作平台之上,它能详细的的监控出当前mysql和innodb存储引擎运行的状态,以便维护人员根据结果合理的优化数据库,让数据库更稳定更高效的运行.innotop依赖于系统的perl-ExtUtils-MakeMaker软件包.
  mysql dba技术群 378190849
  武汉-linux运维群 236415619
  1.安装perl依赖包
  [root@tong1 ~]# yum install perl-ExtUtils-MakeMaker
  [root@tong1 ~]# rpm -aq | grep perl-ExtUtils-MakeMaker
  perl-ExtUtils-MakeMaker-6.55-136.el6_6.1.x86_64
  [root@tong1 ~]#
  2.下载安装innotop监控工具
  [root@tong1 ~]# wget http://innotop.googlecode.com/files/innotop-1.9.0.tar.gz
  [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 $?
  0
  [root@tong1 innotop-1.9.0]#
  3.innotop使用帮助和监控实例
  [root@tong1 innotop-1.9.0]# ./innotop  --help
  Usage: innotop  
  --[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
  Actions:
  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
  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


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-603057-1-1.html 上篇帖子: Mysql支持的数据类型(总结) 下篇帖子: 高性能的MySQL(1)锁和MVCC-Coder
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表