MySQL performance Doctor: OrzDBA
Svn co http://code.taobao.org/svn/orzdba/trunk
Wget http://github.com/downloads/Lowercases/tcprstat/tcprstat-static.v0.3.1.x86_64
Ln-sf / trunk/tcprstat-static.v0.3.1.x86_64 / usr/bin/tcprstat
Chmod Utility / usr/bin/tcprstat
MySQL verification information, such as username,password,host,port,sock, needs to be configured around the 160th line of code.
Vi orzdba
My $port = 3307; #-P
My $MYSQL = qq {mysql-s-- skip-column-names-ugg-p111111-h20.72.8.17$ port}
$MYSQL. = qq {- S$socket} if defined $socket
My $TCPRSTAT = "/ usr/bin/tcprstat-- no-header-t 1-n 0-p $port"
Extract the orzdba_rt_depend_perl_module.tar.gz and install the perl module that rt depends on
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
Wget http://mirror.centos.org/centos/7/os/x86_64/Packages/perl-Test-Simple-0.98-243.el7.noarch.rpm
Rpm-ivh perl-Test-Simple-0.98-243.el7.noarch.rpm
Tar-zxvf orzdba_rt_depend_perl_module.tar.gz
Cd Perl_Module
1.tar-zxvf version-0.99.tar.gz
Cd version-0.99
Perl Makefile.PL
Make
Make test
Cp lib/version/Internals.pod blib/lib/version/Internals.pod
Cp lib/version.pm blib/lib/version.pm
Cp lib/version.pod blib/lib/version.pod
Cd vutil/
Cp lib/version/vxs.pm.. / blib/lib/version/vxs.pm
Chmod 644 vxs.bs
Rm-f.. / blib/arch/auto/version/vxs/vxs.so
Chmod 755.. / blib/arch/auto/version/vxs/vxs.so
Cp vxs.bs.. / blib/arch/auto/version/vxs/vxs.bs
Chmod 644.. / blib/arch/auto/version/vxs/vxs.bs
Cd..
Rm-f.. / blib/arch/auto/version/vxs/vxs.so
Cd vutil/
Chmod 755.. / blib/arch/auto/version/vxs/vxs.so
Cd..
Make install
2.tar-zxvf Class-Data-Inheritable-0.08.tar.gz
Cd Class-Data-Inheritable-0.08
Perl Makefile.PL
Make test
Make install
3.tar-zxvf Module-Build-0.31.tar.gz
Cd Module-Build-0.31
Perl Build.PL
. / Build
. / Build test
. / Build install
4.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
Vi / etc/hosts
10.72.8.17 hank-yoon.com
Chmod-755 orzdba
Ln-sf / trunk/orzdba / usr/bin/orzdba
㈠ View MySQL response time (rt)
Orzdba-lazy-rt-S / data/mysql/mysql.sock
Note:
Count: the number of requests processed in this interval
Avg: the average response time of all completed requests in this interval
95_avg: the average response time of 95% of requests in this interval, in subtle units. This value can better reflect the average response time of MySQL Server queries.
㈡ monitors the indicators of InnoDB
Orzdba-innodb-S / data/mysql/mysql.sock
㈢ monitors MySQL Server performance
Orzdba-mysql-S / data/mysql/mysql.sock
Orztop
Yum install perl-CPAN perl-TermReadKey-y
Chmon755 / orztop
My $orzdba ='/ usr/bin/orzdba-lazy'
# my ($mysql_dbname,$mysql_host,$mysql_port,$mysql_user,$mysql_pass) = (', '10.72.8.17)
My ($mysql_dbname,$mysql_host,$mysql_port,$mysql_user,$mysql_pass) = (', '10.72.8.17)
My $mysql_socket ='/ data/mysql/mysql.sock'
/ orztop