ITPub博客

首页 > 数据库 > Oracle > 使用RACCHECK诊断Oracle RAC健康情况

使用RACCHECK诊断Oracle RAC健康情况

Oracle 作者:hpuwyw 时间:2014-10-29 10:03:46 0 删除 编辑

   这篇文章将简单介绍Oracle RACCheck工具。RACCheck最大的特点在于该工具是根据Oracle RAC的最佳实践(参考文章:Note:1526083.1或者Note:810394.1)做相应的检查,并给出相应的建议,确保RAC数据库能够高效、稳定、安全的运行。


    RACCheck检查的软件包括:OS、Clusterware、ASM、RAC,RACCheck工具主要用于:

1).Oracle RAC健康检查。
2).数据库升级前、升级后的检查(目前只能用于11.2.0.3、11.2.0.4和12c的版本升级)。
3).MAA最高可用性检查。
4).补丁升级建议。

    RACCheck不是诊断工具,对于RAC故障RACCheck工具没有任何的帮助。RACCheck也不能用于替代CVU,RACCheck只能运行在RAC环境下,且RAC环境至少有一个节点正常运行Clusterware RACCheck才能使用。CVU工具的作用是检查RAC的安装环境,更多的是帮助我们成功安装Oracle RAC,且CVU是Oracle RAC软件本身自带的工具,RAC安装前即可使用。RACCheck需要MOS帐号进行下载,该工具会随着PSU的更新而更新,所以在使用的时候需要下载该工具的最新版本。

    RACCheck是基于BASH Shell开发的工具,所以它必须运行在BASH Shell的环境下,目前支持的平台包括:
1).Linux x86-64(OEL,RedHat and SuSE 9,10,11)
2).Oracle Solaris(SPARC 10 and x86-64 10,11)
3).IBM AIX(必须安装BASH 3.2或者更高)
4).HP-UX(必须安装BASH 3.2或者更高)

    RACCheck没有针对不同的平台发布不同的工具,只能运行在BASH SHELL的环境下。

    目前支持的数据库版本包括:
1).10gR2
2).11gR1
3).11gR2
4).12cR1

    RACCheck总共有几百项检查,RACCheck能同时检查RAC环境下的多个数据库,RACCheck的输出是非常友好的HTML文件,同时也可以将结果存储在数据库表中。RACCheck工具只需要在RAC的任何一个节点执行,RACCheck会通过用户ssh的等效性检查节点的情况,并将其汇总到报告中,RACCheck是使用oracle用户执行,对于需要root权限检查的项目,RACCheck会通过交互式的方式提示输入root密码。

    Oracle为了帮助我们更好的安装、管理和使用Oracle数据库提供了很多相关的工具,除了这篇文章提到的RACCheck、CVU,还包括:RDA,OSW,CHM,AWR,ASH,ADDM,这些工具的作用各不相同,这里通过引用一些文章来介绍他们的使用。

    可以通过Note: 1268927.1文章下载raccheck工具,下载的raccheck.zip包解压后主要包括3个文件:
>raccheck - bash脚本
>collections.dat -驱动文件
>rules.dat - 驱动文件

    RACCheck的使用非常的简单,不需要安装,解压即可使用,默认情况下不需要跟任何参数即可,-v可以看到raccheck的版本:
[oracle@rhel1 raccheck]$ ./raccheck -v

RACCHECK  VERSION: 2.2.3.2_20131213

-h可以看到相关的参数:
[oracle@rhel1 raccheck]$ ./raccheck -h
Usage : ./raccheck [-abvhpfmsuSo:c:t:] 
        -a      All (Perform best practice check and recommended patch check)
        -b      Best Practice check only. No recommended patch check
        -h      Show usage
        -v      Show version 
        -p      Patch check only
        -m      exclude checks for Maximum Availability Architecture scorecards(see user guide for more details)
        -u      Run raccheck to check pre-upgrade or post-upgrade best practices for 11.2.0.3,11.2.0.4.0 and 12.1.0.1
                -o pre or -o post is mandatory with -u option like ./raccheck -u -o pre
        -f      Run Offline.Checks will be performed on data already collected from the system
        -o      Argument to an option. if -o is followed by v,V,Verbose,VERBOSE or Verbose, it will print checks which passs on the screen
                if -o option is not specified,it will print only failures on screen. for eg: raccheck -a -o v 
......


    下面是在测试环境中运行的一个例子:
