Oracle RAC is a complex task with many processes and components. Each process writes its own log file.
There are some switches for these log files to control the details of the written information. These switches are not provided in the Oracle document CD. There are roughly three ways to modify these switches:
1. modify the configuration file
2. Modify Environment Variables
3. Set the debug level for each component.
The following describes each and third methods. The attachment script automates the third method. You only need to use the following methods to modify the debug switch:
Perl crs_debug_level.pl level = 1
To Disable debug mode, set level to 0:
Perl crs_debug_level.pl level = 0
We recommend that you set the level to 1 and the maximum value to 5, but the setting is too high and there is too much output information, which is basically hard to understand, only the ORACLE department dedicated for R & D and testing can understand.
Therefore, when diagnosing RAC problems, we recommend that you use the attachment tool to set the debug level of the log file. In this way, we can see more detailed logs, which is more conducive to quick problem locating.
The methods are described as follows:
Method 1: modify the configuration file
1. vi $ CRS_HOME/bin/racgvip
Set
# _ USR_ORA_DEBUG = 1
Change
_ USR_ORA_DEBUG = 1
2. vi $ CRS_HOME/bin/racgwrap
Set
# _ USR_ORA_DEBUG = 1 & export _ USR_ORA_DEBUG
Change
_ USR_ORA_DEBUG = 1 & export _ USR_ORA_DEBUG
3. Modify $ ORACLE _ HOME/bin/racgwrap
Set
# _ USR_ORA_DEBUG = 1 & export _ USR_ORA_DEBUG
Change
_ USR_ORA_DEBUG = 1 & export _ USR_ORA_DEBUG
Method 3: Set the debug level for each component
1. crsctl lsmodules css
CSSD
COMMCRS
COMMNS
2. crsctl lsmodules crs
CRSUI
CRSCOMM
Crsrrti
CRSMAIN
CRSPLACE
CRSAPP
CRSRES
CRSOCR
CRSTIMER
CRSEVT
CRSD
CLUCLS
CSSCLNT
COMMCRS
COMMNS
3. crsctl lsmodules evm
EVMD
EVMDMAIN
EVMDCOMM
EVMEVT
EVMAPP
EVMAGENT
CRSOCR
CLUCLS
CSSCLNT
COMMCRS
COMMNS
4. Run the following commands for the preceding output:
Crsctl debug log <component> <module >:< level >{, <module >:< level>]
For example, crsctl debug log crs "CRSCOMM: 2"
Because the above operations can follow the rules, you can easily complete this task by using the attachment script.