How to hide sleeps from mysql processlist

I run some larger mysql databases with thousands of sleeping connections usually, and sometimes I just want to show what processes are doing.

SELECT user, time, state, info FROM information_schema.processlist WHERE command != 'Sleep' AND time >= 2 ORDER BY time DESC, id \G

Should select user, time, state, and info from information_schema, and display it in a more readable vertical format.

comments powered by Disqus