Skip to content

Commit

Permalink
10.14 Examining Server Thread (Process) Information.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyijun402 authored Nov 29, 2024
1 parent 80dbbd4 commit 43be43c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions 10.14 Examining Server Thread (Process) Information.md
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).

0 comments on commit 43be43c

Please sign in to comment.