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