【MySQL日常运维】查看InnoDB状态的小技巧

本文介绍了在MySQL日常运维中查看InnoDB状态的小技巧,包括如何查看上一次的InnoDB状态结果,以及通过查找mysqld的进程号来获取详细信息。通过lsof命令可以获取到show engine innodb status的输出结果,帮助理解InnoDB的状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值