ORACLE RAC中的日志文件较多,主要根据资源,进程划分,具体日志路径结构如下
linux系统的应用日志
/tmp/crsctl.5129
CRS日志
$ORA_CRS_HOME/log/主机名/alert主机名.log
ASM日志
/u01/app/oracle/admin/+ASM/bdump/alert_+ASM1.log
数据库日志
/u01/app/oracle/admin/RACDB/bdump/alert_RACDB1.log
cluster主要进程日志
/u01/app/oracle/crs/log/oms/crsd/crsd.log
/u01/app/oracle/crs/log/oms/cssd/ocssd.log
/u01/app/oracle/crs/log/oms/evmd/evmd.log
遇到问题应根据问题所处位置查看相应日志文件,进而判断具体问题。
例如 在启动RAC系统资源时报如下错误
[root@oms bin]# ./srvctl start nodeapps -n oms
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
通过crsctl检查crs健康状态
[root@oms bin]# ./crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM
发现crs相关资源根本未启动,无法连接,这时无论从CRS日志,ASM日志还是cluster主要进程日志中是无法获取相应日志的,因为crs根本没有启动,相应日志也就不会产生,因此最先查看的日志应该是系统日志
[root@oms bin]# tail -f /tmp/crsctl.5129
Failed 3 to bind listening endpoint: (ADDRESS=(PROTOCOL=tcp)(HOST=oms-priv))
从系统日志中得知hosts文件中主机名被更改,更正hosts文件后,重启network服务
[root@oms bin]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
[root@oms bin]# ./crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
crs已启动
本文转自ICT时空dbasdk的博客,原文链接:ORACLE RAC 日志结构解析 ,如需转载请自行联系原博主。