mysql innodb status_查看innodb的运行状态

show innodb status 在以后的mysql版本将会被show engine innodb status所替代。

总所周知show engine innodb status是用来查看当前的mysql数据库中innodb表的相关状态。

1:show engine innodb status。

-----------------------------------+

| Type | Name | Status |

+-----------------------------------------------------------------------

| InnoDB | |

=====================================

101006 5:35:16 INNODB MONITOR OUTPUT

=====================================

Per second averages calculated from the last 41 seconds

----------

SEMAPHORES

----------

OS WAIT ARRAY INFO: reservation count 5, signal count 5

Mutex spin waits 0, rounds 40, OS waits 0

RW-shared spins 10, OS waits 5; RW-excl spins 0, OS waits 0

------------

TRANSACTIONS

------------

Trx id counter 0 840967

Purge done for trx's n:o < 0 840966 undo n:o < 0 0

History list length 11

LIST OF TRANSACTIONS FOR EACH SESSION:

---TRANSACTION 0 0, not started, process no 3574, OS thread id 2982812560

MySQL thread id 2, query id 13 localhost root

show engine innodb status

--------

FILE I/O

--------

I/O thread 0 state: waiting for i/o request (insert buffer thread)

I/O thread 1 state: waiting for i/o request (log thread)

I/O thread 2 state: waiting for i/o request (read thread)

I/O thread 3 state: waiting for i/o request (write thread)

Pending normal aio reads: 0, aio writes: 0,

ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0

Pending flushes (fsync) log: 0; buffer pool: 0

37 OS file reads, 45 OS file writes, 30 OS fsyncs

0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s

-------------------------------------

INSERT BUFFER AND ADAPTIVE HASH INDEX

-------------------------------------

Ibuf: size 1, free list len 0, seg size 2,

0 inserts, 0 merged recs, 0 merges

Hash table size 17393, node heap has 1 buffer(s)

0.00 hash searches/s, 0.00 non-hash searches/s

---

LOG

---

Log sequence number 0 451016813

Log flushed up to 0 451016813

Last checkpoint at 0 451016813

0 pending log writes, 0 pending chkp writes

19 log i/o's done, 0.00 log i/o's/second

----------------------

BUFFER POOL AND MEMORY

----------------------

Total memory allocated 13429750; in additional pool allocated 183680

Dictionary memory allocated 22888

Buffer pool size 256

Free buffers 235

Database pages 20

Modified db pages 0

Pending reads 0

Pending writes: LRU 0, flush list 0, single page 0

Pages read 24, created 4, written 37

0.00 reads/s, 0.00 creates/s, 0.00 writes/s

No buffer pool page gets since the last printout

--------------

ROW OPERATIONS

--------------

0 queries inside InnoDB, 0 queries in queue

1 read views open inside InnoDB

Main thread process no. 3574, id 2937031568, state: waiting for server activity

Number of rows inserted 0, updated 0, deleted 0, read 0

0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s

----------------------------

END OF INNODB MONITOR OUTPUT

2:我们可以创建一个innodb_monitor的表,将每隔15s的innodb状态写入到日志文件中。

create table innodb_monitor(a int)engine=innodb;

当我们不需要写入到日志文件中的时候,直接drop table innodb_monitor即可。

这中方法它是每隔15s搜集一次相关状态。

再次只对如何查看mysqlstatus做出批注,

显示的状态信息中有很多有用的东西,自己可以慢慢研究,网上也有很多详细的说明!再次不做赘诉。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值