Skip to content

Commit 43be43c

Browse files
10.14 Examining Server Thread (Process) Information.md
1 parent 80dbbd4 commit 43be43c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
原文地址:https://dev.mysql.com/doc/refman/8.0/en/thread-information.html
2+
3+
4+
5+
## 10.14 Examining Server Thread (Process) Information
6+
7+
- [10.14.1 Accessing the Process List](https://dev.mysql.com/doc/refman/8.0/en/processlist-access.html)
8+
- [10.14.2 Thread Command Values](https://dev.mysql.com/doc/refman/8.0/en/thread-commands.html)
9+
- [10.14.3 General Thread States](https://dev.mysql.com/doc/refman/8.0/en/general-thread-states.html)
10+
- [10.14.4 Replication Source Thread States](https://dev.mysql.com/doc/refman/8.0/en/source-thread-states.html)
11+
- [10.14.5 Replication I/O (Receiver) Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-io-thread-states.html)
12+
- [10.14.6 Replication SQL Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-sql-thread-states.html)
13+
- [10.14.7 Replication Connection Thread States](https://dev.mysql.com/doc/refman/8.0/en/replica-connection-thread-states.html)
14+
- [10.14.8 NDB Cluster Thread States](https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-thread-states.html)
15+
- [10.14.9 Event Scheduler Thread States](https://dev.mysql.com/doc/refman/8.0/en/event-scheduler-thread-states.html)
16+
17+
18+
19+
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:
20+
21+
```sql
22+
mysql> SHOW PROCESSLIST\G
23+
*************************** 1. row ***************************
24+
Id: 5
25+
User: event_scheduler
26+
Host: localhost
27+
db: NULL
28+
Command: Daemon
29+
Time: 2756681
30+
State: Waiting on empty queue
31+
Info: NULL
32+
*************************** 2. row ***************************
33+
Id: 20
34+
User: me
35+
Host: localhost:52943
36+
db: test
37+
Command: Query
38+
Time: 0
39+
State: starting
40+
Info: SHOW PROCESSLIST
41+
```
42+
43+
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).

0 commit comments

Comments
 (0)