MySQL監控工具-orzdba

來源:互聯網
上載者:User

標籤:

原始碼地址:http://code.taobao.org/p/orzdba/src/trunk/    

[[email protected] servers]# chmod +x orzdba

在代碼的160行左右,配置自己的MySQL驗證資訊:username、password、socket、host、port
[[email protected] servers]# grep -n ‘my $MYSQL‘ orzdba
160:my $MYSQL    = qq{mysql -s --skip-column-names -uroot -pyoon -h127.0.0.1 -P$port };

先安裝tcprstat
[[email protected] servers]# ln -sf /export/servers/tcprstat-static.v0.3.1.x86_64 /usr/bin/tcprstat
[[email protected] servers]#chmod u+s /usr/bin/tcprstat

需要安裝的perl依賴包:
yum install perl-Test-Simple.x86_64
yum install perl-Time-HiRes
yum install perl-ExtUtils-CBuilder
yum install perl-ExtUtils-MakeMaker
yum install perl-DBD-MySQL
yum install perl-DBI

安裝中報錯:(因缺少了“yum install perl-Test-Simple.x86_64”)
t/02derived.t ..... Can‘t locate Test/More.pm in @INC (@INC contains: /export/servers/Perl_Module/version-0.99/blib/lib /export/servers/Perl_Module/version-0.99/blib/arch /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 t/02derived.t line 7.
BEGIN failed--compilation aborted at t/02derived.t line 7.
t/02derived.t ..... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run


安裝Perl的File:LockFfile模組
安裝version模組
wget http://search.cpan.org/CPAN/authors/id/J/JP/JPEACOCK/version-0.99.tar.gz
tar -zxvf version-0.99.tar.gz
cd version-0.99
perl Makefile.PL
make 
make test
make install

安裝安裝File::Lockfile模組:
wget http://search.cpan.org/CPAN/authors/id/G/GL/GLORYBOX/File-Lockfile-v1.0.5.tar.gz

tar -zxvf File-Lockfile-v1.0.5.tar.gz 
cd File-Lockfile-v1.0.5 
perl Build.PL
perl ./Build
perl ./Build test
perl ./Build install

安裝Class-Data-Inheritable模組:
wget http://search.cpan.org/CPAN/authors/id/T/TM/TMTM/Class-Data-Inheritable-0.08.tar.gztar -zxvf Class-Data-Inheritable-0.08.tar.gz 
cd Class-Data-Inheritable-0.08 
perl Makefile.PL 
make 
make test 
make install

安裝Module-Build模組:
wget http://search.cpan.org/CPAN/authors/id/K/KW/KWILLIAMS/Module-Build-0.31.tar.gz 
tar -zxvf Module-Build-0.31.tar.gz 
cd Module-Build-0.31 
perl Build.PL 
./Build 
./Build test 
./Build install


安裝完提示:Usage: Socket::inet_ntoa(ip_address_sv) at ./orz line 477
因主機名稱不能解析,將IP和主機名稱寫到/etc/hosts檔案

[[email protected] servers]# vi /etc/hosts
172.16.9.242   hank-yoon.com

[[email protected] servers]# ./orzdba  -lazy -rt -S /export/data/mysql/tmp/mysql.sock

count:此間隔內完成的請求數量
avg:此間隔內所有完成的請求,響應的平均時間
95_avg:此間隔內,95%的請求量的平均回應時間,單位微秒,該值較能體現MySQL Server查詢的平均回應時間


[[email protected] servers]# ./orzdba -innodb -S /export/data/mysql/tmp/mysql.sock

MySQL監控工具-orzdba

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.