# pt-kill does not consider the ignore-user when multiple users

**URL:** <https://forums.percona.com/t/pt-kill-does-not-consider-the-ignore-user-when-multiple-users/6161>\
**Category:** Percona Toolkit\
**Created:** [January 29, 2018, 6:37am UTC](https://forums.percona.com/t/pt-kill-does-not-consider-the-ignore-user-when-multiple-users/6161 "2018-01-29T06:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wagnerbianchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/wagnerbianchi/32/802_2.png) [@wagnerbianchi](https://forums.percona.com/u/wagnerbianchi)\
**Post date:** [January 29, 2018, 6:37am UTC](https://forums.percona.com/t/pt-kill-does-not-consider-the-ignore-user-when-multiple-users/6161/1 "2018-01-29T06:37:41Z")

</div>

Folks,

I’ve got recently an interesting scenario and a very regular one; I need to ignore two users when killing the Sleepers, but, just the sleepers who sleep for more than --idle-time=300.

An example of the problem I found is below. When passing one user, it’s OK, but, when you have two, three user to ignore, none are ignored and just the time is considered before killing.

```auto
[root&#64;db1 ~]# pt-kill --ignore-user a,b --verbose --idle-time 300 --test-matching proclist --print
# 2018-01-28T23:03:34 /bin/pt-kill starting
# 2018-01-28T23:03:34 Test matching files proclist
# 2018-01-28T23:03:34 Find spec: $VAR1 = {
all => undef,
busy_time => undef,
idle_time => '300',
ignore => {
Command => undef,
Host => undef,
Id => undef,
Info => undef,
State => 'Locked',
User => 'a,b',
db => undef
},
match => {
Command => undef,
Host => undef,
Info => undef,
State => undef,
User => undef,
db => undef
},
replication_threads => undef
};

# 2018-01-28T23:03:34 Checking processlist
# 2018-01-28T23:03:34 Matched 1 queries
# 2018-01-28T23:03:34 KILL 30 (Sleep 763 sec) NULL
# 2018-01-28T23:03:34 Checking processlist
# 2018-01-28T23:03:34 Processlist returned no queries
# 2018-01-28T23:03:34 Checking processlist
# 2018-01-28T23:03:34 /bin/pt-kill ending
[root&#64;db1 ~]# cat proclist
Id User Host db Command Time State Info Progress
30 a localhost NULL Sleep 763 NULL 0.000
31 b localhost NULL Sleep 749 NULL 0.000
38 root localhost NULL Query 0 init show processlist 0.000

```

As you can see above, pt-kill is killing the user based on the idle-time, but, not considering that user as ignored. If we follow what was showed on the $VAR1, we can say that; when the current idle time on SHOW PROCESSLIST is higher than the one passed on the --idle-time parameter, the thread will be killed; but, the user is being ignored, in an inner part of the JSON. Is it what the algos are doing?

In this case, I need to ignore the user, and I don’t want to consider evaluating the idle time for its connection. Is it perhaps a bug or I am missing something? It’s good to say that, if I pass only one user on the --ignore-user, things work as expected.  
Thanks, guys!

---

<div class="post-metadata">

**Author:** ![carlos.salguero](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/carlos.salguero/32/20_2.png) [@carlos.salguero](https://forums.percona.com/u/carlos.salguero)\
**Post date:** [January 29, 2018, 7:17am UTC](https://forums.percona.com/t/pt-kill-does-not-consider-the-ignore-user-when-multiple-users/6161/2 "2018-01-29T07:17:52Z")

</div>

Hi,  
I created [url][[PT-1476] pt-kill does not consider the ignore-user when multiple users - Percona JIRA](https://jira.percona.com/browse/PT-1476%5B/url%5D) to track this issue.

Regards

---

<div class="post-metadata">

**Author:** ![wagnerbianchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/wagnerbianchi/32/802_2.png) [@wagnerbianchi](https://forums.percona.com/u/wagnerbianchi)\
**Post date:** [January 29, 2018, 10:58am UTC](https://forums.percona.com/t/pt-kill-does-not-consider-the-ignore-user-when-multiple-users/6161/3 "2018-01-29T10:58:46Z")

</div>

Gracias, Carlos!
