1.3 Running Health Checks On Demand

Usually, health checks run at scheduled intervals. However, Oracle recommends that you run health checks on-demand when needed.

Examples of when you must run health checks on-demand:

  • In addition to go-live testing procedures

  • Machine moves from one subnet to another

  • Pre and post- database upgrades

  • Hardware failure or repair

  • Troubleshooting

To start on-demand health check runs, log in to the system as an appropriate user then run an appropriate tool. Specify the options to direct the type of run that you want.
$ ./orachk
$ ./exachk

Note:

To avoid problems when running the tool from terminal sessions on a network attached workstation or laptop, consider running the tool using VNC. If there is a network interruption, then the tool continues to process to completion. If the tool fails to run, then re-run the tool. The tool does not resume from the point of failure.

Output varies depending on your environment and options used:

  • The tool starts discovering your environment

  • If you have configured passwordless SSH user equivalency, then the tool does not prompt you for passwords

  • If you have not configured passwordless SSH for a particular component at the required access level, then the tool prompts you for password

  • If the daemon is running, then the commands are sent to the daemon process that answers all prompts, such as selecting the database and providing passwords

  • If the daemon is not running, then the tool prompts you for required information, such as which database you want to run against, the required passwords, and so on

  • The status of discovered components will be investigated

    Note:

    If you are prompted for passwords, then the utility runs when available. In this way, the passwords are gathered at the beginning, and Expect supplies the passwords when needed at the root password prompts. This enables the tool to continue without the need for further input. If you do not use Expect, then closely monitor the run and enter the passwords interactively as prompted.

    Without Expect installed, you must enter passwords many times depending on the size of your environment. Therefore, Oracle recommends to use the Expect utility.

    See Also:

    The Expect Home Page, which is available at the following URL:

    http://expect.sourceforge.net/

    $ ./exachk -profile dba
    Sending commands to daemon (mypid 57719) args : -profile dba
    
    Checking ssh user equivalency settings on all nodes in cluster
    
    Node srv08 is configured for ssh user equivalency for root user
    Searching for running database . . . . . .
    
    . .
    List of running databases registered on OCR
    1. db07
    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       RDBMS     CRS  ASM  RDBMS  Instance
               Installed Installed UP   UP   UP     Name
    -------------------------------------------------------------------
    srv07      Yes       Yes       Yes  Yes  Yes    db071
    srv08      Yes       Yes       Yes  Yes  Yes    db072
    -------------------------------------------------------------------
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    
  • The tool starts collecting information across all of the relevant components, including the remote nodes.

    . . . .
    *** Checking Best Practice Recommendations (PASS/WARNING/FAIL) ***
    Collections and audit checks log file is
    /opt/oracle.SupportTools/exachk/exachk_srv07_db07_041516_034032/log/exachk.log
    Checking for prompts in /root/.bash_profile on srvr07 for root user....
    Checking for prompts in /root/.bash_profile on srvr08 for root user....
    Starting to run exachk in background on srvr08
    . . 
    =============================================================
                       Node name - srvr07
    =============================================================
    . . . . .
    Collecting - ASM Diskgroup Attributes
    Collecting - ASM initialization parameters
    Collecting - Database Parameters for db07 database
    Collecting - RDBMS Feature Usage for db07 database
    Collecting - Clusterware and RDBMS software version
    Collecting - Patches for Grid Infrastructure
    Collecting - Patches for RDBMS Home
    Collecting - RDBMS patch inventory
    Collecting - Exadata version on database server
    Collecting - Verify TCP Segmentation Offload (TSO) is set to off
    
    Starting to run root privileged commands in background
    on STORAGE SERVER str12 (192.0.125.142)
    
    Starting to run root privileged commands in background 
    on STORAGE SERVER str13 (192.0.125.144)
    
    Starting to run root privileged commands in background 
    on STORAGE SERVER str14 (192.0.125.145)
            
    Collections from STORAGE SERVER :
    ---------------------------------
    . . . .
    
  • The tool run the health checks against the collected data and displays the results.

    . . . .. . . .
    
    Data collections completed. Checking best practices on srv07.
    ----------------------------------------------------------------------------------------
    
    FAIL => DB_UNIQUE_NAME on primary has not been modified from the default,
    confirm that database name is unique across your Oracle enterprise. for db07
    FAIL => Hidden database Initialization Parameter usage is not correct for db07
    WARNING => ASM parameter AUDIT_SYS_OPERATIONS should be set to the recommended value
    WARNING => Database parameter_enable_NUMA_support should be set to recommended value for db07
    INFO => Direct NFS Client is NOT enabled for db07
    INFO => One or more non=default AWR baselines should be created for db07
    WARNING => All disk groups should have compatible.advm attribute set to recommended value
    FAIL => Database parameter DB_BLOCK_CHECKSUM is NOT set to recommended value on db071 instance
    FAIL => Database parameter Db_create_online_log_dest_n is NOT set to recommended value on db071 instance
    WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to recommended value on db071 instance
    FAIL => Flashback on PRIMARY is not configured for db07
    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
    . . . .
    
  • After completing the health check run, the tool points to the location of the detailed HTML report and the .zip  file that contains additional output.

    . . . .
    
    Detailed report (html) -
    /opt/oracle.SupportTools/exachk/exachk_srv07_db07_041516_034032/exachk_srvr07_db07_041516_034032.html
            
    UPLOAD(if required) - /opt/oracle.SupportTools/exachk/exachk_srv07_db07_041516_034032.zip
    

1.3.1 Running On-Demand With or Without the Daemon

When running on-demand, if the daemon is running all prompts, then the daemon answers where possible including passwords .

To run health checks on-demand if the daemon is running, use the –daemon option:
$ ./orachk –daemon
$ ./exachk –daemon
To avoid connecting to the daemon process, meaning the tool to interactively prompt you as required, use the –nodaemon option:
$ ./orachk –nodaemon
$ ./exachk –nodaemon

Note:

If you are running database pre-upgrade checks (-u –o pre) and if the daemon is running, then you must use the –nodaemon option.

1.3.2 Sending Results by Email

You can optionally email the HTML report to one or more recipients using the –sendemail option.

$ ./orachk –sendemail “NOTIFICATION_EMAIL=email_recipients"
$ ./exachk –sendemail “NOTIFICATION_EMAIL=email_recipients"

Where email_recipients is a comma-delimited list of email addresses.

Note:

Verify the email configuration settings using the –testemail option.

Related Topics