Pt-kill Common Kill process parameters

Source: Internet
Author: User

Pt-kill Common Kill process parameters



1. Press User Kill

/usr/bin/pt-kill--busy-time--match-user= "dbUSER1 | DbUSER2,... "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log

Note: Test by user to kill thread, note--match-user between multiple users | Separated.



2. Press query to source host kill

/usr/bin/pt-kill--busy-time--match-host= "192.168.10.10 | 192.168.10.11 "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log

--ignore-host/--match-host

Note: Tests are done by the source host to kill the thread, note that the--match-host is used between multiple hosts | Separated.



3. Press Command to Kill

/usr/bin/pt-kill--busy-time   --match-command= "Query | Execute "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log

/usr/bin/pt-kill--busy-time   --ignore-command= "Sleep | Binlogdump "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log

note: Test by command to kill the thread, note that command content must strictly match the case, otherwise it will not kill. Note--match-command multiple command-by | Separated, otherwise it will fail.



4. Press state kill

/usr/bin/pt-kill--busy-time--match-state= "Locked | Sending data "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log /p>

Note: The test by pressing the state to kill the thread , note that the state of the content must be strictly match the case, otherwise it will not kill. Note--match-state multiple state between | Separated, otherwise it will fail.

(The state type is: Locked, login, copy to TMP table, Copying to TMP table, Copying to TMP table on disk, Creating tmp table, executing, Re Ading from net, sending data, sorting for order, sorting result, Table lock, Updating)



5. Click the info keyword to kill

/usr/bin/pt-kill--busy-time--match-info= "SELECT | DELETE "--victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log

Note: Test by pressing info to kill the thread, note info The content must be strictly match the case, otherwise it will not kill. Note--match-info multiple info in between | Separated, otherwise it will fail.

--ignore-info/--match-info
(info can be matched using SELECT, UPDATE, INSERT, delete, and you can use the | Make multiple matches, such as "select| select|delete| delete|update| UPDATE "



6. On-Access dbname kill

/usr/bin/pt-kill--busy-time--match-db= "DB1 | DB2 " --victim all--interval 1--kill--daemonize--pid=/tmp/ptkill.pid--print--log=/home/pt-kill.log
 --ignore-db  /--match-db
note: Test by pressing db to kill the thread, note DB The content must be strictly match the case, otherwise it will not kill. Note--match-DB between multiple db | Separated, otherwise it will fail.



Another: Action:
--kill Kill the connection and exit
--kill-query only kills the statement that the connection executes, but the thread is not terminated


Pt-kill Common Kill process parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.