percona toolkit只能在linux下安装吗
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了percona toolkit只能在linux下安装吗相关的知识,希望对你有一定的参考价值。
想在linux系统比如Ubuntu下玩PS2游戏可以安装Linux版的PCSX2。以Ubuntu系统为例:
一、安装PCSX2
1.使用PPA源安装
添加pcsx2模拟器的ppa源
在终端中输入 sudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa
更新资源
在终端中输入 sudo apt-get update
更新完成后安装pcsx2模拟器
在终端中输入 sudo apt-get install pcsx2-unstable
之后可在在dash菜单中搜索pcsx2 并打开,或者运行pcsx2命令。
2.直接下载Linux版的PCSX2 参考技术A 目前因该只支持linux
percona-toolkit 杀死慢的SQL语句
1、下载percona-toolkit-2.2.16.tar.gz
# 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只能在linux下安装吗的主要内容,如果未能解决你的问题,请参考以下文章