-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10.14 Examining Server Thread (Process) Information.md
- Loading branch information
1 parent
80dbbd4
commit 43be43c
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
原文地址:https://dev.mysql.com/doc/refman/8.0/en/thread-information.html | ||
|
||
|
||
|
||
## 10.14 Examining Server Thread (Process) Information | ||
|
||
- [10.14.1 Accessing the Process List](https://dev.mysql.com/doc/refman/8.0/en/processlist-access.html) | ||
- [10.14.2 Thread Command Values](https://dev.mysql.com/doc/refman/8.0/en/thread-commands.html) | ||
- [10.14.3 General Thread States](https://dev.mysql.com/doc/refman/8.0/en/general-thread-states.html) | ||
- [10.14.4 Replication Source Thread States](https://dev.mysql.com/doc/refman/8.0/en/source-thread-states.html) | ||
- [10.14.5 Replication I/O (Receiver) Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-io-thread-states.html) | ||
- [10.14.6 Replication SQL Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-sql-thread-states.html) | ||
- [10.14.7 Replication Connection Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-connection-thread-states.html) | ||
- [10.14.8 NDB Cluster Thread States](https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-thread-states.html) | ||
- [10.14.9 Event Scheduler Thread States](https://dev.mysql.com/doc/refman/8.0/en/event-scheduler-thread-states.html) | ||
|
||
|
||
|
||
To ascertain what your MySQL server is doing, it can be helpful to examine the process list, which indicates the operations currently being performed by the set of threads executing within the server. For example: | ||
|
||
```sql | ||
mysql> SHOW PROCESSLIST\G | ||
*************************** 1. row *************************** | ||
Id: 5 | ||
User: event_scheduler | ||
Host: localhost | ||
db: NULL | ||
Command: Daemon | ||
Time: 2756681 | ||
State: Waiting on empty queue | ||
Info: NULL | ||
*************************** 2. row *************************** | ||
Id: 20 | ||
User: me | ||
Host: localhost:52943 | ||
db: test | ||
Command: Query | ||
Time: 0 | ||
State: starting | ||
Info: SHOW PROCESSLIST | ||
``` | ||
|
||
Threads can be killed with the [`KILL`](https://dev.mysql.com/doc/refman/8.0/en/kill.html) statement. See [Section 15.7.8.4, “KILL Statement”](https://dev.mysql.com/doc/refman/8.0/en/kill.html). |