MySQL监控工具-orztop
Posted zengkefu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL监控工具-orztop相关的知识,希望对你有一定的参考价值。
先安装orzdba,链接:http://blog.itpub.net/28939273/viewspace-1875895/
安装依赖的包:
[[email protected] servers]# yum install perl-TermReadKey.x86_64
否则报错如下:
[[email protected] servers]# ./orztop -u=root -p=‘yoon‘ -S=/export/data/mysql/tmp/mysql.sock
Can‘t locate Term/ReadKey.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./orztop line 14.
BEGIN failed--compilation aborted at ./orztop line 14.
[[email protected] servers]# yum search ReadKey
yum install perl-TermReadKey.x86_64
[[email protected] servers]# ./orztop -help
==========================================================================================
Info :
Created By [email protected]
Usage :
Command line options :
-help Print Help Info.
-h,--host Hostname/Ip to use for mysql connection.
-u,--user User to use for mysql connection.
-p,--pwd Password to use for mysql connection.
-P,--port Port to use for mysql connection(default 3306).
-S,--socket Socket to use for mysql connection.
-t Time(second) Interval.
==========================================================================================
[[email protected] servers]# ./orztop -u=root -p=‘yoon‘ -S=/export/data/mysql/tmp/mysql.sock
信息中还包括了数据库的每秒的insert/update/delete/select,逻辑读,命中率,当前活动线程等,可以大致看到数据库的当前压力情况;
当你的实例出现性能瓶颈时,不妨用该工具看看,抓取一下当前正在跑的慢sql
安装依赖的包:
[[email protected] servers]# yum install perl-TermReadKey.x86_64
否则报错如下:
[[email protected] servers]# ./orztop -u=root -p=‘yoon‘ -S=/export/data/mysql/tmp/mysql.sock
Can‘t locate Term/ReadKey.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./orztop line 14.
BEGIN failed--compilation aborted at ./orztop line 14.
[[email protected] servers]# yum search ReadKey
yum install perl-TermReadKey.x86_64
[[email protected] servers]# ./orztop -help
==========================================================================================
Info :
Created By [email protected]
Usage :
Command line options :
-help Print Help Info.
-h,--host Hostname/Ip to use for mysql connection.
-u,--user User to use for mysql connection.
-p,--pwd Password to use for mysql connection.
-P,--port Port to use for mysql connection(default 3306).
-S,--socket Socket to use for mysql connection.
-t Time(second) Interval.
==========================================================================================
[[email protected] servers]# ./orztop -u=root -p=‘yoon‘ -S=/export/data/mysql/tmp/mysql.sock
信息中还包括了数据库的每秒的insert/update/delete/select,逻辑读,命中率,当前活动线程等,可以大致看到数据库的当前压力情况;
当你的实例出现性能瓶颈时,不妨用该工具看看,抓取一下当前正在跑的慢sql
以上是关于MySQL监控工具-orztop的主要内容,如果未能解决你的问题,请参考以下文章