mysql_processlist
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mysql_processlist [2015/10/15 09:09] – luke7858 | mysql_processlist [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Investigating mysql ==== | ==== Investigating mysql ==== | ||
| \\ | \\ | ||
| + | == Query List == | ||
| + | To view mysql query list run the following command from the command line: | ||
| + | <sxh bash> | ||
| + | SELECT * FROM information_schema.processlist WHERE command != ' | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | <sxh bash> | ||
| + | mysqladmin pr | grep Query | sort -nk12 | ||
| + | </ | ||
| + | Example output: | ||
| + | <sxh bash> | ||
| + | | 5950 | user1 | localhost | example_com | Query | 0 | checking query cache for query | SELECT m.filename, m.datedir, m.description, | ||
| + | | 5977 | root | localhost | | Query | 0 | | show processlist | ||
| + | | 5032 | user2 | localhost | new_shop | Query | 49 | Sending data | SELECT m.*, mm.is_winner, | ||
| + | </ | ||
| + | \\ | ||
| + | == All Processes == | ||
| If you need to investigate mysql you can troubleshoot by investigating the processlist | If you need to investigate mysql you can troubleshoot by investigating the processlist | ||
| <sxh> | <sxh> | ||
| Line 33: | Line 52: | ||
| | Info | The statement the thread is executing | | | Info | The statement the thread is executing | | ||
| - | source: https:// | + | |
| === mysql Common Commands === | === mysql Common Commands === | ||
| ^ Command | ^ Command | ||
| Line 47: | Line 66: | ||
| | Sleep | Waiting for the client to send a new statement | | | Sleep | Waiting for the client to send a new statement | | ||
| | Table Dump | Sending the contents of a table to a slave | | | Table Dump | Sending the contents of a table to a slave | | ||
| + | |||
| + | source: https:// | ||
mysql_processlist.1444900198.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
