【Oracle script】CRS 10gR2/11gR1/11gR2 Diagnostic Collection Script

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:529

From the $ORA_CRS_HOME, run the following commands as root user:
[font=NSimsun]# script. /tmp/diag.log
# id
# env
# cd

For 10gR2:
# export ORA_CRS_HOME=
# export ORACLE_BASE=
# export HOSTNAME=
# $ORA_CRS_HOME/bin/diagcollection.pl -collect

For 11gR1:
# export ORA_CRS_HOME=<$ORA_CRS_HOME>
# $ORA_CRS_HOME/bin/diagcollection.pl -crshome=$ORA_CRS_HOME --collect

For 11gR2:
# $GRID_HOME/bin/diagcollection.sh

# exit
Above commands will collect all logs under CRS or GRID HOME. The following .gz files will be generated in the current directory:
crsData_.tar.gz,
ocrData_.tar.gz,
oraData_.tar.gz,
coreData_.tar.gz (only --core option specified)
os_.tar.gz (only for 11.2+)
Please upload them.

o From 11gR2 onwards, new features available for diagcollection.sh. If only a subset of logs to be collected, --adr together with --beforetime and --aftertime can be used.

For example:
[font=NSimsun]# mkdir /tmp/collect
# $GRID_HOME/bin/diagcollection.sh --adr /tmp/collect -beforetime 20120218100000 -aftertime 20120218050000

This command will copy all logs contain timestamp 2012-02-18 05:00 - 10:00 to /tmp/collect directory. Time is specified with YYYYMMDDHHMISS24 format. --adr points to a directory where the logs are copied to.

o From 11.2.0.2 onwards, cluster health monitor(CHM/OS) data is also generated automatically, to collect CHM/OS data:

[font=NSimsun]$ $GRID_HOME/bin/diagcollection.sh --chmos --incidenttime 02/18/201205:00:00 --incidentduration 05:00

This command will collect data from 2012-02-18 05:00 to 10:00 for 5 hours.
incidenttime is specified as MM/DD/YYYY24HH:MM:SS, incidentduration is specified as HH:MM.

详见metalink :ID 330358.

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】