MySQL/MariaDB: Hide all sleeping processes in processlist

Updated . Posted . Visible to the public.

If you have many connections to your MySQL or MariaDB (as we have) you might want to filter the list you see when running a SHOW PROCESSLIST. To hide all sleeping processes, you can simply use grep as your pager:

\P grep -v "| Sleep"

There is an more advanced way by querying the information_schema database: Show MySQL process list without sleeping connections

Thomas Eisenbarth
Last edit
Thomas Eisenbarth
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2015-12-23 09:18)