[oracle@rhel1 ~]$ ./raccheck
This version of raccheck was released on 13-Dec-2013 and its older than 90 days. It is highly recommended that you download the latest version of raccheck from my oracle support to ensure the highest level of accuracy of the data contained within the report.

Do you want to continue using older version of raccheck? [y/n][y]

CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /u01/app/11.2.0/grid?[y/n][y]

Checking ssh user equivalency settings on all nodes in cluster

Node rhel2 is configured for ssh user equivalency for oracle user
 
Searching for running databases . . . . .

. . 
List of running databases registered in OCR
1. ractest
2. None of above

Select databases from list for checking best practices. For multiple databases, select 1 for All or comma separated number like 1,2 etc [1-2][1].
. . 

Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
-------------------------------------------------------------------------------------------------------
                                                 Oracle Stack Status                            
-------------------------------------------------------------------------------------------------------
Host Name  CRS Installed  ASM HOME       RDBMS Installed  CRS UP    ASM UP    RDBMS UP  DB Instance Name
-------------------------------------------------------------------------------------------------------
rhel1       Yes             Yes             Yes             Yes        Yes      Yes      ractest1  
rhel2       Yes             Yes             Yes             Yes        Yes      Yes      ractest2  
-------------------------------------------------------------------------------------------------------

Copying plug-ins

. . . . . . . . . . . . . . . . . . . . . . 

. . . . . . 

125 of the included audit checks require root privileged data collection . If sudo is not configured or the root password is not available, audit checks which  require root privileged data collection can be skipped.

1. Enter 1 if you will enter root password for each  host when prompted

2. Enter 2 if you have sudo configured for oracle user to execute root_raccheck.sh script 

3. Enter 3 to skip the root privileged collections 

4. Enter 4 to exit and work with the SA to configure sudo  or to arrange for root access and run the tool later.

Please indicate your selection from one of the above options for root access[1-4][1]:- 


*** Checking Best Practice Recommendations (PASS/WARNING/FAIL) ***

Collections and audit checks log file is 
/home/oracle/raccheck_rhel1_ractest_032414_002721/log/raccheck.log

Running raccheck in serial mode because expect(/usr/bin/expect) is not available to supply root passwords on remote nodes

NOTICE:  Installing the expect utility (/usr/bin/expect) will allow raccheck to gather root passwords at the beginning of the process and execute raccheck on all nodes in parallel speeding up the entire process. For more info - http://www.nist.gov/el/msid/expect.cfm.  Expect is available for all major platforms.  See User Guide for more details.


Checking for prompts in /home/oracle/.bash_profile on rhel1 for oracle user...

Checking for prompts in /home/oracle/.bash_profile on rhel2 for oracle user...

=============================================================
                    Node name - rhel1                                
=============================================================

