Search the MySQL manual:

4.5.7.6 SHOW PROCESSLIST

SHOW [FULL] PROCESSLIST shows you which threads are running. You can also get this information using the mysqladmin processlist command. If you have the SUPER privilege, you can see all threads. Otherwise, you can see only your own threads. See section 4.5.6 KILL Syntax. If you don't use the FULL option, then only the first 100 characters of each query will be shown.

Starting from 4.0.12, MySQL reports the hostname for TCP/IP connections as hostname:client_port to make it easier to find out which client is doing what.

This command is very useful if you get the 'too many connections' error message and want to find out what's going on. MySQL reserves one extra connection for a client with the SUPER privilege to ensure that you should always be able to login and check the system (assuming you are not giving this privilege to all your users).

Some states commonly seen in mysqladmin processlist

Most states are very quick operations. If threads last in any of these states for many seconds, there may be a problem around that needs to be investigated.

There are some other states that are not mentioned previously, but most of these are only useful to find bugs in mysqld.

User Comments

Posted by Tom Cai on Friday May 2 2003, @6:41pm[Delete] [Edit]

kaowin

Posted by Gary Every on Thursday May 8 2003, @12:45pm[Delete] [Edit]

The problem with the TCP/IP with the port after it is that it reports all the threads on the machine that you issue the SHOW PROCESSLIST command on. That is not helpful at all. It used to show the IP of the machine that originated the call. That would work well if it still showed the originating IP with the port after it.

Posted by [name withheld] on Saturday June 21 2003, @5:36pm[Delete] [Edit]

Documentation typo:
Sorting for group The thread is doing a sort to satsify a GROUP BY.
Sorting for order The thread is doing a sort to satsify a ORDER BY.

satsify -> satisfy

Add your own comment.