集群相关日志主要放在$GRID_HOME/log和$ORACLE_HOME/log中。
注意这里所说的$GRID_HOME(好多时候起名时$ORACLE_HOME)是指集群软件安装的目录,具体看你的grid的环境变量配置(su - grid 然后cat .bash_profile查看).这里的$ORACLE_HOME说的是oracle软件安装的目录,具体看你的oracle用户的环境变量(su - oracle 然后cat .bash_profile查看)
$GRID_HOME/log目录下内容如下
[root@ora101 bin]# su - grid
[grid@ora101 ~]$ cd $ORACLE_HOME
[grid@ora101 grid]$ cd log/
[grid@ora101 log]$ ls
crs diag ora101
$ORACLE_HOME/log内容如下
[root@ora102 bin]# su - oracle
[oracle@ora102 ~]$ cd $ORACLE_HOME
[oracle@ora102 dbhome_1]$ cd log/
[oracle@ora102 log]$ ls
diag ora101 ora102
具体日志与目录的对应说明:
1)CRS日志存放在$GRID_HOME/log/HOSTNAME/crsd下
[grid@ora102 grid]$ cd $ORACLE_HOME/log/ora102/crsd
[grid@ora102 crsd]$ tail -n 10 crsd.log
2017-11-30 15:08:41.814: [UiServer][1900590848]{2:25778:543} Done for ctx=0x7fa30400c970
2017-11-30 15:09:41.812: [UiServer][1898489600] CS(0x7fa308009c40)set Properties ( grid,0x7fa33c0dc150)
2017-11-30 15:09:41.823: [UiServer][1900590848]{2:25778:544} Sending message to PE. ctx= 0x7fa30400cdf0, Client PID: 15860
2017-11-30 15:09:41.828: [UiServer][1900590848]{2:25778:544} Done for ctx=0x7fa30400cdf0
2017-11-30 15:10:41.817: [UiServer][1898489600] CS(0x7fa308009c40)set Properties ( grid,0x7fa33c0dc150)
2017-11-30 15:10:41.827: [UiServer][1900590848]{2:25778:545} Sending message to PE. ctx= 0x7fa304007af0, Client PID: 15860
2017-11-30 15:10:41.833: [UiServer][1900590848]{2:25778:545} Done for ctx=0x7fa304007af0
2017-11-30 15:11:41.812: [UiServer][1898489600] CS(0x7fa308009c40)set Properties ( grid,0x7fa33c0dc150)
2017-11-30 15:11:41.822: [UiServer][1900590848]{2:25778:546} Sending message to PE. ctx= 0x7fa3040093e0, Client PID: 15860
2017-11-30 15:11:41.828: [UiServer][1900590848]{2:25778:546} Done for ctx=0x7fa3040093e0
2)CSS日志存放在“$GRID_HOME/log/HOSTNAME/crsd”目录
[grid@ora102 cssd]$ pwd
/u01/app/11.2.0/grid/log/ora102/cssd
[grid@ora102 cssd]$ tail -n 10 ocssd.log
2017-11-30 15:16:43.636: [ CSSD][370063104]clssnmSendingThread: sending status msg to all nodes
2017-11-30 15:16:43.636: [ CSSD][370063104]clssnmSendingThread: sent 5 status msgs to all nodes
2017-11-30 15:16:48.637: [ CSSD][370063104]clssnmSendingThread: sending status msg to all nodes
2017-11-30 15:16:48.637: [ CSSD][370063104]clssnmSendingThread: sent 5 status msgs to all nodes
2017-11-30 15:16:53.639: [ CSSD][370063104]clssnmSendingThread: sending status msg to all nodes
2017-11-30 15:16:53.639: [ CSSD][370063104]clssnmSendingThread: sent 5 status msgs to all nodes
2017-11-30 15:16:57.640: [ CSSD][370063104]clssnmSendingThread: sending status msg to all nodes
2017-11-30 15:16:57.640: [ CSSD][370063104]clssnmSendingThread: sent 4 status msgs to all nodes
2017-11-30 15:17:02.641: [ CSSD][370063104]clssnmSendingThread: sending status msg to all nodes
2017-11-30 15:17:02.641: [ CSSD][370063104]clssnmSendingThread: sent 5 status msgs to all nodes
3)EVM日志存放在“$GRID_HOME/log/HOSTNAME/crsd”目录
[grid@ora102 evmd]$ pwd
/u01/app/11.2.0/grid/log/ora102/evmd
[grid@ora102 evmd]$ tail -n 10 evmd.log
2017-11-30 09:20:01.300: [GIPCHGEN][3279111936]gipchaResolveF [gipcmodGipcResolve : gipcmodGipc.c : 806]: EXCEPTION[ ret gipcretKeyNotFound (36) ] failed to resolve ctx 0x1d7c3f0 [0000000000000010] { gipchaContext : host 'ora102', name '2533-5b5b-d375-7024', luid '7d1a6e2e-00000000', numNode 1, numInf 1, usrFlags 0x0, flags 0x5 }, host 'ora102', port '4fff-ca7a-f20c-f19a', flags 0x0
2017-11-30 09:20:01.300: [ CRSCCL][3272427264]clsCclNewConn: added new conn to tempConList: newPeerCon = a8007ba0
2017-11-30 09:20:01.300: [ CRSCCL][3272427264]PNC: Disconnecting our connection to node (1,41032034)
2017-11-30 09:20:01.300: [ CRSCCL][3272427264]PNC: Accept connection from peer (1,41032034)
2017-11-30 09:20:01.300: [GIPCHAUP][3279111936]gipchaUpperDisconnect: initiated discconnect umsg 0x7f73ac00b330 { msg 0x7f73ac00c838, ret gipcretRequestPending (15), flags 0x2 }, msg 0x7f73ac00c838 { type gipchaMsgTypeDisconnect (5), srcCid 00000000-0000062b, dstCid 00000000-00000581 }, endp 0x7f739c00a5f0 [000000000000062b] { gipchaEndpoint : port '911d-a70c-59c0-6f2f', peer 'ora101:EVMDMAIN2_1/232c-8a2c-944a-d9a9', srcCid 00000000-0000062b, dstCid 00000000-00000581, numSend 0, maxSend 100, groupListType 2, hagroup 0x1d0ff90, usrFlags 0x4000, flags 0x21c }
2017-11-30 09:20:01.301: [GIPCXCPT][3279111936]gipchaUpperProcessDisconnect: dropping Disconnect to unknown msg 0x7f73ac0224e8 { type gipchaMsgTypeDisconnect (5), srcCid 00000000-00000581, dstCid 00000000-0000062b }, node 0x7f73ac00bab0 { host 'ora101', haName 'a4a1-648b-c968-fa57', srcLuid 7d1a6e2e-3f7ff384, dstLuid 5549d389-6bbf9712 numInf 1, contigSeq 7, lastAck 5, lastValidAck 7, sendSeq [6 : 7], createTime 41098124, sentRegister 1, localMonitor 0, flags 0x208 }, ret gipcretFail (1)
2017-11-30 09:20:01.301: [GIPCHAUP][3279111936]gipchaUpperProcessDisconnect: EXCEPTION[ ret gipcretFail (1) ] error during DISCONNECT processing for node 0x7f73ac00bab0 { host 'ora101', haName 'a4a1-648b-c968-fa57', srcLuid 7d1a6e2e-3f7ff384, dstLuid 5549d389-6bbf9712 numInf 1, contigSeq 7, lastAck 5, lastValidAck 7, sendSeq [6 : 7], createTime 41098124, sentRegister 1, localMonitor 0, flags 0x208 }
2017-11-30 09:20:01.301: [GIPCHAUP][3279111936]gipchaUpperCallbackDisconnect: completed DISCONNECT ret gipcretSuccess (0), umsg 0x7f73ac00b330 { msg 0x7f73ac00c838, ret gipcretSuccess (0), flags 0x2 }, msg 0x7f73ac00c838 { type gipchaMsgTypeDisconnect (5), srcCid 00000000-0000062b, dstCid 00000000-00000581 }, hendp 0x7f739c00a5f0 [000000000000062b] { gipchaEndpoint : port '911d-a70c-59c0-6f2f', peer 'ora101:EVMDMAIN2_1/232c-8a2c-944a-d9a9', srcCid 00000000-0000062b, dstCid 00000000-00000581, numSend 0, maxSend 100, groupListType 2, hagroup 0x1d0ff90, usrFlags 0x4000, flags 0x21c }
2017-11-30 09:20:01.316: [ EVMD][3596752704] Authorization database built successfully.
2017-11-30 09:20:01.427: [ CLSE][3596752704]clse_get_auth_loc: Returning default authloc: /u01/app/11.2.0/grid/auth/evm/ora102
4)$GRID_HOME/log/和$ORACLE_HOME/log/目录中的racg目录中记录了RACG可执行文件对应的日志
[grid@ora102 racg]$ pwd
/u01/app/11.2.0/grid/log/ora102/racg
[grid@ora102 racg]$ ll
total 4
-rw-rw-r-- 1 grid oinstall 754 Nov 30 09:16 evtf.log
drwxrwxrwt 2 grid oinstall 6 Aug 10 18:37 racgeut
drwxrwxrwt 2 grid oinstall 6 Aug 10 18:37 racgevtf
drwxrwxrwt 2 grid oinstall 6 Aug 10 18:37 racgmain
5)$GRID_HOME/log/和$ORACLE_HOME/log/目录记录了与srvctl、ocrdump、ocrconfig以及ocrcheck命令对应的日志 信息。
[grid@ora102 client]$ pwd
/u01/app/11.2.0/grid/log/ora102/client
[grid@ora102 client]$ ll
total 400
-rw-r--r-- 1 grid oinstall 1150 Nov 30 09:19 crsctl_grid.log
-rw-r--r-- 1 root root 23067 Nov 30 09:36 crsctl_root.log
-rw-r--r-- 1 root root 243 Nov 30 09:18 crswrapexece.log
-rw-r--r-- 1 root root 279 Aug 10 18:51 css.log
-rw-r--r-- 1 grid oinstall 495 Nov 29 21:46 ocrcheck_6773.log
-rw-r----- 1 root root 2228 Aug 10 18:39 ocrconfig_22491.log
-rw-rw-rw- 1 grid oinstall 3981 Aug 11 15:20 oifcfg.log
-rw-rw-rw- 1 grid oinstall 126999 Nov 30 15:36 olsnodes.log
[oracle@ora102 client]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/log/ora102/client
由于没有执行过ocrdump,所以没有相关日志,
[oracle@ora102 client]$ ll
total 0
执行ocrdump之后,会在相应目录下产生相应日志
[grid@ora102 client]$ pwd
/u01/app/11.2.0/grid/log/ora102/client
[grid@ora102 client]$ ll ocrdump*
-rw-r--r-- 1 grid oinstall 2473 Nov 30 16:01 ocrdump_783.log
6)集群中ALERT文件的位置$GRID_HOME/log/下
[grid@ora102 ora102]$ pwd
/u01/app/11.2.0/grid/log/ora102
[grid@ora102 ora102]$ tail -n 10 alertora102.log
2017-11-30 09:34:19.907:
[ohasd(12860)]CRS-2765:Resource 'ora.crsd' has failed on server 'ora102'.
2017-11-30 09:34:19.908:
[ohasd(12860)]CRS-2771:Maximum restart attempts reached for resource 'ora.crsd'; will not restart.
2017-11-30 09:34:19.908:
[ohasd(12860)]CRS-2769:Unable to failover resource 'ora.crsd'.
2017-11-30 09:36:39.500:
[crsd(15778)]CRS-1012:The OCR service started on node ora102.
2017-11-30 09:36:39.832:
[crsd(15778)]CRS-1201:CRSD started on node ora102.
注意集群的altert区别去asm实例的告警日志。后者在
$ORACLE_BASE/diag/asm/+asm/+ASM2/trace路径下。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29654823/viewspace-2148073/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29654823/viewspace-2148073/