===================================== 160129 12:07:26 INNODB MONITOR OUTPUT #第二行是當(dāng)前日期和時(shí)間 ===================================== Per second averages calculated from the last 24 seconds #第四行顯示的是計(jì)算出這一平均值的時(shí)間間隔,即自上次輸出以來(lái)的時(shí)間,或者是距上次內(nèi)部復(fù)位的時(shí)長(zhǎng)
---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 68581015, signal count 218437328 --Thread 140653057947392 has waited at btr0pcur.c line 437 for 0.00 seconds the semaphore: S-lock on RW-latch at 0x7ff536c7d3c0 created in file buf0buf.c line 916 a writer (thread id 140653057947392) has reserved it in mode exclusive number of readers 0, waiters flag 1, lock_word: 0 Last time read locked in file row0sel.c line 3097 Last time write locked in file /usr/local/src/soft/mysql-5.5.24/storage/innobase/buf/buf0buf.c line 3151 --Thread 140653677291264 has waited at btr0pcur.c line 437 for 0.00 seconds the semaphore: S-lock on RW-latch at 0x7ff53945b240 created in file buf0buf.c line 916 a writer (thread id 140653677291264) has reserved it in mode exclusive number of readers 0, waiters flag 1, lock_word: 0 Last time read locked in file row0sel.c line 3097 Last time write locked in file /usr/local/src/soft/mysql-5.5.24/storage/innobase/buf/buf0buf.c line 3151 Mutex spin waits 1157217380, rounds 1783981614, OS waits 10610359 RW-shared spins 103830012, rounds 1982690277, OS waits 52051891 RW-excl spins 43730722, rounds 602114981, OS waits 3495769 Spin rounds per wait: 1.54 mutex, 19.10 RW-shared, 13.77 RW-excl
--Thread 140653057947392 has waited at btr0pcur.c line 437 for 0.00 seconds the semaphore: S-lock on RW-latch at 0x7ff536c7d3c0 created in file buf0buf.c line 916 a writer (thread id 140653057947392) has reserved it in mode exclusive number of readers 0, waiters flag 1, lock_word: 0 Last time read locked in file row0sel.c line 3097 Last time write locked in file /usr/local/src/soft/mysql-5.5.24/storage/innobase/buf/buf0buf.c line 3151 --Thread 140653677291264 has waited at btr0pcur.c line 437 for 0.00 seconds the semaphore: S-lock on RW-latch at 0x7ff53945b240 created in file buf0buf.c line 916 a writer (thread id 140653677291264) has reserved it in mode exclusive number of readers 0, waiters flag 1, lock_word: 0 Last time read locked in file row0sel.c line 3097 Last time write locked in file /usr/local/src/soft/mysql-5.5.24/storage/innobase/buf/buf0buf.c line 3151 這部分顯示的是當(dāng)前正在等待互斥量的innodb線程,在這里可以看到有兩個(gè)線程正在等待,每一個(gè)都是以--Thread <數(shù)字> has waited...開始,這一段內(nèi)容在正常情況下應(yīng)該是空的(即查看的時(shí)候沒有這部分內(nèi)容),除非服務(wù)器運(yùn)行著高并發(fā)的工作負(fù)載,促使innodb采取讓操作系統(tǒng)等待的措施,除非你對(duì)innodb源碼熟悉,否則這里看到的最有用的信息就是發(fā)生線程等待的代碼文件名 /usr/local/src/soft/mysql-5.5.24/storage/innobase/buf/buf0buf.c line 3151。