oracle 11g pmon工作內容系列三

wisdomone1發表於2015-11-05

結論

1,oradebug dump errorstack 4,可以跟蹤pmon的工作內容
2,從上述的TRACE FILE可知有清除程式本身資源的操作,即清除PsO,程式狀態物件
fd=/proc/self/fd/8 File=/oracle/product/11.2.0/db_1/dbs/lkinstguowang (deleted)
2015-11-01 22:03:06.576879 :8016E390:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-01 22:24:16.725104 :80227F92:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:22:12.519252 :80D595BD:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:35:34.461716 :80DD430B:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:51:10.259771 :80E5C6B8:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 05:21:44.279344 :80F64EE0:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 05:54:21.974978 :81070F34:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket


3,errorstack可以跟蹤各個ORACLE程式,且級別可以指定
4, 即可以結合oradebug errorstack及10246從不同維度分析pmon的工作內容
5,分析一個事物,要從多個方面來分析,即需要不同的工具,還要進一步擴寬思路,掌握能力
6,errorstack產生的TRACE FILE內容非常多,有空再研究下




測試



1,資料庫版本
SQL> select * from v$version where rownum=1;


BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


2,獲取PMON資訊
SQL> select pname,pid,spid from v$process where pname='PMON';


PNAME             PID SPID
---------- ---------- ------------------------------------------------
PMON                2 10556


3,測試會話資訊


SQL> SQL> select addr,pid,spid from v$process where addr=(select paddr from v$session where sid=(select sid from v$mystat where rownum=1));


ADDR                    PID SPID
---------------- ---------- ------------------------------------------------
00000000DD636140        150 4160


SQL> select sid,serial# from v$session where sid=(select sid from v$mystat where rownum=1);


       SID    SERIAL#
---------- ----------
       343       8273       




4,oradebug dump errorstack 4分析pmon
SQL> oradebug setospid 10556
Oracle pid: 2, Unix process pid: 10556, image: oracle@seconary (PMON)


SQL> oradebug dump errorstack 4
Statement processed.       


5,kill 死測試會話


kill -9 4600


6,檢視PMON的TACE檔案


SQL> 
oradebug tracefile_name


/oracle/diag/rdbms/guowang/guowang/trace/guowang_pmon_10556.trc


--釋放BUFFER CACHE佔用的資源
[oracle@seconary trace]$ more  /oracle/diag/rdbms/guowang/guowang/trace/guowang_pmon_10556.trc|grep -i --color delet
2AC1458CC000 4E204F44 4420544F 54454C45 524F2045  [DO NOT DELETE OR]
uword ksosp_alloc_where_delete1_ [0600107D8, 0600107DC) = 000001F2
uword ksosp_lat_where_delete1_ [060010908, 06001090C) = 00000204
uword ksosp_lat_where_delete2_ [060010910, 060010914) = 00000205
uword ksirsoDeleteWhere00_ [060010B88, 060010B8C) = 0000020C
uword ksirsoDeleteWhere01_ [060010B90, 060010B94) = 0000020D
uword ksirsoDeleteWhere02_ [060010B98, 060010B9C) = 0000020E
uword ksirsoDeleteWhere03_ [060010BA0, 060010BA4) = 0000020F
uword ksirsoDeleteWhere04_ [060010BA8, 060010BAC) = 00000210
uword ksirsoDeleteWhere05_ [060010BB0, 060010BB4) = 00000211
uword ksirsoDeleteWhere06_ [060010BB8, 060010BBC) = 00000212
uword ksirsoDeleteWhere07_ [060010BC0, 060010BC4) = 00000213
uword ksirsoDeleteWhere08_ [060010BC8, 060010BCC) = 00000214
uword ksirsoDeleteWhere09_ [060010BD0, 060010BD4) = 00000215
uword kfelsoDelete_ [060048658, 06004865C) = 000013FB
uword kgqbt_latch_delete_ [060007BF4, 060007BF8) = 00000F3F
uword kgs_delete_where_ [060007E98, 060007E9C) = 00000F80
fd=/proc/self/fd/8 File=/oracle/product/11.2.0/db_1/dbs/lkinstguowang (deleted)
2015-11-01 22:03:06.576879 :8016E390:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-01 22:24:16.725104 :80227F92:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:22:12.519252 :80D595BD:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:35:34.461716 :80DD430B:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 04:51:10.259771 :80E5C6B8:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 05:21:44.279344 :80F64EE0:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
2015-11-02 05:54:21.974978 :81070F34:diag_uts:dbktb.c@716:dbktbDefaultBucketFree(): process state object being deleted; switched to private bucket
[oracle@seconary trace]$ 




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-1823388/,如需轉載,請註明出處,否則將追究法律責任。

相關文章