Oracle Database 11gR2日志篇之CRS日志

前面陆续介绍了11gR2的后台进程资源的管理。今天概要介绍下11gR2的日志和问题定位。

经历过几个重要的release和持续的改进,9iR2,10gR1, 10gR2, 11gR1到最近的11gR2,Oracle Clusteware和RAC也变得越来越成熟,这其中就包括日志的规范性,既然在11gR2有这么多的资源和后台进程,那么对应他们的日志都在哪里,出了问题一般如何去定位呢? 这快内容分三个部分介绍如下:

首先是CRS相关的问题

在11.2中,CRS相关的日志比较集中,都位于CRS_HOME/log/nodename下面

 
bash-2.05$ pwd
/u01/app/cluster/crs/log/node1
bash-2.05$ tree
|-------admin
|-------agent
|       |-------crsd
|       |       |-------ora_oc4j_type_crsusr
|       |       |       `-------ora_oc4j_type_crsusr.log
|       |       |-------oraagent_crsusr
|       |       |       |-------oraagent_crsusr.l01
|       |       |       |-------oraagent_crsusr.l02
|       |       |       |-------oraagent_crsusr.l03
|       |       |       |-------oraagent_crsusr.l04
|       |       |       |-------oraagent_crsusr.l05
|       |       |       |-------oraagent_crsusr.l06
|       |       |       |-------oraagent_crsusr.l07
|       |       |       |-------oraagent_crsusr.l08
|       |       |       |-------oraagent_crsusr.l09
|       |       |       |-------oraagent_crsusr.l10
|       |       |       |-------oraagent_crsusr.log
|       |       |       |-------oraagent_crsusr.pid
|       |       |       `-------oraagent_crsusrOUT.log
|       |       `-------orarootagent_root
|       |               |-------orarootagent_root.l01
|       |               |-------orarootagent_root.l02
|       |               |-------orarootagent_root.l03
|       |               |-------orarootagent_root.l04
|       |               |-------orarootagent_root.l05
|       |               |-------orarootagent_root.l06
|       |               |-------orarootagent_root.l07
|       |               |-------orarootagent_root.l08
|       |               |-------orarootagent_root.l09
|       |               |-------orarootagent_root.l10
|       |               |-------orarootagent_root.log
|       |               |-------orarootagent_root.pid
|       |               |-------orarootagent_root.trc
|       |               `-------orarootagent_rootOUT.log
|       `-------ohasd
|               |-------oraagent_crsusr
|               |       |-------oraagent_crsusr.l01
|               |       |-------oraagent_crsusr.l02
|               |       |-------oraagent_crsusr.l03
|               |       |-------oraagent_crsusr.l04
|               |       |-------oraagent_crsusr.l05
|               |       |-------oraagent_crsusr.l06
|               |       |-------oraagent_crsusr.log
|               |       |-------oraagent_crsusr.pid
|               |       `-------oraagent_crsusrOUT.log
|               |-------oracssdagent_root
|               |       `-------oracssdagent_root.log
|               |-------oracssdmonitor_root
|               |       `-------oracssdmonitor_root.log
|               `-------orarootagent_root
|                       |-------orarootagent_root.log
|                       |-------orarootagent_root.pid
|                       `-------orarootagent_rootOUT.log
|-------client
|       |-------clscfg.log
|       |-------crsctl.log
|       |-------crsctl.trc
|       |-------gpnp_6718.log
|       |-------gpnp_6718.trc
|       |-------gpnptool_6431.log
|       |-------gpnptool_6431.trc
|       |-------gpnptool_6437.log
|       |-------gpnptool_6437.trc
|       |-------oclskd.log
|       |-------ocrcheck_11679.log
|       |-------ocrcheck_11679.trc
|       |-------ocrcheck_12475.log
|       |-------ocrcheck_27081.log
|       |-------ocrcheck_27194.log
|       |-------ocrcheck_27231.log
|       |-------ocrcheck_27869.log
|       |-------ocrcheck_28042.log
|       |-------ocrcheck_28090.log
|       |-------ocrcheck_28253.log
|       |-------ocrcheck_28287.log
|       |-------ocrcheck_564.log
|       |-------ocrconfig_11772.log
|       |-------ocrconfig_12493.log
|       |-------ocrconfig_27045.log
|       |-------ocrconfig_6259.log
|       |-------ocrconfig_6807.log
|       |-------ocrconfig_7963.log
|       |-------ocrdump_11617.log
|       |-------ocrdump_11617.trc
|       |-------ocrdump_12442.log
|       |-------oifcfg.log
|       |-------oifcfg.trc
|       |-------oifcfg1.trc
|       |-------olsnodes.log
|       `-------olsnodes.trc
|-------crsd
|       |-------core
|       |-------crsd.l01
|       |-------crsd.l02
|       |-------crsd.l03
|       |-------crsd.l04
|       |-------crsd.l05
|       |-------crsd.log
|       |-------crsd.trc
|       `-------crsdOUT.log
|-------cssd
|       |-------cssdOUT.log
|       |-------ocssd.l01
|       |-------ocssd.log
|       `-------ocssd.trc
|-------ctssd
|       |-------octssd.l01
|       |-------octssd.l02
|       |-------octssd.log
|       `-------octssd.trc
|-------diskmon
|       |-------diskmon.log
|       `-------diskmonOUT.log
|-------evmd
|       |-------evmd.log
|       |-------evmd.trc
|       `-------evmdOUT.log
|-------gipcd
|       `-------gipcd.log
|-------gnsd
|       |-------gnsd.log
|       |-------gnsd.trc
|       `-------gnsdOUT.log
|-------gpnpd
|       |-------gpnpd.log
|       |-------gpnpd.trc
|       |-------gpnpdOUT.log
|       `-------sun880-1.pid
|-------mdnsd
|       `-------mdnsd.log
|-------ohasd
|       |-------ohasd.log
|       |-------ohasd.trc
|       `-------ohasdOUT.log
|-------racg
|       |-------racgeut
|       |-------racgevtf
|       |-------racgmain
|       `-------evtf.log
|-------srvm
|       |-------eonsOUT.log
|       |-------eonsd.trc.10
|       |-------eonsd.trc.11
|       |-------eonsd.trc.12
|       |-------eonsdOUT.log
|       |-------eonsd_0.log
|       |-------eonsd_0.log.1
|       |-------eonsd_0.log.1.lck
|       `-------eonsd_0.log.lck
`-------alertnode1.log
bash-2.05$

