1.8 Oracle ORAchk and Oracle EXAchk Command-Line Options

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

$ ./orachk options

[-h] [-a] [-b] [-v] [-p] [-m] [-u] [-f] [-o] 
[-clusternodes clusternames] 
[-failedchecks previous_result]
[-nordbms]
[-output path] 
[-dbnames dbnames] 
[-localonly] 
[-debug] 
[-dbnone | -dball] 
[-c] 
[-upgrade | -noupgrade] 
[-syslog] 
[-skip_usr_def_checks] 
[-checkfaileduploads] 
[-uploadfailed all | comma-delimited list of collections]
[-fileattr [start | check | remove ] [-includedir path ] [-excludediscovery] [-baseline path [-fileattronly]
[-testemail all | "NOTIFICATION_EMAIL=comma-delimited list of email addresses"]
[-setdbupload all | db upload variable, for example, RAT_UPLOAD_CONNECT_STRING, RAT_UPLOAD_PASSWORD]
[-unsetdbupload all | db upload variable, for example, RAT_UPLOAD_CONNECT_STRING, RAT_UPLOAD_PASSWORD]
[-checkdbupload]
[-getdbupload]
[-cmupgrade] 
[-sendemail "NOTIFICATION_EMAIL=comma-delimited list of email addresses"]
[-nopass] 
[-noscore] 
[-showpass] 
[-show_critical] 
[-diff Old Report New Report [-outfile Output HTML] [-force]] 
[-merge report 1 report 2 [-force]] 
[-tag tagname]
[-nodaemon] 
[-profile asm | clusterware | corroborate | dba | ebs | emagent | emoms | em | goldengate | hardware | maa | oam | oim | oud | ovn | peoplesoft | preinstall | prepatch | security | siebel | solaris_cluster | storage | switch | sysadmin | timesten | user_defined_checks |  zfs ]
[-excludeprofile asm | clusterware | corroborate | dba | ebs | emagent | emoms | em | goldengate | hardware | maa | oam | oim | oud | ovn | peoplesoft | preinstall | prepatch | security | siebel | solaris_cluster | storage | switch | sysadmin | timesten | user_defined_checks | zfs ]
[-acchk -javahome path to jdk8 
-asmhome path to asm-all-5.0.3.jar -appjar directory where jar files are present for concrete class -apptrc directory where trace files are present for coverage class]
[-check check ids | -excludecheck check ids]
[-zfsnodes nodes]
[-zfssa appliance names]
[-dbserial | -dbparallel [n] | -dbparallelmax]
[-idmpreinstall | -idmpostinstall | -idmruntime] [-topology topology.xml |
-credconfig credconfig] | -idmdbpreinstall | -idmdbpostinstall | -idmdbruntime] 
[-idm_config IDMCONFIG] [-idmdiscargs IDMDISCARGS] 
[-idmhcargs IDMHCARGS | -h]
$ ./exachk options

[-h] [-a] [-b] [-v] [-p] [-m] [-u] [-f] [-o] 
[-clusternodes clusternames] 
[-failedchecks previous_result]
[-nordbms]
[-output path] 
[-dbnames dbnames] 
[-localonly] 
[-debug] 
[-dbnone | -dball] 
[-c] 
[-upgrade | -noupgrade] 
[-syslog] [-skip_usr_def_checks] 
[-checkfaileduploads] 
[-uploadfailed all | comma-delimited list of collections] 
[-fileattr start | check | remove [-includedir path [-excludediscovery] [-baseline path[-fileattronly]
[-testemail all | "NOTIFICATION_EMAIL=comma-delimited list of email addresses"]
[-setdbupload all | db upload variable, for example, RAT_UPLOAD_CONNECT_STRING, RAT_UPLOAD_PASSWORD] 
[-unsetdbupload all | db upload variable, for example, RAT_UPLOAD_CONNECT_STRING, RAT_UPLOAD_PASSWORD] 
[-checkdbupload]
[-getdbupload]
[-cmupgrade] [-sendemail "NOTIFICATION_EMAIL=comma-delimited list of email addresses"]
[-nopass] 
[-noscore] 
[-showpass] 
[-show_critical] 
[-diff Old Report New Report [-outfile Output HTML] [-force]] 
[-merge report 1 report 2 [-force]] 
[-tag tagname]
[-auto_restart -initsetup | -initdebugsetup | -initrmsetup | -initcheck | -h]
[-d start|start -debug|stop|status|info|stop_client|nextautorun|-h]
[-nodaemon]
[-unlockcells all | -cells comma-delimited list of names or IPs of cells] [-lockcells all | -cells comma-delimited list of names or IPs of cells]
[-usecompute]
[-exadiff Exalogic collection1 Exalogic collection2]
[-vmguest ]
[-hybrid [-phy nodes]]
[-profile asm | bi_middleware | clusterware | compute_node | exatier1 | control_VM | corroborate | dba | ebs | el_extensive | el_lite | el_rackcompare | emagent | emoms | em | goldengate | hardware | maa | nimbula | obiee | ovn | peoplesoft | platinum | preinstall | prepatch | security | siebel | solaris_cluster | storage | switch | sysadmin | timesten | user_defined_checks | virtual_infra]
[-excludeprofile asm | bi_middleware | clusterware | compute_node | exatier1 | control_VM | corroborate | dba | ebs | el_extensive | el_lite | el_rackcompare | emagent | emoms | em | goldengate | hardware | maa | nimbula | obiee | ovn | peoplesoft | platinum | preinstall | prepatch | security | siebel | solaris_cluster | storage | switch | sysadmin | timesten | user_defined_checks | virtual_infra]
[-check check ids | -excludecheck check ids]
[-cells cells]
[-ibswitches switches]
[-torswitches]
[-extzfsnodes nodes]
[-dbserial | -dbparallel [n] | -dbparallelmax | -allserial]
[-allserial | -dbnodeserial |-cellserial | -switchserial]

1.8.1 Running Generic Oracle ORAchk and Oracle EXAchk Commands

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

Syntax

[-a] 
[-v] 
[-debug] 
[-nodaemon] 
[-f] 
[-upgrade] 
[-noupgrade] 
[-testemail all | "NOTIFICATION_EMAIL=comma-delimited list of email addresses"] 
[-sendemail “NOTIFICATION_EMAIL=comma-delimited list of email addresses"] 
[-dbserial] 
[-dbparallel [n]] 
[-dbparallelmax]

Parameters

Table 1-7 Generic Commands

Option Description

-a

Runs all checks, including the best practice checks and the recommended patch check. If you do not specify any options, then the tools run all checks by default.

-v

Shows the version of Oracle ORAchk and Oracle EXAchk tools.

-debug

Runs in debug mode.

The generated .zip file contains a debug log and other files useful for Oracle Support.

-nodaemon

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

-f

Runs Offline. The tools perform health checks on the data already collected from the system.

-upgrade

Forces an upgrade of the version of the tools being run.

-noupgrade

Does not prompt for an upgrade if a later version is available under the location specified in the RAT_UPGRADE_LOC environment variable.

-testemail all | "NOTIFICATION_EMAIL=comma-delimited list of email addresses"

Sends a test email to validate email configuration.

-sendemail “NOTIFICATION_EMAIL=comma-delimited list of email addresses"

Specify a comma-delimited list of email addresses.

Emails the generated HTML report on completion to the specified email addresses.

-dbserial

Runs the SQL, SQL_COLLECT, and OS health checks in serial.

-dbparallel [n]

Runs the SQL, SQL_COLLECT, and OS health checks in parallel, using n number of child processes.

Default is 25% of CPUs.

-dbparallelmax

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

1.8.2 Controlling the Scope of Checks

Use the list of commands in this section to control the scope of checks.

Syntax

[-b] 
[-p] 
[-m] 
[-u –o pre] 
[-u –o post] 
[-clusternodes nodes] 
[-failedchecks previous_result]
[-nordbms]
[-dbnames db_names] 
[-dbnone] 
[-dball] 
[-localonly] 
[-cells cells]
[-ibswitches switches] 
[-profile profile] 
[-excludeprofile profile] 
[-check check_id] 
[-excludecheck check_id] 
[-skip_usr_def_checks]

Parameters

Table 1-8 Scope of Checks

Command Description

-b

Runs only the best practice checks.

Does not run the recommended patch checks.

-p

Runs only the patch checks.

-m

Excludes the checks for Maximum Availability Architecture (MAA) scorecards.

-u –o pre

Runs the pre-upgrade checks for Oracle Clusterware and database.

-u –o post

Runs the post-upgrade checks for Oracle Clusterware and database.

-clusternodes nodes

Specify a comma-delimited list of node names to run only on a subset of nodes.

-failedchecks previous_result

Runs only checks from the presious_result, which had failed.

-nordbms

Runs Oracle Grid Infrastructure checks only in environments with no Oracle Database checks performed.

-dbnames db_names

Specify a comma-delimited list of database names to run only on a subset of databases.

-dbnone

Does not prompt for database selection and skips all the database checks.

-dball

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

-localonly

Runs only on the local node.

-cells cells

Specify a comma-delimited list of storage server names to run the checks only on a subset of storage servers.

-ibswitches switches

Specify a comma-delimited list of InfiniBand switch names to run the checks only on a subset of InfiniBand switches.

-profile profile

Specify a comma-delimited list of profiles to run only the checks in the specified profiles.

-excludeprofile profile

Specify a comma-delimited list of profiles to exclude the checks in the specified profiles.

-check check_id

Specify a comma-delimited list of check IDs to run only the checks specified in the list check IDs.

-excludecheck check_id

Specify a comma-delimited list of check IDs to exclude the checks specified in the list of check IDs.

-skip_usr_def_checks

Does not run the checks specified in the user-defined xml file.

1.8.3 Managing the Report Output

Use the list of commands in this section to manage the report output.

Syntax

[-syslog] [-tag tagname] 
[-o] 
[-nopass] 
[-noscore] 
[-diff old_report new_report [-outfile output_HTML]] 
[-merge [-force] collections]

Parameters

Table 1-9 Managing Output

Option Description

-syslog

Writes JSON results to syslog.

-tag tagname

Appends the tagname specified to the 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 the command prints passed checks on the screen.

If the -o option is not specified, then the command prints only the failed checks on the screen.

-nopass

Does not show passed checks in the generated output.

-noscore

Does not print health score in the HTML report.

-diff old_report new_report [-outfile output_HTML]

Reports the difference between the two HTML reports.

Specify a directory name or a ZIP file or an HTML report file as old_report and new_report.

-merge [-force] collections

Merges a comma-delimited list of collections and prepares a single report.

1.8.4 Uploading Results to Database

Use the list of commands in this section to upload results to the database.

Syntax

[-setdbupload all|list of variable names] 
[-unsetdbupload all|list of variable names] 
[-checkdbupload] 
[-getdbupload] 
[-checkfaileduploads] 
[-uploadfailed all|list of failed collections]

Parameters

Table 1-10 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: Specify a 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: Specify a comma-delimited list of variables to unset.

-checkdbupload

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

-getdbupload

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

-checkfaileduploads

Reports any failed collection uploads.

-uploadfailed all|list of failed collections

Reattempts to upload one or more failed collection uploads.

all: Reattempts to upload all the filed collection uploads.

list of failed collections: Specify a comma-delimited list of collections to upload.

1.8.5 Controlling the Behavior of the Daemon

Use the list of commands in this section to control the behavior of the daemon.

Syntax

[-id id] –set daemon_option
[-id id] -unset daemon_option | all
[-id id] -get parameter | all
[-d start]
[-d start -debug]
[-d stop]
[-d stop_client]
[-d status]
[-d info]
[-id id] -d nextautorun
[-initsetup]
[-initrmsetup]
[-initcheck]

Parameters

Table 1-11 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 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.

The details include installation and when the daemon was started.

[-id id] -d nextautorun

Displays details about when the next scheduled automatic run occurs.

-initsetup

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

-initrmsetup

Removes the automatic restart functionality.

-initcheck

Checks if the automatic restart functionality is set up.

1.8.6 Tracking File Attribute Differences

Use the list of commands in this section to find file attribute differences.

Parameters

Table 1-12 File Attribute Differences

Option Description

-fileattr start

Takes file attributes snapshot of discovered directories and stores the snapshot in the output directory.

By default, the tool takes snapshot of Oracle Grid Infrastructure home and all the installed database homes.

If the user doesn't own a particular directory, then the tool 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 the file attribute snapshots and related files.

-fileattr [start|check] -includedir directories

Includes the directories specified at the 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

1.8.7 Running Oracle Health Check Collections Manager Commands

List of commands to manage Oracle Health Check Collections Manager.

Table 1-13 Oracle Health Check Collections Manager Commands

Command Description

./orachk –cmupgrade

Or

./exachk –cmupgrade

Upgrades Oracle Health Check Collections Manager from Oracle ORAchk or Oracle EXAchk.

Oracle Health Check Collections Manager upgrades to the latest version of whichever application your database supports.

You get the new theme interface only if you have APEX 5.

1.8.8 Command-Line Options to Generate Password Protected Collection zip Files

Use the list of commands in this section to encrypt and decrypt diagnostic collection zip files.

Table 1-14 Encrypt and Decrypt Diagnostic Collection zip Files

Option Description

./orachk –d start –encryptzip

./exachk –d start –encryptzip

Starts the daemon with –encryptzip option.

The daemon prompts for a password when it starts. The daemon then encrypts the subsequent on-demand and scheduled runs collections with that password.

Note:

When -encryptzip is passed, Oracle ORAchk and Oracle EXAchk after successfully encrypting the diagnostic collection zip file delete the collections directory.

./orachk [-option value] -encryptzip

./exachk [-option value] -encryptzip

Encrypts the run result.

Prompts for the password, and encrypts the collections created at the end of the run with that password.

You can use -encryptzip with other Oracle ORAchk and Oracle EXAchk options that generate a collection.

For example:
./orachk -profile profile-name -encryptzip
./orachk -profile sysadmin -encryptzip
./orachk -check check-id -encryptzip
./orachk -check D47661C55B1A291AE0431EC0E50A5C53 -encryptzip

Note:

When -encryptzip is passed, Oracle ORAchk and Oracle EXAchk after successfully encrypting the diagnostic collection zip file delete the collections directory.

./orachk –encryptzip zip_file

./exachk –encryptzip zip_file

Encrypts the already generated collection.

Prompts for the password, encrypts the zip file specified with that password, and then renames the collections as, for example, orachk_host_db_encrypted_date_time.zip.

Note:

When -encryptzip is passed, Oracle ORAchk and Oracle EXAchk after successfully encrypting the diagnostic collection zip file delete the collections directory.

./orachk –decryptzip zip_file

./exachk –decryptzip zip_file

Decrypts the encrypted collection.

Prompts for the password, decrypts the zip file specified with that password, and then renames the collections as, for example, orachk_host_db_date_time.zip.