percona-toolkit殺死慢的SQL語(yǔ)句

1、下載percona-toolkit-2.2.16.tar.gz

創(chuàng)新互聯(lián)公司專(zhuān)注于企業(yè)營(yíng)銷(xiāo)型網(wǎng)站、網(wǎng)站重做改版、金昌網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5技術(shù)、商城建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性?xún)r(jià)比高,為金昌等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。

# wget

https://www.percona.com/downloads/percona-toolkit/2.2.16/tarball/percona-toolkit-2.2.16.tar.gz

2、安裝

# ll

-rw-r--r-- 1 root root 1408239 11月  9 2015 percona-toolkit-2.2.16.tar.gz

# tar xf percona-toolkit-2.2.16.tar.gz

# cd percona-toolkit-2.2.16

# perl Makefile.PL

# yum -y install perl

# yum -y install perl-ExtUtils-MakeMaker.x86_64

# yum -y install perl-DBI.x86_64

# yum -y install perl-DBD-MySQL.x86_64

# perl Makefile.PL

# make

# make install

# yum -y install perl-Time-HiRes.x86_64

# /usr/local/bin/pt-kill -S /tmp/mysql.sock -u root -p"123456" \

--match-info "^(select|SELECT|Select)" \

--busy-time 5 --victim all --interval 3 --kill-query --print \

--log /usr/local/src/kill.txt --daemonize

--socket=s         -S  Socket file to use for connection

--user=s           -u  User for login if not current user

--password=s       -p  Password to use when connecting

--match-info=s         Match only queries whose Info (query) matches this Perl regex

--busy-time=m          Match queries that have been running for longer than

                         this time.  Optional suffix s=seconds, m=minutes, h=

                         hours, d=days; if no suffix, s is used.

--interval=m           How often to check for queries to kill.  Optional

                         suffix s=seconds, m=minutes, h=hours, d=days; if no

                         suffix, s is used.

--victims=s            Which of the matching queries in each class will be

                         killed (default oldest)

Actions:

  --execute-command=s    Execute this command when a query matches

  --kill                 Kill the connection for matching queries

  --kill-query           Kill matching queries

  --print                Print a KILL statement for matching queries; does not

                         actually kill queries

--log=s                Print all output to this file when daemonized

--daemonize            Fork to the background and detach from the shell

文章名稱(chēng):percona-toolkit殺死慢的SQL語(yǔ)句
分享網(wǎng)址:http://muchs.cn/article2/ijoooc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化網(wǎng)站策劃、網(wǎng)站改版、品牌網(wǎng)站設(shè)計(jì)移動(dòng)網(wǎng)站建設(shè)、網(wǎng)站內(nèi)鏈

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)