1.8 Oracle ORAchk and Oracle EXAchk Command Line Options

Most command line options apply to both Oracle ORAchk and Oracle EXAchk.

$ ./orachk options
$ ./exachk options

1.8.1 Running Generic Oracle ORAchk and Oracle EXAchk Commands

List of command options common to Oracle ORAchk and Oracle EXAchk.


Table 1-8 Generic Commands

Option Description

-a

Performs all checks, including best practice checks and recommended patch check. This is the default option, if no options are specified.

-v

Shows version.

-debug

Runs in debug mode. The generated .zip file contains a debug log and further files useful for Oracle Support.

-daemon

Runs only if the daemon is running.

-nodaemon

Does not send commands to the daemon, usage is interactive.

-f

Runs Offline. Checks are performed on data already collected from the system.

-upgrade

Forces an upgrade of the version of being run.

-noupgrade

Does not prompt for an upgrade even if a later version is available under the location specified by RAT_UPGRADE_LOC.

-testemail all | "NOTIFICATION_EMAIL=email addresses separated by comma"

Sends a test email to validate email configuration. Use –testemail all to validate daemon email configuration.

-sendemail “NOTIFICATION_EMAIL=email_address"

Emails the generated HTML report on completion. The email_address is a comma-delimited list of email addresses used for sending HTML report.

-dbserial

Runs SQL, SQL_COLLECT, and OS Checks in serial.

-dbparallel [n]

Runs SQL, SQL_COLLECT, and OS Checks in parallel, using n number of Child processes. Default is 25% of CPUs.

-dbparallelmax

Runs SQL, SQL_COLLECT, and OS Checks in parallel, using the maximum number of child processes.


1.8.2 Controlling the Scope of Checks

List of commands to control the scope of checks.


Table 1-9 Scope of Checks

Command Description

-b

Runs only the best practice checks. Does not run recommended patch checks.

-p

Runs only the patch checks.

-m

Excludes checks for Maximum Availability Architecture (MAA) scorecards.

-u –o pre

Runs pre-upgrade checks for Clusterware and Database.

-u –o post

Runs post-upgrade checks for Clusterware and Database.

-clusternodes nodes

Pass comma-delimited node names to run only on the subset of nodes.

-dbnames db_names

Passes comma-delimited database names to run only on the subset of databases.

-dbnone

Does not prompt database selection, and skips all the database related checks.

-dball

Does not prompt database selection, and runs the database related checks on all databases discovered on system.

-localonly

Runs only on the local node.

-cells cells

Passes comma-delimited storage server names to run only on the selected storage servers.

-ibswitches switches

Passes comma-delimited InfiniBand switch names to run only on the selected InfiniBand switches.

-profile profile

Runs only the checks in specified profiles, profile is comma-delimited list of profiles.

-excludeprofile profile

Excludes checks in the specified profiles, profile is comma-delimited list of profiles

-check check_id

Runs only the checks specified, check_id is comma-delimited list

-excludecheck check_id

Does not run the checks specified, check_id is comma-delimited list

-skip_usr_def_checks

Does not run the checks present in user defined xml file.


1.8.3 Managing the Report Output

Use the commands explained in this section to manage report output.


Table 1-10 Managing Output

Option Description

-syslog

Write JSON results to syslog.

-tag tagname

Append tagname to output report name. The tagname must contain only alphanumeric characters.

-o

Argument to an option. If -o is followed by v, (or verbose, and neither option is case sensitive), then it prints checks that pass on the screen. If the -o option is not specified, then it prints only the failures on the screen.

-nopass

Do not show passed checks in generated output.

-noscore

Do not print health score in HTML report.

-diff old_report new_report [-outfile output_HTML]

Report the difference between two HTML reports. Pass a directory name or a ZIP file or an HTML report file as old_report and new_report.

-merge [-force] collections

Comma-delimited collection names to merge collections and prepare single report.


1.8.4 Uploading Results to Database

List of commands to upload results to database.


Table 1-11 Uploading Results to Database

Option Description

-setdbupload all|variable_names

Sets the values in the wallet to upload health check run results to the database.

all: Sets all the variables in the wallet.

variable_names are comma-delimited list of variables to set.

-unsetdbupload all|variable_names

Unsets the values in the wallet to upload health check run results to the database.

all: Unsets all the variables in the wallet.

variable_names are comma-delimited list of variables to unset.

-checkdbupload

Checks the status if variables are set correctly for uploading health check run results to the database.

-getdbupload

Prints the variables with their values from wallet for uploading health check run result to the database.

-checkfaileduploads

Reports any failed collection uploads.

-uploadfailed all|list of failed collections

Reattempts upload of one or more failed collection uploads, specifying either all to upload all or a comma-delimited list of collections.


1.8.5 Controlling the Behavior of the Daemon

List of commands you can use to control the behavior of the daemon.


Table 1-12 Daemon Options

Option Description

[-id id] –set daemon_option

Optionally use id with the set command to set specific daemon usage profiles.

[-id id] -unset daemon_option | all

Unsets the parameter. Use with –id id to set a daemon profile-specific value.

[-id id] -get parameter | all

Displays the value of the specified parameter or all of the parameters. Use with –id id to set a daemon profile-specific value.

-d start

Starts the daemon.

-d start_debug

Starts the daemon in debug mode.

-d stop

Stops the daemon.

-d stop_client

Forces a running daemon client to stop.

-d status

Checks the current status of the daemon.

-d info

Displays details about the daemon, installation and when started.

[-id id] -d nextautorun

Displays details about when the next scheduled auto run will occur. Use with –id id to specify the next auto run be daemon profile-specific.

-initsetup

Sets the daemon auto restart function that starts the daemon when the node starts.

-initrmsetup

Removes auto restart functionality.

-initcheck

Checks if auto restart functionality is set up.

-initpresetup

Sets root user equivalency for COMPUTE, STORAGE, and IBSWITCHES (root equivalency for COMPUTE nodes is mandatory for setting up auto restart functionality).


1.8.6 Tracking File Attribute Differences

List of commands to find file attribute differences.


Table 1-13 File Attribute Differences

Option Description

-fileattr start

Takes file attributes snapshot of discovered directories and stores the snapshot in the output directory. By default, it takes snapshot of Oracle Grid Infrastructure Home and all the installed database homes. If the user doesn't own a particular directory then it does not take snapshot of the directory

-fileattr check

Takes a recent snapshot of discovered directories and compares with the previous snapshot

-fileattr remove

Removes file attribute snapshots and related files.

-fileattr [start|check] -includedir directories

Includes directories given by user at command-line to check file attributes.

For example:
./orachk -fileattr start -includedir "/root/home,/etc"
./orachk -fileattr check -includedir "/root/home,/etc"

-fileattr [start|check] -excludediscovery

Excludes the discovered directories.

./orachk -fileattr start -includedir "/root/home,/etc" -excludediscovery

-fileattr check -baseline baseline snapshot path

For example:

./orachk -fileattr check -baseline "/tmp/Snapshot"

-fileattr -check -fileattronly

Performs file attributes check and exits ORAchk.

./orachk -fileattr check -fileattronly