- 浏览: 93088 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
xiaoyi829:
应该可以grzrt 写道分区表partition,能用hand ...
初识mysql插件之HandlerSocket -
grzrt:
分区表partition,能用handlersocket查询指 ...
初识mysql插件之HandlerSocket
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
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
发表评论
-
mysql dump 备份及脚本!
2011-06-10 13:38 1553导出多张表的时候表之间用空格分开: # mysqldump ... -
mysql备份脚本
2011-06-03 17:32 684!/bin/sh # mysql_backup.sh: bac ... -
CentOS挂载移动硬盘
2011-06-03 15:12 10971, 首先确认fuse,CentOS 5.5 带有fuse,可 ... -
MySQL 左连接 右连接
2011-06-03 14:03 869表A记录如下: aID aNum 1 ... -
[转]CentOS5 下安装与配置飞鸽传书(Ipmsg)完美完结篇
2011-05-27 10:29 1560CentOS5 下安装与配置飞鸽传书(Ipmsg)完美完结篇 ... -
深入SQL语句性能调整
2011-05-17 13:20 863本文sqlserver为例 有 ... -
windows和linux下开启mysql日志
2011-05-11 10:24 2322mysql有以下几种日志: 错误日志: -log-err 查询 ... -
MYSQL数据库设计的一点总结
2011-04-13 14:48 704选表类型: 大家都知道 ... -
mysql 清理碎片
2011-04-13 09:59 917显示你数据库中存在碎片的全部列表: select tab ... -
MySQL 建表语法
2011-04-12 14:21 8001、最简单的: CREATE TABLE t1( id ... -
排序时最快的取出尽量少的字段且索引字段
2011-04-11 15:51 833select company_albums.id,compan ... -
MySQL性能优化
2011-04-02 10:53 732作者:andyao 原文link: http://andyao ... -
Mysql Innodb 引擎优化-参数
2011-03-30 16:49 770介绍: InnoDB给MySQL提供了具有提交,回滚和崩溃 ... -
MySQL前端和后台的系统优化
2011-03-30 16:39 798本文中介绍的系统优化 ... -
MySQL配置文件my.cnf 做笔记用
2011-03-30 16:33 801MySQL配置文件my.cnf 例子最详细翻译,可以保存做笔记 ... -
测试脚本mysql_插入100万行数据
2011-03-29 16:31 1360CREATE DEFINER=`root`@`localhos ... -
Mysql日期和时间函数
2011-03-29 15:50 675这里是一个使用日期函 ... -
MySQL数据库优化的具体方法说明
2011-03-29 15:39 761以下的文章主要讲述的是实现MySQL数据库简单实用优化的具体方 ... -
MySQL之Explain
2011-03-29 15:16 622前记:很多东西看似简 ... -
MySQL维护命令集锦--查看表的状态(show table status)
2011-03-29 15:11 1230查看表的引擎类型等状态信息: show table statu ...
相关推荐
innotop是一款强大的MySQL和InnoDB性能监视工具,它提供了丰富的实时监控功能,帮助数据库管理员诊断和优化MySQL服务器的性能。 在CentOS上安装innotop通常包括以下几个步骤: 1. **更新系统**: 在开始安装任何...
1. **事务支持**:InnoDB支持事务的四种隔离级别,包括读未提交(READ UNCOMMITTED)、读已提交(READ COMMITTED)、可重复读(REPEATABLE READ,MySQL默认级别)和串行化(SERIALIZABLE)。这使得InnoDB能保证数据...
【MySQL启动报错问题InnoDB:Unable to lock/ibdata1 error】是一个常见的MySQL服务器启动时遇到的问题。这个问题通常表明MySQL的InnoDB存储引擎无法获取对`ibdata1`文件的锁,`ibdata1`是InnoDB用来存储数据和系统表...
Innotop 是一个高级的 MySQL 监控工具,专为 InnoDB 存储引擎设计,提供了丰富的实时性能信息。通过它,你可以深入理解数据库的运行状态,包括缓冲池、锁定、查询等关键指标,从而更好地优化数据库性能。 ### 安装 ...
《MySQL内核:InnoDB存储引擎 卷1》由资深MySQL专家,机工畅销图书作者亲自执笔,在以往出版的两本InnoDB介绍性图书的基础之上,更深入地介绍InnoDB存储引擎的内核,例如latch、B+树索引、事务、锁等,从源代码的...
最近在学习MySQL技术内幕 InnoDB存储引擎 第2版,整理了一些文档分享出来,同时也方便以后查看。若有不当之处,烦请批评指正。 1. MySQL体系结构和存储引擎 2. InnoDB存储引擎 2.1 InnoDB体系结构 2.2 ...
《InnoTop:深入解析MySQL InnoDB引擎实时监控工具及Cygwin安装指南》 MySQL数据库作为世界上最流行的开源关系型数据库管理系统,其InnoDB引擎在事务处理、数据完整性以及并发性能方面表现出色。然而,为了确保...
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 索引原理详解 #### 1. 各种树形结构 在深入探讨MySQL Innodb索引之前,我们先了解几种基本的树形数据结构,包括二叉搜索树、B树、B+树以及B*树。 ##### 1.1 搜索二叉树(Binary Search Tree) ...
"MySQL技术内幕 InnoDB存储引擎" 《MySQL技术内幕:InnoDB存储引擎》是一本深入解析InnoDB存储引擎的经典之作,由国内资深MySQL专家亲自执笔,国内外多位数据库专家联袂推荐。本书从源代码的角度深度解析了InnoDB的...
很好用的mysql性能监控工具 安装它需要的perl 库,它需要以下几个perl库: Term::ReadKey => 2.10, DBI => 1.13, DBD::mysql => 1.0, InnoDBParser => 1.1 其中,InnoDBParser 它本身自带。 我们这里采用CPAN来...
### MySQL安装InnoDB插件详解 #### 一、前言 在MySQL数据库系统中,InnoDB存储引擎是非常重要的一种类型,它支持事务处理(Transactions)、行级锁定(Row-Level Locking)以及外键约束(Foreign Key Constraints...
MySQL技术内幕InnoDB存储引擎-读书笔记.pdf
《MySQL技术内幕:InnoDB存储引擎》是国内目前唯一的一本关于InnoDB的著作,由资深MySQL专家亲自执笔,中外数据库专家联袂推荐,权威性毋庸置疑。内容深入,从源代码的角度深度解析了InnoDB的体系结构、实现原理、...
可作为深入理解MySQL InnoDB存储引擎实现细节的研究学习。
标题“mysql Unable to lock ./ibdata1, error: 11”所反映的问题是MySQL数据库在运行过程中遇到了一个常见的错误,提示无法锁定数据文件`ibdata1`,错误代码11。这个错误通常与数据库的表空间管理、并发操作或者...
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:MySQL系统监控利器** Innotop是一款针对MySQL数据库系统进行实时监控和性能分析的开源工具,因其简洁易用的特性而备受好评。它提供了丰富的界面和功能,帮助管理员快速理解数据库的运行状况,及时发现并...