Collecting - ASM DIsk I/O stats 
Collecting - ASM Disk Groups 
Collecting - ASM Diskgroup Attributes 
Collecting - ASM disk partnership imbalance 
Collecting - ASM diskgroup attributes 
Collecting - ASM initialization parameters 
Collecting - Active sessions load balance for ractest database 
Collecting - Archived Destination Status for ractest database 
Collecting - Cluster Interconnect Config for ractest database 
Collecting - Database Archive Destinations for ractest database 
Collecting - Database Files for ractest database 
Collecting - Database Instance Settings for ractest database 
Collecting - Database Parameters for ractest database 
Collecting - Database Properties for ractest database 
Collecting - Database Registry for ractest database 
Collecting - Database Sequences for ractest database 
Collecting - Database Undocumented Parameters for ractest database 
Collecting - Database Workload Services for ractest database 
Collecting - Dataguard Status for ractest database 
Collecting - Files not opened by ASM 
Collecting - Log Sequence Numbers for ractest database 
Collecting - Percentage of asm disk  Imbalance 
Collecting - Process for shipping Redo to standby for ractest database 
Collecting - RDBMS Feature Usage for ractest database 
Collecting - Redo Log information for ractest database 
Collecting - Standby redo log creation status before switchover for ractest database 
Collecting - /proc/cmdline
Collecting - /proc/modules
Collecting - CPU Information
Collecting - CRS active version
Collecting - CRS oifcfg
Collecting - CRS software version
Collecting - CSS Reboot time
Collecting - CSS disktimout
Collecting - Cluster interconnect (clusterware)
Collecting - Clusterware OCR healthcheck 
Collecting - Clusterware Resource Status
Collecting - DiskFree Information
Collecting - DiskMount Information
Collecting - Huge pages configuration
Collecting - Kernel parameters
Collecting - Linux module config.
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - Memory Information
Collecting - NUMA Configuration
Collecting - Network Interface Configuration
Collecting - Network Performance
Collecting - Network Service Switch
Collecting - OS Packages
Collecting - OS version
Collecting - Operating system release information and kernel version
Collecting - Oracle Executable Attributes
Collecting - Patches for Grid Infrastructure 
Collecting - Patches for RDBMS Home 
Collecting - Shared memory segments
Collecting - Table of file system defaults
Collecting - Voting disks (clusterware)
Collecting - number of semaphore operations per semop system call
Collecting - slabinfo
Preparing to run root privileged commands  rhel1.  Please enter root password when prompted.
root@rhel1's password: 
Collecting - ACFS and ASM driver version comparison [ACFS] 
Collecting - Broadcast Requirements for Networks 
Collecting - CRS user time zone check 
Collecting - Custom rc init scripts (rc.local) 
Collecting - Disk Information 
Collecting - Generic ACFS health [ACFS] 
Collecting - Grid Infastructure user shell limits configuration 
Collecting - Health of the mounted ACFS file systems [ACFS] 
Collecting - Health of unmounted ACFS file systems [ACFS] 
Collecting - Interconnect interface config 
Collecting - Network interface stats 
Collecting - Number of RDBMS LMS running in real time 
/dev/mem: mmap: Bad address
/dev/mem: mmap: Bad address
Collecting - OCFS2 disks 
/tmp/root_raccheck.sh: line 69: /sbin/mounted.ocfs2: No such file or directory
Collecting - OLR Integrity 
Collecting - Verify ioctl to advm [ACFS] 
Collecting - Verify no database server kernel out of memory errors  
Collecting - Volume list for unmount ACFS file system [ACFS] 
Collecting - ocsf status 
/tmp/root_raccheck.sh: line 94: /etc/init.d/o2cb: No such file or directory
Collecting - root time zone check 

Data collections completed. Checking best practices on rhel1.
--------------------------------------------------------------------------------------

 WARNING => OCR is NOT being backed up daily
 INFO =>    $CRS_HOME/log/hostname/client directory has too many older log files.
 INFO =>    user_dump_dest has trace files older than 30 days for ractest
 INFO =>    ORA-00600 errors found in alert log for ractest
 INFO =>    ORA-07445 errors found in alert log for ractest
 INFO =>    background_dump_dest has files older than 30 days for ractest
 INFO =>    Some tablespaces do not have allocation type as SYSTEM for ractest
 INFO =>    At some times checkpoints are not being completed for ractest
 WARNING => Open files limit (ulimit -n) for current user is NOT set to recommended value >= 65536 or unlimited
 INFO =>    audit_file_dest has audit files older than 30 days for ractest
 INFO =>    Some data or temp files are not autoextensible for ractest
 WARNING => /tmp is NOT on a dedicated filesystem
 WARNING => Shell limit soft nproc for DB is NOT configured according to recommendation
 INFO =>    Number of SCAN listeners is NOT equal to the recommended number of 3.
 WARNING => OSWatcher is not running as is recommended.
 INFO =>    Jumbo frames (MTU >= 8192) are not configured for interconnect
 FAIL =>    Database parameter DB_BLOCK_CHECKSUM is NOT set to recommended value on ractest1 instance
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on ractest1 instance
 WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value. for ractest
 FAIL =>    Flashback on PRIMARY is not configured for ractest
 INFO =>    Operational Best Practices
 INFO =>    Database Consolidation Best Practices
 INFO =>    Computer failure prevention best practices
 INFO =>    Data corruption prevention best practices
 INFO =>    Logical corruption prevention best practices
 INFO =>    Database/Cluster/Site failure prevention best practices
 INFO =>    Client failover operational best practices
 WARNING => fast_start_mttr_target should be greater than or equal to 300. on ractest1 instance

 INFO =>    IMPORTANT: Oracle Database Patch 13343244,13343424, 13343447,13696242,14192201,14275621,14727315 or 16056267 PSU is NOT applied to RDBMS Home /u01/app/oracle/product/11.2.0/db_1
 INFO =>    Information about hanganalyze and systemstate dump
 WARNING => Number of LMS processes in real time does not recommendation
 FAIL =>    Your Configuration is NOT in Compliance with Oracle Security Alert for CVE-2012-1675 /u01/app/11.2.0/grid
 FAIL =>    Your Configuration is NOT in Compliance with Oracle Security Alert for CVE-2012-1675 /u01/app/oracle/product/11.2.0/db_1
 WARNING => Remote listener is not set to SCAN name for ractest
 WARNING => Network interfaces for cluster_interconnect are NOT on separate subnets
 INFO =>    Database failure prevention best practices
 FAIL =>    Primary database is NOT protected with Data Guard (standby database) for real-time data protection and availability for ractest
 WARNING => avahi-daemon process is running
 WARNING => Redo log write time is more than 500 milliseconds for ractest
 WARNING => ASM memory_target is < recommended value
 INFO =>    One or more disks found which are not part of any disk group
 WARNING => TFA Collector is either not installed or not running
 INFO =>    Parallel Execution Health-Checks and Diagnostics Reports for ractest
 WARNING => vm.min_free_kbytes should be set as recommended.
 WARNING => OS parameter vm.swappiness is NOT set to the recommended value
 WARNING => One or more diskgroups from v$asm_diskgroups are not registered in clusterware registry
 WARNING => Fast Recovery Area (FRA) should have sufficient reclaimable space for ractest
 INFO =>    Oracle recovery manager(rman) best practices
 WARNING => RMAN controlfile autobackup should be set to ON for ractest

