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做出批注,
顯示的狀態信息中有很多有用的東西,自己可以慢慢研究,網上也有很多詳細的說明!再次不做贅訴。
總結
以上是生活随笔為你收集整理的mysql innodb status_查看innodb的运行状态的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 西洋参与枸杞子泡水喝的功效与作用、禁忌和
- 下一篇: 吃高粱米可以减肥吗