ITPub博客

首页 > Linux操作系统 > Linux操作系统 > CRS资源的DEBUG

CRS资源的DEBUG

原创 Linux操作系统 作者:westzq1984 时间:2009-04-25 16:23:27 0 删除 编辑

-----------------------------------------------------------------------------------------------------
[oracle@westzq3 ~]$ crs_stat -p ora.westzq3.vip|grep -i debug
USR_ORA_DEBUG=0
[root@westzq3 ~]# /u01/app/oracle/product/crs/bin/crsctl debug log res "ora.westzq4.vip:4"
Set Resource Debug Module: ora.westzq4.vip  Level: 4
[oracle@westzq3 ~]$ crs_stat -p ora.westzq4.vip|grep -i debug
USR_ORA_DEBUG=4

级别 默认0,最高9

没发现级别0和9 在启动关闭时候,在crsd.log和racg/ora.westzq4.vip.log的输出有什么不同,先记录,以后遇到问题在看
根据METALINK的说法(356535.1),应该记录日志在ora.westzq4.vip.log中,估计我的集群是正常的无问题的所以无输出

-----------------------------------------------------------------------------------------------------
[oracle@westzq3 ~]$ crsctl lsmodules crs
The following are the CRS modules ::
    CRSUI
    CRSCOMM
    CRSRTI
    CRSMAIN
    CRSPLACE
    CRSAPP
    CRSRES
    CRSCOMM
    CRSOCR
    CRSTIMER
    CRSEVT
    CRSD
    CLUCLS
    CSSCLNT
    COMMCRS
    COMMNS
   
对应crsd.log日志的第一个括号的选项
2009-04-25 16:21:11.275: [  CRSOCR][2842631088]0CAAOCR SET Debug Level[ora.westzq4.vip]: 2
2009-04-25 16:21:25.077: [  CRSRES][2661989296]0Attempting to start `ora.westzq4.vip` on member `westzq4`
2009-04-25 16:21:38.882: [  CRSRES][2661989296]0Start of `ora.westzq4.vip` on member `westzq4` succeeded.

[root@westzq3 ~]# /u01/app/oracle/product/crs/bin/crsctl debug log crs "CRSRES:5"
Set CRSD Debug Module: CRSRES  Level: 5

该命令控制着crsd.log的日志详细程度
[oracle@westzq3 ~]$ crs_start ora.westzq4.vip
Attempting to start `ora.westzq4.vip` on member `westzq4`
Start of `ora.westzq4.vip` on member `westzq4` succeeded.

--日志:
2009-04-25 16:45:40.473: [  CRSRES][2672622512][ENTER]0createDAG
2009-04-25 16:45:40.473: [  CRSRES][2672622512]0Evaluating: ora.westzq4.vip
2009-04-25 16:45:40.474: [  CRSRES][2672622512][ENTER]0processWork
2009-04-25 16:45:40.474: [  CRSRES][2672622512]0Concurrency is: 1
2009-04-25 16:45:40.474: [  CRSRES][2672622512]0Number of threads spawned: 1
2009-04-25 16:45:40.474: [  CRSRES][2661989296][ENTER]0processlistStub
2009-04-25 16:45:40.474: [  CRSRES][2661989296][ENTER]0StartWork::execute
2009-04-25 16:45:40.474: [  CRSRES][2661989296]0Resource::place invoked for ora.westzq4.vip mode =1
2009-04-25 16:45:40.537: [  CRSRES][2661989296]0initial evalPlace status = 0
2009-04-25 16:45:40.537: [  CRSRES][2661989296]0-------[ Placement List for ora.westzq4.vip ]-------
2009-04-25 16:45:40.537: [  CRSRES][2661989296]0ora.westzq4.vip -> [westzq4]
2009-04-25 16:45:40.537: [  CRSRES][2661989296]0-------[ Placement List ]-------
2009-04-25 16:45:40.537: [  CRSRES][2661989296]0p-list resource ora.westzq4.vip
2009-04-25 16:45:40.538: [  CRSRES][2661989296]0Successors:
2009-04-25 16:45:40.582: [  CRSRES][2661989296]0starting place loop

2009-04-25 16:45:40.583: [  CRSRES][2661989296]0Resource::startResource invoked for ora.westzq4.vip
2009-04-25 16:45:40.596: [  CRSRES][2661989296]0Attempting to start `ora.westzq4.vip` on member `westzq4`
2009-04-25 16:45:53.736: [  CRSRES][2661989296]0Start of `ora.westzq4.vip` on member `westzq4` succeeded.
2009-04-25 16:45:53.738: [  CRSRES][2661989296]0relocatethis status is 0
2009-04-25 16:45:53.738: [  CRSRES][2661989296]0status = RES_SUCCESS or RES_FAILURE
2009-04-25 16:45:53.739: [  CRSRES][2661989296]0break for success
2009-04-25 16:45:53.739: [  CRSRES][2661989296]0restore= 0
2009-04-25 16:45:53.739: [  CRSRES][2661989296]0Adding result for ora.westzq4.vip : 0
2009-04-25 16:45:53.739: [  CRSRES][2672622512][ENTER]0processWork
2009-04-25 16:45:53.739: [  CRSRES][2672622512]0Concurrency is: 0
2009-04-25 16:45:53.739: [  CRSRES][2672622512]0Number of threads spawned: 0
和上面的日志相比,可以看到日志变的很多了

应该注意使用完后关闭debug,没找到这个debug等级如何查询。该DEBUG只对当前CRS有效,重启后恢复到默认
默认DEBUG等级在$ORA_CRS_HOME/srvm/admin/ocrlog.ini 中修改

-----------------------------------------------------------------------------------------------------

追踪基于Java的程序的运行
 默认,DBCA,DBUA的追踪功能是打开的。
 通过设置环境变量 SRVM_TRACE = true 开启CVU,GSDCTL,SRVCTL,VIPCA的追踪功能
 产生的追踪文件在他们本来的日志文件中

-----------------------------------------------------------------------------------------------------

 


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-591788/,如需转载,请注明出处,否则将追究法律责任。

下一篇: BBED学习
请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    966851