1、下載percona-toolkit-2.2.16.tar.gz
創(chuàng)新互聯(lián)建站長期為上千余家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺(tái),與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為白城企業(yè)提供專業(yè)的成都網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、外貿(mào)網(wǎng)站建設(shè),白城網(wǎng)站改版等技術(shù)服務(wù)。擁有10余年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開發(fā)。# 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
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。