Posted almost 5 years ago. Visible to the public.

MySQL/MariaDB: Hide all sleeping processes in processlist

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:

Copy
\P grep -v "| Sleep"

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

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Thomas Eisenbarth
Last edit:
over 4 years ago
by Thomas Eisenbarth
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Eisenbarth to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more