Best Practice checking completed.Checking recommended patches on rhel1.
---------------------------------------------------------------------------------

Collecting patch inventory on  CRS HOME /u01/app/11.2.0/grid
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0/db_1 
---------------------------------------------------------------------------------
1 Recommended CRS patches for 112020 from /u01/app/11.2.0/grid on rhel1
---------------------------------------------------------------------------------
Patch#   CRS  ASM    RDBMS RDBMS_HOME                              Patch-Description                            
---------------------------------------------------------------------------------
17272753  no          no  /u01/app/oracle/product/11.2.0/db_1GRID INFRASTRUCTURE PATCH SET UPDATE 11      
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
1 Recommended RDBMS patches for 112020 from /u01/app/oracle/product/11.2.0/db_1 on rhel1
---------------------------------------------------------------------------------
Patch#   RDBMS    ASM     type                Patch-Description                       
---------------------------------------------------------------------------------
17272753  no             merge               GRID INFRASTRUCTURE PATCH SET UPDATE 11.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
              Clusterware patches summary report
---------------------------------------------------------------------------------
Total patches  Applied on CRS Applied on RDBMS Applied on ASM 
---------------------------------------------------------------------------------
1              0              0                0              
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
              RDBMS homes patches summary report
---------------------------------------------------------------------------------
Total patches  Applied on RDBMS Applied on ASM ORACLE_HOME    
---------------------------------------------------------------------------------
 1              0              0                /u01/app/oracle/product/11.2.0/db_1
---------------------------------------------------------------------------------


=============================================================
                    Node name - rhel2                                
=============================================================

Collecting - /proc/cmdline
Collecting - /proc/modules
Collecting - CPU Information
Collecting - CRS active version
Collecting - CRS oifcfg
Collecting - CRS software version
Collecting - Cluster interconnect (clusterware)
Collecting - DiskFree Information
Collecting - DiskMount Information
Collecting - Huge pages configuration
Collecting - Kernel parameters
Collecting - Linux module config.
Collecting - Maximum number of semaphore sets on system
Collecting - Maximum number of semaphores on system
Collecting - Maximum number of semaphores per semaphore set
Collecting - Memory Information
Collecting - NUMA Configuration
Collecting - Network Interface Configuration
Collecting - Network Performance
Collecting - Network Service Switch
Collecting - OS Packages
Collecting - OS version
Collecting - Operating system release information and kernel version
Collecting - Oracle Executable Attributes
Collecting - Patches for Grid Infrastructure 
Collecting - Patches for RDBMS Home 
Collecting - Shared memory segments
Collecting - Table of file system defaults
Collecting - number of semaphore operations per semop system call
Collecting - slabinfo
Preparing to run root privileged commands  rhel2.  Please enter root password when prompted.
root@rhel2's password: 

