Process List

This page describes Percona changes to both the standard MySQL SHOW PROCESSLIST command and the standard MySQL INFORMATION_SCHEMA table PROCESSLIST.

INFORMATION_SCHEMA Tables

table INFORMATION_SCHEMA.PROCESSLIST

This table implements modifications to the standard MySQL INFORMATION_SCHEMA table PROCESSLIST.

Columns:
  • ID – The connection identifier.
  • USER – The MySQL user who issued the statement.
  • HOST – The host name of the client issuing the statement.
  • DB – The default database, if one is selected, otherwise NULL.
  • COMMAND – The type of command the thread is executing.
  • TIME – The time in seconds that the thread has been in its current state.
  • STATE – An action, event, or state that indicates what the thread is doing.
  • INFO – The statement that the thread is executing, or NULL if it is not executing any statement.
  • TIME_MS – The time in milliseconds that the thread has been in its current state.

Example Output

SHOW PROCESSLIST Command:

mysql> show processlist;
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+
| Id   | User      | Host      | db     | Command | Time | State      | Info                                         |
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+
|    2 | root      | localhost | test   | Query   |    0 | NULL       | SHOW PROCESSLIST                             |
|   14 | root      | localhost | test   | Query   |    0 | User lock  | SELECT GET_LOCK(``t``,1000)                  |
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+

Table PROCESSLIST:

mysql> select * from information_schema.PROCESSLIST;
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+
| ID   | USER      | HOST      | DB     | COMMAND | TIME | STATE      | INFO                                         |
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+
|   14 | root      | localhost | test   | Query   |    0 | User lock  | SELECT GET_LOCK(``t``,1000)                  |
|    2 | root      | localhost | test   | Query   |    0 | executing  | SELECT * from INFORMATION_SCHEMA.PROCESSLIST |
+------+-----------+-----------+--------+---------+------+------------+----------------------------------------------+
© Copyright Percona LLC and/or its affiliates 2009-2014.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
Created using Sphinx 1.2.2.
This documentation is developed in Launchpad as part of the Percona Server source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.