mysql工具innotop安装

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

INNOTOP是一个通过文本模式显示MySQL和 InnoDB的监测工具。它有很多特点,快速的配置的,易于使用等。它吸取了MYTOP的精华这使它变得更加强大。INNOTOP是用PERL语言写成 的,这是它能更加灵活的使用在各种操作平台之上,它能详细的的监控出当前MYSQL和INNODB运行的状态,以便维护人员根据结果合理的优化 MYSQL,让MYSQL更稳定更高效的运行。

安装INNOTOP工具非常的简单,既然是由PERL写的,当然需要PERL环境和相关的工具包。

 

1、下载innotop的源码包,可以从

http://code.google.com/p/innotop/downloads/list

http://internap.dl.sourceforge.net/sourceforge/innotop 下载 源码包,下载之后可以解压

tar-zxvf innotop-1.8.0\ \(1\).tar.gz

cd innotop-1.8.0 进入目录之后可以查看文件,可以查看 INSTALL 文件查看安装步骤。

perl Makefile.PL

如果innotop 需要的perl 模块没有安装全就会报错,然后通过

cpan -i modulename 安装需要模块之后,重新执行perl Makefile.PL

如果没有报错 然后 使用make install 安装 innotop。

安装之后系统就会多出一个命令,innotop

#innotop  –help 就会看到

[root@test innotop-1.8.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
–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

加上需要的参数就可以监控mysql 。

如# innotop  -uuser -ppassword  -S sock路径

就会看到

[RO] Query List (? for help)                                localhost, 3+22:33:35.004, 0.74 QPS, 3/1/19 con/run/cac thds, 5.1.50-log

When   Load  QPS   Slow  Se/In/Up/De%  QCacheHit  KCacheHit  BpsIn  BpsOut
Total  0.00  0.74     0  58/ 0/14/ 0      57.71%     99.75%  45.60  454.74

Cmd    ID      State  User   Host           DB      Time   Query

然后输入? 帮助

Switch to a different mode:
B  InnoDB Buffers    L  Locks               R  InnoDB Row Ops
C  Command Summary   M  Replication Status  S  Variables & Status
D  InnoDB Deadlocks  O  Open Tables         T  InnoDB Txns
F  InnoDB FK Err     Q  Query List          U  User Statistics
I  InnoDB I/O Info

Actions:
a  Toggle the innotop process    k  Kill a query’s connection
c  Choose visible columns        n  Switch to the next connection
d  Change refresh interval       p  Pause innotop
e  Explain a thread’s query      q  Quit innotop
f  Show a thread’s full query    r  Reverse sort order
h  Toggle the header on and off  s  Change the display’s sort column
i  Toggle idle processes         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

根据上面的提示查看mysql 的各种状态。希望你能找到影响性能的瓶颈。





本文转自 fenghao.cn 51CTO博客,原文链接:http://blog.51cto.com/linuxguest/721185,如需转载请自行联系原作者
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
10天前
|
关系型数据库 MySQL 数据库
mysql卸载、下载、安装(window版本)
mysql卸载、下载、安装(window版本)
|
22天前
|
关系型数据库 MySQL
elasticsearch对比mysql以及使用工具同步mysql数据全量增量
elasticsearch对比mysql以及使用工具同步mysql数据全量增量
19 0
|
1月前
|
关系型数据库 MySQL 数据库连接
关于MySQL-ODBC的zip包安装方法
关于MySQL-ODBC的zip包安装方法
|
1月前
|
关系型数据库 MySQL Python
python安装MySQL-python:EnvironmentError解决办法
python安装MySQL-python:EnvironmentError解决办法
29 1
|
1月前
|
SQL 关系型数据库 MySQL
【MySQL】— —熟练掌握用SQL语句实现数据库和基本表的创建。熟练掌握MySQL的安装、客户端登录方法;熟练掌握MySQL的编码、数据类型等基础知识;掌握实体完整性的定义和维护方法、掌握参照完整性
【MySQL】— —熟练掌握用SQL语句实现数据库和基本表的创建。熟练掌握MySQL的安装、客户端登录方法;熟练掌握MySQL的编码、数据类型等基础知识;掌握实体完整性的定义和维护方法、掌握参照完整性
99 1
|
28天前
|
关系型数据库 MySQL 数据库
rds安装数据库客户端工具
安装阿里云RDS的数据库客户端涉及在本地安装对应类型(如MySQL、PostgreSQL)的客户端工具。对于MySQL,可选择MySQL Command-Line Client或图形化工具如Navicat,安装后输入RDS实例的连接参数进行连接。对于PostgreSQL,可以使用`psql`命令行工具或图形化客户端如PgAdmin。首先从阿里云控制台获取连接信息,然后按照官方文档安装客户端,最后配置客户端连接以确保遵循安全指引。
81 1
|
23天前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 中apt 安装MySQL数据库
Ubuntu 中apt 安装MySQL数据库
66 0
|
2天前
|
关系型数据库 MySQL Linux
Linux联网安装MySQL Server
Linux联网安装MySQL Server
10 0
|
2天前
|
关系型数据库 MySQL Linux
centos7安装mysql-带网盘安装包
centos7安装mysql-带网盘安装包
29 2
|
6天前
|
关系型数据库 MySQL 数据安全/隐私保护
MySQL 安装及连接
MySQL 安装及连接
23 0