mysql监控工具之innotop

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

    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 <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

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










本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/1620134,如需转载请自行联系原作者
相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
打赏
0
0
0
0
234
分享
相关文章
MySQL 内置的监控工具介绍及使用篇(一)
MySQL 内置的监控工具介绍及使用篇
2265 0
MySQL 内置的监控工具介绍及使用篇(三)
MySQL 内置的监控工具介绍及使用篇(三)
215 0
MySQL 内置的监控工具介绍及使用篇(二)
MySQL 内置的监控工具介绍及使用篇(二)
398 0
开发同学的福利--mysql监控工具sqlprofiler,类似sqlserver的profiler工具
原文:开发同学的福利--mysql监控工具sqlprofiler,类似sqlserver的profiler工具   最近无意发现了mysql的客户端监控工具“Nero Profile SQL”,刚开始还不知道怎么使用,经过半小时摸索,现将使用步骤写下来。
2302 0
MySQL 淘宝网开源监控工具orzdba安装、使用
转载:http://blog.51cto.com/arthur376/1888931 orzdba是淘宝DBA团队开发出来的一个perl监控脚本,主要功能是监控mysql数据库,也有一些磁盘和cpu的监控选项,好不好用就见仁见智,毕竟各公司需求不尽相同.
1476 0
Mtop,Mysql Top,一个Mysql的监控工具
没有输出就是模块已经安装了,有错误就是相应的模块没有安装。可以在上面给出的地址下载相应模块的最新版本。
2254 0
Docker Compose V2 安装常用数据库MySQL+Mongo
以上内容涵盖了使用 Docker Compose 安装和管理 MySQL 和 MongoDB 的详细步骤,希望对您有所帮助。
172 42
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等