секс мишки

这里需要重点介绍的就是agent这个子目录,这里面记录所有的has管理的资源的日志,包括crsd/ohasd资源,其中有些具有root权限的是分开管理的,所有就有四个子目录。

因为在11.2中,所有资源的操作都是间接的通过agent frame(在log中可以看到AGFW的字样)来完成的,所以如果要查看相关资源的start/stop/check等相关的日志,就需要根据crsd日志里面的相关时间点找到对应的agent日志。

比如下面这段就是从crsd oraagent日志中grep到的db停止的过程

 
2009-09-30 03:05:30.923: [    AGFW][140] Executing command: stop for resource: ora.orcldb.db 1 1
2009-09-30 03:05:30.925: [ora.orcldb.db][140] [stop] clsn_agent::stop {
2009-09-30 03:05:30.925: [ora.orcldb.db][140] [stop] InstAgent::stop {
2009-09-30 03:05:30.926: [ora.orcldb.db][140] [stop] Agent::flagUsrOraOpiIsSet(false)
2009-09-30 03:05:30.926: [ora.orcldb.db][140] [stop] Agent::valueOfAttribIs attrib: REASON compare value: dependency attribute value: user
2009-09-30 03:05:30.927: [ora.orcldb.db][140] [stop] Agent::valueOfAttribIs returns 0
2009-09-30 03:05:30.928: [ora.orcldb.db][140] [stop] Gimh::check condition (GIMH_NEXT_NUM) 9 exists
2009-09-30 03:05:30.928: [ora.orcldb.db][140] [stop] InstAgent::stop  shutdown mode: 3
2009-09-30 03:05:30.928: [ora.orcldb.db][140] [stop] DbAgent::preStopCbk {
2009-09-30 03:05:30.929: [ USRTHRD][140] Thread:[RLB:orcldb] stop {
2009-09-30 03:05:30.929: [ USRTHRD][140] Thread:[RLB:orcldb] stop {
2009-09-30 03:05:31.304: [ USRTHRD][38] Thread:[RLB:orcldb] DbAgent::Rlb::run stopping
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop }
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop }
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop {
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop {
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop }
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop }
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop {
2009-09-30 03:05:31.346: [ USRTHRD][140] Thread:[RLB:orcldb] stop }
2009-09-30 03:05:31.352: [ USRTHRD][140] Thread:[EonsSub FAN] stop {
2009-09-30 03:05:32.010: [ USRTHRD][140] Thread:[EonsSub FAN] stop }
2009-09-30 03:05:32.010: [ USRTHRD][140] Thread:[EonsSub FAN] stop {
2009-09-30 03:05:32.010: [ USRTHRD][140] Thread:[EonsSub FAN] stop }
2009-09-30 03:05:32.012: [ora.orcldb.db][140] [stop] DbAgent::preStopCbk }
2009-09-30 03:05:32.014: [ora.orcldb.db][140] [stop] makeConnectStr = (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/app/base/product/11g/bin/oracle)(ARGV0=oracleorcldb1)(ENVS='ORACLE_HOME=/u01/app/base/product/11g,ORACLE_SID=orcldb1')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=orcldb1)))
2009-09-30 03:05:32.016: [ora.orcldb.db][140] [stop] InstConnection::connectInt: server not attached
2009-09-30 03:05:32.445: [ora.orcldb.db][140] [stop] connect successful
2009-09-30 03:05:38.319: [ora.orcldb.db][140] [stop] DbAgent::stopCbk {
2009-09-30 03:05:49.056: [ora.orcldb.db][140] [stop] DbAgent::stopCbk }
2009-09-30 03:06:00.456: [ora.orcldb.db][140] [stop] InstAgent::stop: }
2009-09-30 03:06:00.457: [ora.orcldb.db][140] [stop] clsn_agent::stop }
2009-09-30 03:06:00.457: [    AGFW][140] Command: stop for resource: ora.orcldb.db 1 1 completed with status: SUCCESS
bash-2.05$
 
   <ul style="display:none"><li><a href="http://kaxsash.co.cc/main/v_vozraste_porno.html">в возрасте порно</a></li></ul> <u style="display:none"></u>

11.2中新引入的mdnsd, gipcd, gpnpd, gnsd, ctssd等都在对应的日志目录中进行记录,其他相关的日志跟之前的release相差不多,就不重点介绍。

如果要看完整的ohasd stack启动过程,可以从ohasd.log得到,这个所有的日志入口,里面记录了各个agent的启动过程。

This entry was posted in 数据库 and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *