查看InnoDB状态的小技巧
参考:https://blog.youkuaiyun.com/yangjianrong1985/article/details/102478972?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166567480016782427485017%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166567480016782427485017&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2blogfirst_rank_ecpm_v1~rank_v31_ecpm-1-102478972-null-null.nonecase&utm_term=%E6%9F%A5%E7%9C%8BInnoDB%E7%8A%B6%E6%80%81%E7%9A%84%E5%B0%8F%E6%8A%80%E5%B7%A7&spm=1018.2226.3001.4450
查看InnoDB状态
mysql> show engine innodb status\G;
*************************** 1. row ***************************
Type: InnoDB
Name:
Status:
=====================================
2022-10-13 23:48:08 140410201650944 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 61 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 16 srv_active, 0 srv_shutdown, 15499 srv_idle
srv_master_thread log flush and writes: 0
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 12
OS WAIT ARRAY INFO: signal count 12
RW-shared spins 0, rounds 0, OS waits 0
RW-excl spins 0, rounds 0, OS waits 0
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx
------------
TRANSACTIONS
------------
Trx id counter 4657
Purge done for trx's n:o < 4657 undo n:o < 0 state: running but idle
History list length 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421885198684400, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 421885198683544, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 421885198682688, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 421885198681832, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio r