mysql鎖監視器

來源:互聯網
上載者:User

標籤:signal   ati   start   dict   set   hand   ops   moni   aio   

根據MySQL鎖監視器這篇文章來操作。

準備條件:大於5.6.16版本的MySQL,登入mysql

 

 

開啟 

 

set GLOBAL innodb_status_output=ON;set GLOBAL innodb_status_output_locks=ON;

新增、修改表。
mysql> show create table my_test1_0\G*************************** 1. row ***************************Table: my_test1_0Create Table: CREATE TABLE `my_test1_0` (`id` int(11) NOT NULL,`col2` int(11) DEFAULT NULL,`col3` varchar(64) DEFAULT NULL,`col4` varchar(10) DEFAULT NULL,`col5` varchar(64) DEFAULT NULL,PRIMARY KEY (`id`),KEY `idx_col2` (`col2`),KEY `idx_col3_col4` (`col3`,`col4`)) ENGINE=InnoDB DEFAULT CHARSET=latin11 row in set (0.08 sec) insert into my_test1_0(id ) values( 1 ),(2),(3);update my_test1_0 set col5=‘jiji‘ where id=1;

 

 

 

查看

 

  show engine innodb status\G

 

結果:

 

mysql> show engine innodb status\G*************************** 1. row ***************************  Type: InnoDB  Name:Status:=====================================2016-11-07 15:40:36 149c INNODB MONITOR OUTPUT=====================================Per second averages calculated from the last 0 seconds-----------------BACKGROUND THREAD-----------------srv_master_thread loops: 3 srv_active, 0 srv_shutdown, 1528929 srv_idlesrv_master_thread log flush and writes: 1528919----------SEMAPHORES----------OS WAIT ARRAY INFO: reservation count 19OS WAIT ARRAY INFO: signal count 18Mutex spin waits 142, rounds 276, OS waits 7RW-shared spins 9, rounds 221, OS waits 6RW-excl spins 1, rounds 150, OS waits 5Spin rounds per wait: 1.94 mutex, 24.56 RW-shared, 150.00 RW-excl------------TRANSACTIONS------------Trx id counter 22306Purge done for trx‘s n:o < 22306 undo n:o < 0 state: running but idleHistory list length 446LIST OF TRANSACTIONS FOR EACH SESSION:---TRANSACTION 0, not startedMySQL thread id 11, OS thread handle 0x149c, query id 239 localhost ::1 root intshow engine innodb status--------FILE I/O--------I/O thread 0 state: wait Windows aio (insert buffer thread)I/O thread 1 state: wait Windows aio (log thread)I/O thread 2 state: wait Windows aio (read thread)I/O thread 3 state: wait Windows aio (read thread)I/O thread 4 state: wait Windows aio (read thread)I/O thread 5 state: wait Windows aio (read thread)I/O thread 6 state: wait Windows aio (write thread)I/O thread 7 state: wait Windows aio (write thread)I/O thread 8 state: wait Windows aio (write thread)I/O thread 9 state: wait Windows aio (write thread)Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] , ibuf aio reads: 0, log i/o‘s: 0, sync i/o‘s: 0Pending flushes (fsync) log: 0; buffer pool: 0480 OS file reads, 55 OS file writes, 33 OS fsyncs0.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 mergesmerged operations: insert 0, delete mark 0, delete 0discarded operations: insert 0, delete mark 0, delete 0Hash table size 553253, node heap has 1 buffer(s)0.00 hash searches/s, 0.00 non-hash searches/s---LOG---Log sequence number 2555311Log flushed up to   2555311Pages flushed up to 2555311Last checkpoint at  25553110 pending log writes, 0 pending chkp writes18 log i/o‘s done, 0.00 log i/o‘s/second----------------------BUFFER POOL AND MEMORY----------------------Total memory allocated 136052736; in additional pool allocated 0Dictionary memory allocated 101103Buffer pool size   8192Free buffers       7737Database pages     454Old database pages 0Modified db pages  0Pending reads 0Pending writes: LRU 0, flush list 0, single page 0Pages made young 0, not young 00.00 youngs/s, 0.00 non-youngs/sPages read 448, created 6, written 330.00 reads/s, 0.00 creates/s, 0.00 writes/sNo buffer pool page gets since the last printoutPages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/LRU len: 454, unzip_LRU len: 0I/O sum[0]:cur[0], unzip sum[0]:cur[0]--------------ROW OPERATIONS--------------0 queries inside InnoDB, 0 queries in queue0 read views open inside InnoDBMain thread id 3908, state: sleepingNumber of rows inserted 3, updated 1, deleted 0, read 10.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s----------------------------END OF INNODB MONITOR OUTPUT============================1 row in set (0.08 sec)mysql>

 

mysql鎖監視器

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.