svn co http://code.taobao.org/svn/orzdba/trunk
wget http://github.com/downloads/Lowercases/tcprstat/tcprstat-static.v0.3.1.x86_64
創(chuàng)新互聯(lián)公司是一家從事企業(yè)網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、行業(yè)門戶網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)制作的專業(yè)網(wǎng)絡(luò)公司,擁有經(jīng)驗(yàn)豐富的網(wǎng)站建設(shè)工程師和網(wǎng)頁設(shè)計(jì)人員,具備各種規(guī)模與類型網(wǎng)站建設(shè)的實(shí)力,在網(wǎng)站建設(shè)領(lǐng)域樹立了自己獨(dú)特的設(shè)計(jì)風(fēng)格。自公司成立以來曾獨(dú)立設(shè)計(jì)制作的站點(diǎn)上千家。
ln -sf /trunk/tcprstat-static.v0.3.1.x86_64 /usr/bin/tcprstat
chmod u+s /usr/bin/tcprstat
需要在代碼160行左右配置MySQL的相關(guān)驗(yàn)證信息,如username,password,host,port,sock等
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";
解壓orzdba_rt_depend_perl_module.tar.gz,安裝rt所依賴的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
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
㈠ 查看MySQL響應(yīng)時(shí)間(rt)
orzdba -lazy -rt -S /data/mysql/mysql.sock
注釋:
count:此間隔內(nèi)處理完成的請(qǐng)求數(shù)量
avg:此間隔內(nèi)所有完成的請(qǐng)求,響應(yīng)的平均時(shí)間
95_avg:此間隔內(nèi),95%的請(qǐng)求量的平均響應(yīng)時(shí)間,單位微妙,該值較能體現(xiàn)MySQL Server的查詢平均響應(yīng)時(shí)間
㈡ 監(jiān)控InnoDB的各項(xiàng)指標(biāo)
orzdba -innodb -S /data/mysql/mysql.sock
㈢ 監(jiān)控MySQL Server性能
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',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
文章標(biāo)題:MySQL性能醫(yī)生:OrzDBA
文章URL:http://www.rwnh.cn/article48/jipcep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站策劃、網(wǎng)站設(shè)計(jì)、面包屑導(dǎo)航、用戶體驗(yàn)、網(wǎng)站排名
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)