Running AHFCTL Commands to Manage the Scheduler for Oracle Autonomous Health Framework Components

You need root access to ahfctl, or sudo access to run startahf, stopahf, and statusahf commands.

ahfctl startahf

Use the ahfctl startahf command to start the scheduler for Oracle Autonomous Health Framework components.

Syntax

Copyahfctl startahf 
[-h] 
[-all] 
[-tfa tfa_start_args] 
[-compliance compliance_autostart_args]

Parameters

ahfctl startahf Command Parameters

ParameterDescription
-allStarts the Oracle Trace File Analyzer and Oracle Autonomous Health Framework compliance (Oracle Orachk and Oracle Exachk) components daemons.
-tfaStarts the Oracle Trace File Analyzer daemon.
-tfa tfa_start_args

Starts the Oracle Trace File Analyzer daemon with the option specified. You can specify all Oracle Trace File Analyzer supported options. For example:

ahfctl startahf –tfa "tfa_start_args"
-complianceStarts the Oracle Autonomous Health Framework compliance (Oracle Orachk and Oracle Exachk) components daemons.
-compliance compliance_autostart_args{::nomarkdown}<div class="p"><p>Starts the Oracle Autonomous Health Framework compliance (<span>Oracle Orachk</span> and <span>Oracle Exachk</span>) components daemons with the option specified. Prepend the argument with a space followed by an hyphen and then wrap it with double quotes. You can specify all <span>Oracle Orachk</span> and <span>Oracle Exachk</span> supported options. For example:</p><pre><code class="language-plaintext">ahfctl startahf –compliance " -compliance_autostart_args"</code></pre><pre><code class="language-plaintext">ahfctl startahf -compliance -cargs " -c X4-2,EXAMAA"

ahfctl startahf -compliance -cargs " -debug" ahfctl startahf -compliance -cagrs " -withisa"</code></pre></div>{:/} |

Example ahfctl startahf

Copyahfctl startahf

Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . . 
. . . . . 
. . . . . 
. . . . . 
. . . . . 
Successfully started TFA Process..
. . . . . 
TFA Started and listening for commands

INFO: Configuring orachk to use TFA scheduler. Process sent to background. Details for the process can be found at /opt/oracle.ahf/data/node1/diag/orachk/compliance_start_070324_012319.log

ahfctl statusahf

Use the ahfctl statusahf command to check the scheduler status for Oracle Autonomous Health Framework components.

Syntax

ahfctl statusahf [-h]
[-all]
[-tfa]
[-compliance]

Parameters

ahfctl statusahf Command Parameters

ParameterDescription
-allChecks and displays the status of Oracle Trace File Analyzer and Oracle Autonomous Health Framework compliance ( Oracle Orachk and Oracle Exachk ) components daemons.
-tfaChecks and displays the status of Oracle Trace File Analyzer daemon.
-complianceChecks and displays the status of Oracle Autonomous Health Framework compliance ( Oracle Orachk and Oracle Exachk ) components daemons.

Example ahfctl statusahf

ahfctl statusahf

.------------------------------------------------------------------------------------------------.
| Host    | Status of TFA | PID   | Port | Version    | Build ID              | Inventory Status |
+---------+---------------+-------+------+------------+-----------------------+------------------+
| node1   | RUNNING       | 29745 | 5000 | 24.3.0.0.0 | 240300020240306182236 | COMPLETE         |
| node2   | RUNNING       | 11544 | 5000 | 24.3.0.0.0 | 240300020240306182236 | COMPLETE         |
'---------+---------------+-------+------+------------+-----------------------+------------------'

-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Parameter                                                              | Value                                                                                         |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Master node                                                            | node2                                                                                       |
|orachk daemon version                                                  | 2403000                                                                                       |
|Install location                                                       | /opt/oracle.ahf/orachk                                                                        |
|Scheduled orachk collection location                                   | /opt/oracle.ahf/data/node2/orachk/user_root/output on Master node node2                   |
|Started at                                                             | Wed Mar 06 18:35:16 UTC 2024                                                                  |
|Scheduler type                                                         | TFA Scheduler                                                                                 |
|Scheduler PID                                                          | 29745                                                                                         |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Scheduled runs                                                         |                                                                                               |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Scheduler                                                              | orachk.autostart_client_oratier1                                                              |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|AUTORUN_FLAGS                                                          | -usediscovery -profile oratier1 -dball -showpass -tag autostart_client_oratier1 -readenvconfig|
|AUTORUN_SCHEDULE                                                       | 3 2 * * 1,2,3,4,5,6                                                                           |
|COLLECTION_RETENTION                                                   | 7                                                                                             |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Scheduler                                                              | orachk.autostart_client                                                                       |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|AUTORUN_FLAGS                                                          | -usediscovery -tag autostart_client -readenvconfig                                            |
|AUTORUN_SCHEDULE                                                       | 3 3 * * 0                                                                                     |
|COLLECTION_RETENTION                                                   | 14                                                                                            |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Previous runs                                                          |                                                                                               |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|No previous runs since last two runs from lucene index are manual runs |                                                                                               |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
|Next auto run starts on                                                | Mar 07, 2024 02:03:00 ID:orachk.autostart_client_oratier1                                     |
-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------
System Health Monitor (SHM) is UP and Running (PID 10219)

ahfctl stopahf

Use the ahfctl stopahf command to stop the scheduler for Oracle Autonomous Health Framework components.

Syntax

ahfctl stopahf [-h]
[-all]
[-tfa]
[-compliance]

Parameters

ahfctl stopahf Command Parameters

ParameterDescription
-allStops the Oracle Trace File Analyzer and Oracle Autonomous Health Framework compliance ( Oracle Orachk and Oracle Exachk ) components daemons.
-tfaStops the Oracle Trace File Analyzer daemon.
-complianceStops the the Oracle Autonomous Health Framework compliance ( Oracle Orachk and Oracle Exachk ) components daemons.

Example ahfctl stopahf

ahfctl stopahf

Stopping TFA from the Command Line
Stopped OSWatcher
Nothing to do !
Please wait while TFA stops
Please wait while TFA stops
TFA-00002 Oracle Trace File Analyzer (TFA) is not running
TFA-00106 TFA Shutdown/Stopped by user
TFA Stopped Successfully
Telemetry adapter is not running
Successfully stopped TFA..

No active orachk manual runs found
Stopping orachk scheduler ...
Removing orachk cache discovery....
Successfully completed orachk cache discovery removal.

Unable to send message to TFA
Stopped orachk