# Why match-command doesn't match well?

**URL:** <https://forums.percona.com/t/why-match-command-doesnt-match-well/11804>\
**Category:** Percona Toolkit\
**Created:** [August 17, 2021, 7:32am UTC](https://forums.percona.com/t/why-match-command-doesnt-match-well/11804 "2021-08-17T07:32:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![O\_o](https://avatars.discourse-cdn.com/v4/letter/o/9dc877/32.png) [@O\_o](https://forums.percona.com/u/O_o)\
**Post date:** [August 17, 2021, 7:32am UTC](https://forums.percona.com/t/why-match-command-doesnt-match-well/11804/1 "2021-08-17T07:32:58Z")

</div>

Hello,

I’m trying to list the Sleep commands in order to kill them with pt-kill.

here is the test I performed:

```auto
Id User Host db Command Time State Info Rows_sent Rows_examined
1125886 user1 127.0.0.1:33192 dbexemple Query 13 Sending data DELETE `index_price` FROM `catalog_product_index_price` AS `index_price` WHERE (index_price.entity_ 0 0
1126197 user1 127.0.0.1:37946 dbexemple Sleep 3 NULL 1653 5543
1126203 user1 127.0.0.1:37950 dbexemple Sleep 1 NULL 0 0
1126204 user1 127.0.0.1:37952 dbexemple Sleep 1 NULL 0 0
1126211 user1 127.0.0.1:37954 dbexemple Sleep 1 NULL 0 0
1126212 user1 127.0.0.1:37956 dbexemple Sleep 1 NULL 0 0
1126213 user1 127.0.0.1:37958 dbexemple Sleep 1 NULL 0 0
1126214 user1 127.0.0.1:37960 dbexemple Sleep 1 NULL 0 0
1126215 user1 127.0.0.1:37962 dbexemple Sleep 1 NULL 0 0
1126216 user1 127.0.0.1:37964 dbexemple Sleep 1 NULL 0 0
1126217 user1 127.0.0.1:37966 dbexemple Sleep 1 NULL 0 0
1126218 user1 127.0.0.1:37968 dbexemple Sleep 1 NULL 0 0
1126219 user1 127.0.0.1:37970 dbexemple Sleep 1 NULL 0 0
1126224 user1 127.0.0.1:38008 dbexemple Sleep 379 NULL 0 0
1126225 user1 127.0.0.1:38012 dbexemple Sleep 0 NULL 1 6
1126242 user1 127.0.0.1:38114 dbexemple Sleep 1 NULL 0 0
1126244 user1 127.0.0.1:38120 dbexemple Sleep 1 NULL 0 0
1126245 user1 127.0.0.1:38122 dbexemple Sleep 1 NULL 0 0
1126247 user1 127.0.0.1:38126 dbexemple Sleep 1 NULL 0 0
1126249 user1 127.0.0.1:38130 dbexemple Sleep 1 NULL 0 0
1126250 user1 127.0.0.1:38132 dbexemple Sleep 1 NULL 0 0
1126252 user1 127.0.0.1:38136 dbexemple Sleep 1 NULL 0 0
1126254 user1 127.0.0.1:38140 dbexemple Sleep 1 NULL 0 0
1126255 user1 127.0.0.1:38142 dbexemple Sleep 1 NULL 0 0
1126525 user1 127.0.0.1:41206 dbexemple Sleep 16 NULL 0 0
1126533 user1 127.0.0.1:41244 dbexemple Sleep 0 NULL 0 0
1126546 root localhost NULL Query 0 init SHOW PROCESSLIST 0 0

root@Server01:~# pt-kill --test-matching proclist.txt --match-command Sleep --print
# 2021-08-17T09:22:51 KILL 1126224 (Sleep 379 sec) NULL

```

My question is as follows:  
**Why do I only have one line?**

by referring to the ID of the request, I see that the duration of this one seems to have been taken into account … 379 seconds against \<20 for the others. However, I did not specify a --busy-time or other time criteria.

I read the doc, about pt-kill and the options but I must have missed something.

Thank you for your feedback and have a nice day! 😅

Forgot :  
Server version: 5.6.51-91.0 Percona Server  
package :  
ii percona-toolkit 3.3.1-1.buster

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [August 17, 2021, 2:43pm UTC](https://forums.percona.com/t/why-match-command-doesnt-match-well/11804/2 "2021-08-17T14:43:20Z")

</div>

pt-kill only matches the first/single result by default. You need to add `--victims all` if you want them all killed. Look at the manual for more info.

---

<div class="post-metadata">

**Author:** ![O\_o](https://avatars.discourse-cdn.com/v4/letter/o/9dc877/32.png) [@O\_o](https://forums.percona.com/u/O_o)\
**Post date:** [August 18, 2021, 5:04am UTC](https://forums.percona.com/t/why-match-command-doesnt-match-well/11804/3 "2021-08-18T05:04:57Z")

</div>

You’re right, as soon as I saw --victims all I wanted to wip myself 🥺

Sorry, 🥴 I’m new here, thanks for your reply ! I’ll be more concentrated next time.

Have a nice day ! 😊