Data collections completed. Checking best practices on rhel2.
--------------------------------------------------------------------------------------

 INFO =>    $CRS_HOME/log/hostname/client directory has too many older log files.
 INFO =>    user_dump_dest has trace files older than 30 days for ractest
 INFO =>    background_dump_dest has files older than 30 days for ractest
 INFO =>    At some times checkpoints are not being completed for ractest
 WARNING => Open files limit (ulimit -n) for current user is NOT set to recommended value >= 65536 or unlimited
 FAIL =>    Package libgcc-4.1.2-42.el5-x86_64 is recommended but NOT installed
 FAIL =>    Package unixODBC-devel-2.2.11-x86_64 is recommended but NOT installed
 INFO =>    audit_file_dest has audit files older than 30 days for ractest
 WARNING => /tmp is NOT on a dedicated filesystem
 WARNING => Shell limit soft nproc for DB is NOT configured according to recommendation
 INFO =>    Number of SCAN listeners is NOT equal to the recommended number of 3.
 WARNING => OSWatcher is not running as is recommended.
 INFO =>    Jumbo frames (MTU >= 8192) are not configured for interconnect
 FAIL =>    Database parameter DB_BLOCK_CHECKSUM is NOT set to recommended value on ractest2 instance
 FAIL =>    Database parameter DB_LOST_WRITE_PROTECT is NOT set to recommended value on ractest2 instance
 WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value. for ractest
 WARNING => fast_start_mttr_target should be greater than or equal to 300. on ractest2 instance

 INFO =>    IMPORTANT: Oracle Database Patch 13343244,13343424, 13343447,13696242,14192201,14275621,14727315 or 16056267 PSU is NOT applied to RDBMS Home /u01/app/oracle/product/11.2.0/db_1
 FAIL =>    Your Configuration is NOT in Compliance with Oracle Security Alert for CVE-2012-1675 /u01/app/11.2.0/grid
 FAIL =>    Your Configuration is NOT in Compliance with Oracle Security Alert for CVE-2012-1675 /u01/app/oracle/product/11.2.0/db_1
 WARNING => Remote listener is not set to SCAN name for ractest
 WARNING => Network interfaces for cluster_interconnect are NOT on separate subnets
 WARNING => avahi-daemon process is running
 WARNING => Redo log write time is more than 500 milliseconds for ractest
 WARNING => ASM memory_target is < recommended value
 INFO =>    One or more disks found which are not part of any disk group
 WARNING => TFA Collector is either not installed or not running
 WARNING => vm.min_free_kbytes should be set as recommended.
 WARNING => OS parameter vm.swappiness is NOT set to the recommended value
 WARNING => One or more diskgroups from v$asm_diskgroups are not registered in clusterware registry

Best Practice checking completed.Checking recommended patches on rhel2.
---------------------------------------------------------------------------------

Collecting patch inventory on  CRS HOME /u01/app/11.2.0/grid 
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/11.2.0/db_1 
---------------------------------------------------------------------------------
1 Recommended CRS patches for 112020 from /u01/app/11.2.0/grid on rhel2
---------------------------------------------------------------------------------
Patch#   CRS  ASM    RDBMS RDBMS_HOME                              Patch-Description                            
---------------------------------------------------------------------------------
17272753  no          no  /u01/app/oracle/product/11.2.0/db_1GRID INFRASTRUCTURE PATCH SET UPDATE 11      
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
1 Recommended RDBMS patches for 112020 from /u01/app/oracle/product/11.2.0/db_1 on rhel2
---------------------------------------------------------------------------------
Patch#   RDBMS    ASM     type                Patch-Description                       
---------------------------------------------------------------------------------
17272753  no             merge               GRID INFRASTRUCTURE PATCH SET UPDATE 11.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
              Clusterware patches summary report
---------------------------------------------------------------------------------
Total patches  Applied on CRS Applied on RDBMS Applied on ASM 
---------------------------------------------------------------------------------
1              0              0                0              
---------------------------------------------------------------------------------

---------------------------------------------------------------------------------
              RDBMS homes patches summary report
---------------------------------------------------------------------------------
Total patches  Applied on RDBMS Applied on ASM ORACLE_HOME    
---------------------------------------------------------------------------------
 1              0              0                /u01/app/oracle/product/11.2.0/db_1
---------------------------------------------------------------------------------


---------------------------------------------------------------------------------
                      CLUSTERWIDE CHECKS
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
 
Detailed report (html) - /home/oracle/raccheck_rhel1_ractest_032414_002721/raccheck_rhel1_ractest_032414_002721.html


UPLOAD(if required) - /home/oracle/raccheck_rhel1_ractest_032414_002721.zip


RACCheck工具的大小只有4MB左右,报告的大小在5MB左右,压缩文件只有几百KB。

根据提示查看/home/oracle/raccheck_rhel1_ractest_032414_002721/raccheck_rhel1_ractest_032414_002721.html报告获取详细信息:


--end--

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

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-04-11

  • 博文量
    3
  • 访问量
    9308