2.6 Start Using Oracle Autonomous Health Framework
- Understanding the Directory Structure
Review the list of key Oracle Autonomous Health Framework directories. - Configuring Oracle Trace File Analyzer and Oracle Orachk/Oracle Exachk to Use the Same Notification Addresses
Configure notification emails to notify the recepients the results of Oracle Orachk and Oracle Exachk compliance checking, or when Oracle Trace File Analyzer detects significant faults. - Oracle Trace File Analyzer Command-Line and Shell Options
Thetfactl
tool functions as a command-line interface, shell interface, and menu interface. - Manage Oracle Trace File Analyzer and Oracle Orachk Daemons Using systemctl Commands
Run thesystemctl
commands asroot
user on an Oracle Linux server. You can also start/stop Oracle Trace File Analyzer daemon using thetfactl shutdown
andtfactl start
commands. - Behavior of Oracle Orachk or Oracle Exachk Daemon
AHF 23.9 includes a new command optionreset
to change the behavior of Oracle Orachk or Oracle Exachk daemon duringautostart
,autostop
, andupgrade
.
Parent topic: Get Started
2.6.1 Understanding the Directory Structure
Review the list of key Oracle Autonomous Health Framework directories.
Table 2-9 Key Oracle Autonomous Health Framework Directories
Directory | Description |
---|---|
|
Directory where Oracle Autonomous Health Framework is installed. |
|
Python home directory. |
|
Oracle Orachk home directory. |
|
JRE home directory. |
|
Oracle Autonomous Health Framework common directory that contains libraries, ACR, ORDS, and so on. |
|
Directory that contains Oracle Autonomous Health Framework binaries including the
command-line interface
|
|
Oracle Autonomous Health Framework Analyzer directory. |
|
Oracle Autonomous Health Framework data directory contains data generated by Oracle Autonomous Health Framework components such as configuration files, Berkeley DB (BDB), Index data, and so on. |
|
Oracle Trace File Analyzer home directory. |
|
Directory where Oracle Autonomous Health Framework stores diagnostic collections and Metadata. |
|
Directory where Oracle Autonomous Health Framework stores diagnostic collections. |
|
This directory contains logs from all components. |
Parent topic: Start Using Oracle Autonomous Health Framework
2.6.2 Configuring Oracle Trace File Analyzer and Oracle Orachk/Oracle Exachk to Use the Same Notification Addresses
Configure notification emails to notify the recepients the results of Oracle Orachk and Oracle Exachk compliance checking, or when Oracle Trace File Analyzer detects significant faults.
Use the ahfnotificationaddress
option to configure Oracle Trace File Analyzer and Oracle Orachk/Oracle Exachk to use the same notification addresses.
Related Topics
Parent topic: Start Using Oracle Autonomous Health Framework
2.6.2.1 Configuring Oracle Trace File Analyzer and Oracle Orachk/Oracle Exachk to Use Different Notification Addresses
For Oracle Orachk/Oracle Exachk:
$ orachk –set "NOTIFICATION_EMAIL=some.person@acompany.com,another.person@acompany.com"
$ exachk –set "NOTIFICATION_EMAIL=some.person@acompany.com,another.person@acompany.com"
DEFAULT
. For
example:$ orachk -id dba -set "NOTIFICATION_EMAIL=some.person@acompany.com,another.person@acompany.com"
$ exachk -id dba -set "NOTIFICATION_EMAIL=some.person@acompany.com,another.person@acompany.com"
For Oracle Trace File Analyzer:
ORACLE_HOME
, include the operating system owner in the
command:$ tfactl set notificationAddress=os_user:email
ORACLE_HOME
:$ tfactl set notificationAddress=email
2.6.3 Oracle Trace File Analyzer Command-Line and Shell Options
The tfactl
tool functions as a command-line interface,
shell interface, and menu interface.
Table 2-10 Oracle Trace File Analyzer Interfaces
Interface | Command | How to use |
---|---|---|
Command-line |
|
Specify all command options at the command line. |
Shell interface |
|
Set and change the context and then run commands from within the shell. |
Menu Interface |
|
Select the menu navigation options and then choose the command that you want to run. |
Using tfactl
, you can:
- Run administration commands
- Collect diagnostic data
- Analyze diagnostic data collection
tfactl
commands depends upon the level of access you have
to tfactl
. Run the administration commands as
root
or sudo
. Or, run a subset of
commands as:
- An Oracle Database home owner or Oracle Grid Infrastructure home owner.
- A member of
OS DBA
orASM
groups.
To grant other users access to tfactl
:
tfactl access
tfactl
as a command-line
tool:tfactl [command][options]
tfactl
as a shell interface, enter tfactl
,
and then run the commands as
needed:$ tfactl
tfactl>
-help
option to any of the tfactl
commands to obtain command-specific
help.$ tfactl [command] -help
2.6.4 Manage Oracle Trace File Analyzer and Oracle Orachk Daemons Using systemctl Commands
Run the systemctl
commands as root
user on
an Oracle Linux server. You can also start/stop Oracle Trace File
Analyzer daemon using the tfactl shutdown
and
tfactl start
commands.
systemctl status oracle-tfa.service
systemctl start oracle-tfa.service
systemctl stop oracle-tfa.service
# systemctl status oracle-tfa.service
oracle-tfa.service - Oracle Trace File Analyzer
Loaded: loaded (/etc/systemd/system/oracle-tfa.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Fri 2021-01-29 18:50:51 PST; 24s ago
Process: 79935 ExecStart=/etc/init.d/init.tfa run >/dev/null 2>&1 </dev/null (code=killed, signal=TERM)
Main PID: 79935 (code=killed, signal=TERM)
Jan 29 15:47:46 den02mwa systemd[1]: Started Oracle Trace File Analyzer.
Jan 29 15:47:47 den02mwa init.tfa[79935]: Starting TFA..
Jan 29 15:47:48 den02mwa init.tfa[79935]: Starting TFA out of init, Should be running in 10 seconds
Jan 29 15:47:48 den02mwa init.tfa[79935]: Successfully updated jvmXmx to 128 in TFA...
Jan 29 15:47:56 den02mwa init.tfa[79935]: OSWatcher is already deployed at /opt/oracle.ahf/tfa/ext/oswbb
Jan 29 15:47:56 den02mwa init.tfa[79935]: Cannot find valid Non root user to run OSWatcher
Jan 29 18:50:41 den02mwa systemd[1]: Stopping Oracle Trace File Analyzer...
Jan 29 18:50:41 den02mwa init.tfa[79935]: Telemetry not enabled - Not Starting Adapter
Jan 29 18:50:51 den02mwa systemd[1]: Stopped Oracle Trace File Analyzer.
# tfactl start
Starting TFA..
Created symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service -> /etc/systemd/system/oracle-tfa.service.
Created symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service -> /etc/systemd/system/oracle-tfa.service.
Waiting up to 100 seconds for TFA to be started..
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
# tfactl shutdown
Shutting down TFA
Removed /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
Successfully shutdown TFA..
Parent topic: Start Using Oracle Autonomous Health Framework
2.6.5 Behavior of Oracle Orachk or Oracle Exachk Daemon
AHF 23.9 includes a new command option reset
to change the behavior of Oracle Orachk or Oracle Exachk daemon during autostart
, autostop
, and upgrade
.
Command | Description |
---|---|
|
Starts and loads the default schedulers. |
|
Removes all default unmodified schedulers. |
Daemon behavior until AHF 23.8
The behavior of exachk -autostart
, orachk
-autostart
, ahfctl compliance -autostart
, and
ahfctl upgrade
are the same. The table below illustrates
different scenarios of schedulers and their behavior before and after autostart and
upgrade.
Before autostart/upgrade | After autostart/upgrade |
---|---|
Default schedulers | Default schedulers |
User-defined + default schedulers | User-defined |
Only user-defined | Only user-defined |
User-defined + modified default schedulers | User-defined + modified default schedulers |
2 default schedulers: One modified default and the other is not | Only modified default scheduler |
Only one default scheduler out of 2 default schedulers | Both default schedulers |
No schedulers | No schedulers |
The table below illustrates different scenarios of schedulers and their behavior
before and after exachk -autostart
, orachk
-autostart
, and ahfctl compliance -autostart
.
Before autostop | After autostop |
---|---|
Default schedulers | No schedulers |
User-defined + default schedulers | User-defined schedulers only |
Only user-defined | Only user-defined |
User-defined + modified default schedulers | User-defined + modified default schedulers |
2 default schedulers: One modified default and the other is not | Only modified default scheduler |
Only one default scheduler out of 2 default schedulers | No scheduler |
No scheduler | No scheduler |
Daemon behavioral changes in AHF 23.9
The behavior of exachk -autostart
, orachk
-autostart
, ahfctl compliance -autostart
, and
ahfctl upgrade
remains the same as in AHF 23.8. There will be
no changes to the scheduler entries be it default schedulers or user-defined
schedulers.
Before autostart/upgrade or autostop and then autostart | After autostart/upgrade or autostop and then autostart |
---|---|
Default schedulers | Default schedulers |
User-defined + default schedulers | User-defined + default schedulers |
Only user-defined | Only user-defined |
User-defined + modified default schedulers | User-defined + modified default schedulers |
2 default schedulers: One modified default and the other is not | 2 default schedulers: One modified default and the other is not |
Only one default scheduler out of 2 default schedulers | Only one default scheduler out of 2 default schedulers |
No schedulers | No schedulers |
The table below illustrates the behavior after autostart reset
.
Before -autostart reset | After -autostart reset |
---|---|
Default schedulers | Default schedulers |
User-defined + default schedulers | Default schedulers |
Only user-defined | Default schedulers |
User-defined + modified default schedulers | Default schedulers |
2 default schedulers: One modified default and the other is not | Default schedulers |
Only one default scheduler out of 2 default schedulers | Default schedulers |
No schedulers | Default schedulers |
The table below illustrates the behavior when autostop
unset
is run and then autostart
.
Before -autostop unset and then autostart | After -autostop unset and then autostart |
---|---|
Default schedulers | No schedulers |
User-defined + default schedulers | User-defined |
Only user-defined | Only user-defined |
User-defined + modified default schedulers | User-defined + modified default schedulers |
2 default schedulers: One modified default and the other is not | Only modified default scheduler |
Only one default scheduler out of 2 default schedulers | No schedulers |
No schedulers | No schedulers |
Use Cases
Use case | Outcome |
---|---|
-autostop and then
-autostart |
autostop will only deconfigure the compliance
and autostart will start the compliance and load all the schedulers
that were present before autostop .
|
-autostop unset and then
-autostart |
autostop unset will deconfigure the
compliance and remove all the default unmodified schedulers and
autostart will start the compliance and load
the user-defined schedulers and modified default schedulers if they
exist.
|
-autostop and then -autostart
reset |
autostop will only deconfigure the compliance
and autostart reset will start the compliance and
only load the default schedulers.
|
-autostop unset and then
-autostart reset |
autostop unset will deconfigure the
compliance and remove all the default unmodified schedulers and
autostart reset will start the compliance and
only load the default schedulers.
|
Example 2-28 exachk -autostop unset, exachk -autostart reset, and exachk -get all
# exachk -autostop unset
Removing exachk cache discovery....
Successfully completed exachk cache discovery removal.
Successfully copied Daemon Store to Remote Nodes
# exachk -autostart reset
Successfully copied Daemon Store to Remote Nodes
exachk is using TFA Scheduler. TFA PID: 113253
Daemon log file location is : /opt/oracle.ahf/data/test-server/exachk/user_root/output/exachk_daemon.log
# exachk -get all
------------------------------------------------------------
Scheduled runs:
------------------------------------------------------------
ID: exachk.autostart_client_exatier1
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -profile exatier1 -dball -showpass -tag autostart_client_exatier1 -readenvconfig
AUTORUN_SCHEDULE = 3 2 * * 1,2,3,4,5,6
COLLECTION_RETENTION = 7
------------------------------------------------------------
------------------------------------------------------------
ID: exachk.autostart_client
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -tag autostart_client -readenvconfig
AUTORUN_SCHEDULE = 3 3 * * 0
COLLECTION_RETENTION = 14
------------------------------------------------------------
Example 2-29 exachk -autostop unset and exachk -get all
# exachk -autostop unset
Removing exachk cache discovery....
Successfully completed exachk cache discovery removal.
Successfully copied Daemon Store to Remote Nodes
# exachk -get all
No scheduler for any ID
Example 2-30 exachk -autostart reset and exachk -get all
# exachk -autostart reset
Successfully copied Daemon Store to Remote Nodes
exachk is using TFA Scheduler. TFA PID: 113253
Daemon log file location is : /opt/oracle.ahf/data/test-server/exachk/user_root/output/exachk_daemon.log
# exachk -get all
------------------------------------------------------------
Scheduled runs:
------------------------------------------------------------
ID: exachk.autostart_client_exatier1
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -profile exatier1 -dball -showpass -tag autostart_client_exatier1 -readenvconfig
AUTORUN_SCHEDULE = 3 2 * * 1,2,3,4,5,6
COLLECTION_RETENTION = 7
------------------------------------------------------------
------------------------------------------------------------
ID: exachk.autostart_client
------------------------------------------------------------
AUTORUN_FLAGS = -usediscovery -tag autostart_client -readenvconfig
AUTORUN_SCHEDULE = 3 3 * * 0
COLLECTION_RETENTION = 14
------------------------------------------------------------
Parent topic: Start Using Oracle Autonomous Health Framework