本文共 2493 字,大约阅读时间需要 8 分钟。
svn co
wgetln -sf /trunk/tcprstat-static.v0.3.1.x86_64 /usr/bin/tcprstat
chmod u+s /usr/bin/tcprstat需要在代码160行左右配置MySQL的相关验证信息,如username,password,host,port,sock等
vi orzdbamy $port = 3307; # -P
my $MYSQL = qq{mysql -s --skip-column-names -ugg -p111111 -h10.72.8.17 $port };
$MYSQL .= qq{-S$socket } if defined $socket;my $TCPRSTAT = "/usr/bin/tcprstat --no-header -t 1 -n 0 -p $port";解压orzdba_rt_depend_perl_module.tar.gz,安装rt所依赖的perl模块
yum install perl-Test-Simple.x86_64yum install perl-Time-HiResyum install perl-ExtUtils-CBuilderyum install perl-ExtUtils-MakeMakeryum install perl-DBD-MySQLyum install perl-DBIwgetrpm -ivh perl-Test-Simple-0.98-243.el7.noarch.rpm
tar -zxvf orzdba_rt_depend_perl_module.tar.gzcd Perl_Module1.tar -zxvf version-0.99.tar.gz
cd version-0.99perl Makefile.PLmakemake testcp lib/version/Internals.pod blib/lib/version/Internals.podcp lib/version.pm blib/lib/version.pmcp lib/version.pod blib/lib/version.podcd vutil/cp lib/version/vxs.pm ../blib/lib/version/vxs.pmchmod 644 vxs.bsrm -f ../blib/arch/auto/version/vxs/vxs.sochmod 755 ../blib/arch/auto/version/vxs/vxs.socp vxs.bs ../blib/arch/auto/version/vxs/vxs.bschmod 644 ../blib/arch/auto/version/vxs/vxs.bscd ..rm -f ../blib/arch/auto/version/vxs/vxs.socd vutil/chmod 755 ../blib/arch/auto/version/vxs/vxs.socd ..make install2.tar -zxvf Class-Data-Inheritable-0.08.tar.gz
cd Class-Data-Inheritable-0.08perl Makefile.PLmake testmake install3.tar -zxvf Module-Build-0.31.tar.gz
cd Module-Build-0.31perl Build.PL./Build ./Build test ./Build install4.tar -zxvf File-Lockfile-v1.0.5.tar.gz
cd File-Lockfile-v1.0.5perl Build.PLperl ./Buildperl ./Build testperl ./Build installvi /etc/hosts
10.72.8.17 hank-yoon.comchmod -755 orzdbaln -sf /trunk/orzdba /usr/bin/orzdba㈠ 查看MySQL响应时间(rt)
orzdba -lazy -rt -S /data/mysql/mysql.sock注释:count:此间隔内处理完成的请求数量avg:此间隔内所有完成的请求,响应的平均时间95_avg:此间隔内,95%的请求量的平均响应时间,单位微妙,该值较能体现MySQL Server的查询平均响应时间㈡ 监控InnoDB的各项指标
orzdba -innodb -S /data/mysql/mysql.sock㈢ 监控MySQL Server性能orzdba -mysql -S /data/mysql/mysql.sockorztop
yum install perl-CPAN perl-TermReadKey -ychmon755 /orztopmy $orzdba = '/usr/bin/orzdba -lazy';
#my ($mysql_dbname,$mysql_host,$mysql_port,$mysql_user,$mysql_pass) = ('','10.72.8.17',3307,'gg','111111');my ($mysql_dbname,$mysql_host,$mysql_port,$mysql_user,$mysql_pass) = ('','10.72.8.17',3307,'gg','111111');my $mysql_socket = '/data/mysql/mysql.sock';/orztop
转载于:https://blog.51cto.com/11103985/2339645