网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

percona-toolkit杀死慢的SQL语句

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

创新互联公司专注于企业营销型网站、网站重做改版、金昌网站定制设计、自适应品牌网站建设、H5技术商城建设、集团公司官网建设、外贸网站制作、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为金昌等各大城市提供网站开发制作服务。

# 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


分享文章:percona-toolkit杀死慢的SQL语句
标题网址:http://bjjierui.cn/article/ijoooc.html

其他资讯