orzdba工具配置
./orzdba -lazy -rt -s /u01/svr/working/my3306/run/mysql.sock
mysql -s --skip-column-names -h127.0.0.1 -urep -p3306 -prep123 -dmysql -s /u01/svr/working/my3306/run/mysql.sock
源代码地址:http://code.taobao.org/p/orzdba/src/trunk/
[root@hank-yoon servers]# chmod +x orzdba
在代码的160行左右,配置自己的mysql验证信息:username、password、socket、host、port
[root@hank-yoon servers]# grep -n 'my $mysql' orzdba
160:my $mysql = qq{mysql -s --skip-column-names -uroot -pyoon -h127.0.0.1 -p$port };
先安装tcprstat
[root@hank-yoon servers]# ln -sf /export/servers/tcprstat-static.v0.3.1.x86_64 /usr/bin/tcprstat
[root@hank-yoon servers]#chmod u+s /usr/bin/tcprstat
cp tcprstat /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.gz
tar -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文件
[root@hank-yoon servers]# vi /etc/hosts
172.16.9.242 hank-yoon.com
[root@hank-yoon servers]# ./orzdba -lazy -rt -s /export/data/mysql/tmp/mysql.sock
count:此间隔内完成的请求数量
avg:此间隔内所有完成的请求,响应的平均时间
95_avg:此间隔内,95%的请求量的平均响应时间,单位微秒,该值较能体现mysql server查询的平均响应时间
[root@hank-yoon servers]# ./orzdba -innodb -s /u01/svr/working/my3306/run/mysql.sock
推荐阅读
-
mysql 5.7以上版本安装配置方法图文教程(mysql 5.7.12mysql 5.7.13mysql 5.7.14)
-
Eclipse怎么在线配置Hibernate Tools?
-
eclipse怎么删除配置好的多余的工作空间?
-
Mysql5.7.17 winx64.zip解压缩版安装配置图文教程
-
MySQL 5.6下table_open_cache参数优化合理配置详解
-
Centos7安装和配置Mysql5.7
-
eclipse怎么创建servlet中class并配置servlet教程
-
Android studio怎么配置代码检查规则?
-
Visual Studio怎么重新配置开发环境?
-
如何制作微信H5页面动画?Mugeda在线制作工具制作流程