码迷,mamicode.com
首页 > 数据库 > 详细

MySQL监控工具-orztop

时间:2016-07-03 21:24:56      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:

 
先安装orzdba,链接:http://blog.itpub.net/28939273/viewspace-1875895/

安装依赖的包:
[root@hank-yoon servers]# yum install perl-TermReadKey.x86_64

否则报错如下:
[root@hank-yoon 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.

[root@hank-yoon servers]# yum search ReadKey
yum install perl-TermReadKey.x86_64

[root@hank-yoon servers]# ./orztop -help
==========================================================================================
Info  :
                Created By zhuxu@taobao.com
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.  


==========================================================================================

[root@hank-yoon servers]# ./orztop  -u=root -p=‘yoon‘ -S=/export/data/mysql/tmp/mysql.sock
技术分享

信息中还包括了数据库的每秒的insert/update/delete/select,逻辑读,命中率,当前活动线程等,可以大致看到数据库的当前压力情况;
当你的实例出现性能瓶颈时,不妨用该工具看看,抓取一下当前正在跑的慢sql

MySQL监控工具-orztop

标签:

原文地址:http://www.cnblogs.com/zengkefu/p/5638782.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!