[root@amb01 ~]# yum install -y perl-ExtUtils-MakeMaker perl-DBD-MySQL perl-DBI \ perl-Module-Build perl-Test-Simple perl-Time-HiRes perl-ExtUtils-CBuilder [root@amb01 ~]# yum install -y subversion [root@amb01 ~]# svn co http://code.taobao.org/svn/orzdba/trunk [root@amb01 ~]# cd trunk [root@amb01 trunk]# tar zxvf orzdba_rt_depend_perl_module.tar.gz [root@amb01 trunk]# cd Perl_Module [root@amb01 Perl_Module]# tar zxvf version-0.99.tar.gz [root@amb01 Perl_Module]# cd version-0.99 [root@amb01 version-0.99]# perl Makefile.PL [root@amb01 version-0.99]# make [root@amb01 version-0.99]# make install [root@amb01 Perl_Module]# tar zxvf File-Lockfile-v1.0.5.tar.gz [root@amb01 Perl_Module]# cd File-Lockfile-v1.0.5 [root@amb01 File-Lockfile-v1.0.5]# perl Build.PL [root@amb01 File-Lockfile-v1.0.5]# ./Build [root@amb01 File-Lockfile-v1.0.5]# ./Build install [root@amb01 Perl_Module]# tar zxvf Module-Build-0.31.tar.gz [root@amb01 Perl_Module]# cd Module-Build-0.31 [root@amb01 Module-Build-0.31]# perl Build.PL [root@amb01 Module-Build-0.31]# ./Build [root@amb01 Module-Build-0.31]# ./Build install [root@amb01 Perl_Module]# tar zxvf Class-Data-Inheritable-0.08.tar.gz [root@amb01 Perl_Module]# cd Class-Data-Inheritable-0.08 [root@amb01 Class-Data-Inheritable-0.08]# perl Makefile.PL [root@amb01 Class-Data-Inheritable-0.08]# make [root@amb01 Class-Data-Inheritable-0.08]# make install [root@amb01 ~]# cd trunk [root@amb01 trunk]# chmod a+x orzdba [root@amb01 trunk]# cp orzdba /usr/bin [root@amb01 ~]# vi .my.cnf [client] user=root password=abcd.1234 socket=/tmp/mysql.sock [root@amb01 ~]# orzdba -help ========================================================================================== Info : Created By [email protected] Usage : Command line options : -h,--help Print Help Info. -i,--interval Time(second) Interval. -C,--count Times. -t,--time Print The Current Time. -nocolor Print NO Color. -l,--load Print Load Info. -c,--cpu Print Cpu Info. -s,--swap Print Swap Info. -d,--disk Print Disk Info. -n,--net Print Net Info. -P,--port Port number to use for mysql connection(default 3306). -S,--socket Socket file to use for mysql connection. -com Print MySQL Status(Com_select,Com_insert,Com_update,Com_delete). -hit Print Innodb Hit%. -innodb_rows Print Innodb Rows Status(Innodb_rows_inserted/updated/deleted/read). -innodb_pages Print Innodb Buffer Pool Pages Status(Innodb_buffer_pool_pages_data/free/dirty/flushed) -innodb_data Print Innodb Data Status(Innodb_data_reads/writes/read/written) -innodb_log Print Innodb Log Status(Innodb_os_log_fsyncs/written) -innodb_status Print Innodb Status from Command: 'Show Engine Innodb Status' (history list/ log unflushed/uncheckpointed bytes/ read views/ queries inside/queued) -T,--threads Print Threads Status(Threads_running,Threads_connected,Threads_created,Threads_cached). -rt Print MySQL DB RT(us). -B,--bytes Print Bytes received from/send to MySQL(Bytes_received,Bytes_sent). -mysql Print MySQLInfo (include -t,-com,-hit,-T,-B). -innodb Print InnodbInfo(include -t,-innodb_pages,-innodb_data,-innodb_log,-innodb_status) -sys Print SysInfo (include -t,-l,-c,-s). -lazy Print Info (include -t,-l,-c,-s,-com,-hit). -L,--logfile Print to Logfile. -logfile_by_day One day a logfile,the suffix of logfile is 'yyyy-mm-dd'; and is valid with -L. Sample : shell> nohup ./orzdba -lazy -d sda -C 5 -i 2 -L /tmp/orzdba.log > /dev/null 2>&1 & ==========================================================================================
mysql database 性能监控工具:orzdba
猜你喜欢
转载自blog.51cto.com/13598811/2309165
今日推荐
周排行