怎么使用hanganalyze

本篇內(nèi)容主要講解“怎么使用hanganalyze”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“怎么使用hanganalyze”吧!

創(chuàng)新互聯(lián)建站-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設、高性價比嵐山網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式嵐山網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設找我們,業(yè)務覆蓋嵐山地區(qū)。費用合理售后完善,十載實體公司更值得信賴。

hanganalyze 和systemstate還是不同的,hanganalyze 里面會有清晰的等待鏈、等待時間、callstack等,比較輕量級。systemstate 相對hanganalyze 信息較多,會有很多proces和session的信息,還會有shared pool的信息,但是看等待鏈比較吃力。

1.命令

(1)單實例
SQL>oradebug setmypid 
SQL>oradebug unlimit 
SQL>oradebug hanganalyze 3 
等1~2分鐘 
SQL>oradebug hanganalyze 3 
等1~2分鐘 
SQL>oradebug hanganalyze 3 
(2).RAC
SQL>oradebug setmypid 
SQL>oradebug unlimit 
SQL>oradebug -g all hanganalyze 3 
等1~2分鐘 
SQL>oradebug -g all hanganalyze 3 
等1~2分鐘 
SQL>oradebug -g all hanganalyze 3

2.解讀trace文件

(1).State of nodes

([nodenum]/cnode/sid/sess_srno/session/ospid/state/start/finish/[adjlist]/predecessor):

[894]/0/895/60406/0xba362838/17792/NLEAF/261/264/[908]/1004

[908]/0/909/3031/0xba3754c8/16376/LEAF/262/263//894

[1004]/0/1005/23626/0xba3f61c8/18465/NLEAF/405/406/[894][908]/none

nodenum:定義每個session的序列號

sid:session的sid

sess_srno:session的Serial#

ospid:OS的進程ID

state:node的狀態(tài)

adjlist:表示blocker node

predecessor:表示waiter node

State有如下幾種狀態(tài):

(1)IN_HANG:如果Session處于這種狀態(tài),表示Session遇到deadlock或者處于hung狀態(tài)。

(2)LEAF/LEAF_NW:這些Session通常是“blocker”或者是等待某些資源的“slow” node,通過字段“predecessor” 可以很容易標識出這些node。

(3)NLEAF:這些Session通常被認為是“stuck”會話,意味著這些Session在等待某些Session的資源。通過字段“adjlist”可以很容易的定義該進程的blocker。

(4)IGN/IGN_DMP:這些Session通常是IDLE Session。

(5)SINGLE_NODE and SINGLE_NODE_NW 與leaf和leaf_nw相同,只是它們沒有依賴于它們的進程

根據(jù)上述信息可以得出:

[1004] block [894][908]

[894] block [908]

(2).CYCLES 處于死鎖狀態(tài)的會話之間的進程依賴性

Cycle 1 : <sid/sess_srno/proc_ptr/ospid/wait_event> :
    <980/3887/0xe4214964/24065/latch free>
 -- <2518/352/0xe4216560/24574/latch free>
 -- <55/10/0xe41236a8/13751/latch free>

(3).Found blocker會話,通常情況是1個session block了很多session會在這部分顯示

Found 21 objects waiting for <sid/sess_srno/proc_ptr/ospid/wait_event>
    <55/10/0xe41236a8/13751/latch free>
Found 12 objects waiting for <sid/sess_srno/proc_ptr/ospid/wait_event>
    <2098/2280/0xe42870d0/3022/db file scattered read>
Found 12 objects waiting for <sid/sess_srno/proc_ptr/ospid/wait_event>
    <1941/1783/0xe41ac9e0/462/No Wait>
Found 12 objects waiting for <sid/sess_srno/proc_ptr/ospid/wait_event>
    <980/3887/0xe4214964/24065/latch free>

(4).Chain 等待鏈上涉及的會話。等待鏈意味著一個會話正在阻塞一個或多個其他會話。

Open chains found:
Chain 1 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/909/3031/0xbcc5dc48/16376/SQL*Net message from client>
 -- <0/895/60406/0xbcc54448/17792/enq: TX - row lock contention>
 -- <0/1005/23626/0xbcc5fc48/18465/enq: TX - row lock contention>

(5).Other chains found 不是被Open chains上鏈阻塞的進程

Chain 2 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/820/40757/0xbcc61448/20057/jobq slave wait>
Chain 3 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/882/36187/0xbcc68448/19717/jobq slave wait>
Chain 4 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/985/3438/0xbcc50448/20054/No Wait>
Chain 5 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/1072/2/0xbcbf3448/20322/Streams AQ: qmn slave idle wait>
Chain 6 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/1079/2/0xbcbf0448/20117/Streams AQ: waiting for time man>
Chain 7 : <cnode/sid/sess_srno/proc_ptr/ospid/wait_event> :
    <0/1085/1/0xbcbed448/20070/Streams AQ: qmn coordinator idle>

到此,相信大家對“怎么使用hanganalyze”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關內(nèi)容可以進入相關頻道進行查詢,關注我們,繼續(xù)學習!

當前題目:怎么使用hanganalyze
文章地址:http://bm7419.com/article16/jdicgg.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供服務器托管、面包屑導航網(wǎng)站營銷、域名注冊、外貿(mào)網(wǎng)站建設、定制網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)