`

MySQL: How do you install innotop to monitor innodb in real time? Read more

阅读更多
作者:Sunny Walia (转)
Innotop is a very useful tool to monitor innodb information in real time. This tool is written by Baron Schwartz who is also an author of “High Performance MySQL, Second edition” book. [Side note: I highly recommend getting this book when it comes out (in June, 08?). Other authors include: Peter Zaitsev, Jeremy Zawodny, Arjen Lentz, Vadim Tkachenko and Derek J. Balling.] Quick summary of what innotop can monitor (from: http://innotop.sourceforge.net/): InnoDB transactions and internals, queries and processes, deadlocks, foreign key errors, replication status, system variables and status and much more.

Following are the instructions on how to install innotop on CentOS x64/Fedora/RHEL (Redhat enterprise). Most probably same instructions can be used on all flavors of Linux. If not, leave me a comment and I will research a solution for you. Let us start with downloading innotop. I used version 1.6.0 which is the latest at the time of writing.

wget http://internap.dl.sourceforge.net/sourceforge/innotop/innotop-1.6.0.tar.gz

Now let us go ahead and unzip and create the MakeFile to get it ready for install

tar zxpf innotop-1.6.0.tar.gz
cd innotop-1.6.0
perl Makefile.PL

At this point if you get the following output, you are good to continue:

Checking if your kit is complete...
Looks good
Writing Makefile for innotop

If you get something similar to following, you will need to take care of the prerequisites:

Looks good
Warning: prerequisite DBD::mysql 1 not found.
Warning: prerequisite DBI 1.13 not found.
Warning: prerequisite Term::ReadKey 2.1 not found.
Writing Makefile for innotop

Just because they are warnings does not mean you ignore them. So let us install those prerequisites. We will use perl’s cpan shell to get this installed (visit my post on how to install perl modules for more details). If it is your first time starting this up, you will have to answer some questions. Defaults will work fine in all cases.

perl -MCPAN -eshell
install Term::ReadKey
install DBI
install DBD::mysql

Note: you must install DBI before you can install DBD::mysql.

If you get an error like following when you are installing DBD::mysql:

Error: Can't load '/root/.cpan/build/DBD-mysql-4.007/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.15: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

You will have to create a symlink to the object file in your lib64 (or lib if you are not using x64 version) folder:

ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so.15 /lib64/

Once all prerequisites are done, type perl Makefile.PL and you should have no warnings. Continue the install:

make install

At this point you should have innotop installed on your system. Let us do some quick set up so you can start using innotop. We start with configuring your .my.cnf to include connection directives.

vi ~/.my.cnf

Add the following (edit to reflect your install) and save/exit

[mysql]
port = 3306
socket = /tmp/mysql.sock

Start up innotop by typing innotop at your shell prompt. First prompt will ask you to “Enter a name:”. I just put localhost since this will be used to connect locally. Next prompt asks you about DSN entry. I use: DBI:mysql:;mysql_read_default_group=mysql

This tells innotop to read .my.cnf file and use group [mysql] directives. Next prompt is optional (I just press enter). Next two prompts you enter information if you need to.

At this point your innotop installation / testing is complete. You can read man innotop to get more details on how to use innotop.

————————————-
DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. Use at your own risk.



Read more: http://crazytoon.com/2008/05/21/mysql-how-do-you-install-innotop-to-monitor-innodb-in-real-time/#ixzz12zCTQvIs
分享到:
评论

相关推荐

    How to install innotop on centos

    innotop是一款强大的MySQL和InnoDB性能监视工具,它提供了丰富的实时监控功能,帮助数据库管理员诊断和优化MySQL服务器的性能。 在CentOS上安装innotop通常包括以下几个步骤: 1. **更新系统**: 在开始安装任何...

    MySQL内核:InnoDB存储引擎 卷1.pdf.zip

    1. **事务支持**:InnoDB支持事务的四种隔离级别,包括读未提交(READ UNCOMMITTED)、读已提交(READ COMMITTED)、可重复读(REPEATABLE READ,MySQL默认级别)和串行化(SERIALIZABLE)。这使得InnoDB能保证数据...

    MySQL启动报错问题InnoDB:Unable to lock/ibdata1 error

    【MySQL启动报错问题InnoDB:Unable to lock/ibdata1 error】是一个常见的MySQL服务器启动时遇到的问题。这个问题通常表明MySQL的InnoDB存储引擎无法获取对`ibdata1`文件的锁,`ibdata1`是InnoDB用来存储数据和系统表...

    innotop使用说明

    Innotop 是一个高级的 MySQL 监控工具,专为 InnoDB 存储引擎设计,提供了丰富的实时性能信息。通过它,你可以深入理解数据库的运行状态,包括缓冲池、锁定、查询等关键指标,从而更好地优化数据库性能。 ### 安装 ...

    MySQL内核:InnoDB存储引擎 卷1.pdf

    《MySQL内核:InnoDB存储引擎 卷1》由资深MySQL专家,机工畅销图书作者亲自执笔,在以往出版的两本InnoDB介绍性图书的基础之上,更深入地介绍InnoDB存储引擎的内核,例如latch、B+树索引、事务、锁等,从源代码的...

    MySQL技术内幕 InnoDB存储引擎.pdf

    最近在学习MySQL技术内幕 InnoDB存储引擎 第2版,整理了一些文档分享出来,同时也方便以后查看。若有不当之处,烦请批评指正。 1. MySQL体系结构和存储引擎 2. InnoDB存储引擎 2.1 InnoDB体系结构 2.2 ...

    InnoTop,用来实时监控MySQL InnoDB引擎的,需要先安装Cgnwin

    《InnoTop:深入解析MySQL InnoDB引擎实时监控工具及Cygwin安装指南》 MySQL数据库作为世界上最流行的开源关系型数据库管理系统,其InnoDB引擎在事务处理、数据完整性以及并发性能方面表现出色。然而,为了确保...

    High Performance MySQL: Optimization, Backups, Replication, and More

    High Performance MySQL is the ...The book also includes chapters on benchmarking, profiling, backups, security, and tools and techniques to help you measure, monitor, and manage your MySQL installations.

    MySQL Innodb 索引原理详解

    ### MySQL Innodb 索引原理详解 #### 1. 各种树形结构 在深入探讨MySQL Innodb索引之前,我们先了解几种基本的树形数据结构,包括二叉搜索树、B树、B+树以及B*树。 ##### 1.1 搜索二叉树(Binary Search Tree) ...

    MySQL技术内幕 InnoDB存储引擎.pptx

    "MySQL技术内幕 InnoDB存储引擎" 《MySQL技术内幕:InnoDB存储引擎》是一本深入解析InnoDB存储引擎的经典之作,由国内资深MySQL专家亲自执笔,国内外多位数据库专家联袂推荐。本书从源代码的角度深度解析了InnoDB的...

    innotop mysql性能监控

    很好用的mysql性能监控工具 安装它需要的perl 库,它需要以下几个perl库: Term::ReadKey => 2.10, DBI => 1.13, DBD::mysql => 1.0, InnoDBParser => 1.1 其中,InnoDBParser 它本身自带。 我们这里采用CPAN来...

    mysql安装innodb插件

    ### MySQL安装InnoDB插件详解 #### 一、前言 在MySQL数据库系统中,InnoDB存储引擎是非常重要的一种类型,它支持事务处理(Transactions)、行级锁定(Row-Level Locking)以及外键约束(Foreign Key Constraints...

    MySQL技术内幕InnoDB存储引擎-读书笔记.pdf

    MySQL技术内幕InnoDB存储引擎-读书笔记.pdf

    mysql内核 innodb存储引擎

    《MySQL技术内幕:InnoDB存储引擎》是国内目前唯一的一本关于InnoDB的著作,由资深MySQL专家亲自执笔,中外数据库专家联袂推荐,权威性毋庸置疑。内容深入,从源代码的角度深度解析了InnoDB的体系结构、实现原理、...

    MYSQL内核:INNODB存储引擎

    可作为深入理解MySQL InnoDB存储引擎实现细节的研究学习。

    mysql Unable to lock ./ibdata1, error: 11

    标题“mysql Unable to lock ./ibdata1, error: 11”所反映的问题是MySQL数据库在运行过程中遇到了一个常见的错误,提示无法锁定数据文件`ibdata1`,错误代码11。这个错误通常与数据库的表空间管理、并发操作或者...

    Introducing InnoDB Cluster: Learning the MySQL High Availability Stack

    If you are growing your MySQL installation and want to explore making your servers highly ...you need to know about high availability and the new tools that are available in MySQL 8.0.11 and later....

    innotop-1.6.0.tar.gz

    **Innotop:MySQL系统监控利器** Innotop是一款针对MySQL数据库系统进行实时监控和性能分析的开源工具,因其简洁易用的特性而备受好评。它提供了丰富的界面和功能,帮助管理员快速理解数据库的运行状况,及时发现并...

Global site tag (gtag.js) - Google Analytics