Today, we will examine the AHF tool offered by Oracle, which offers us the tools we used as orachk and exachk with more advanced features.
Oracle Autonnomous Health Framework (AHF) is an important tool that allows us to see errors and improve performance by making comprehensive checks on Oracle database exadata machine, cluster, grid and operating system, giving us advice.
However, AHF can also be used for checks prior to upgrading a database.
The report that comes out as a result of the operation of the tool offers us the parametric values that should be or what needs to be done.
You can download the Oracle AHF tool from the address below with your Oracle Support account.
1 | Autonomous Health Framework (AHF) – Including TFA and ORAchk/EXAChk |
Running Oracle AHF with root privileges will enable you to benefit from all its features.
If you run it with a different user, you will likely have to do the checks manually.
However, some packages must be installed before starting the installation of Oracle AHF.
Lack of packets will prevent the AHF tool from working properly.
1 | # yum install -y perl-Digest-MD5 perl-Data-Dumper |
With our Oracle Support account, we can start the installation of our AHF tool that we downloaded and installed on our operating system.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | # cd /tmp/ # unzip -oq AHF-LINUX_v19.3.0.zip # # ./ahf_setup AHF Installation Log : /tmp/ahf_install_9090_2020_01_21.log Starting Autonomous Health Framework (AHF) Installation AHF Version: 193000 Build Date: 20200121 Default AHF Location : /opt/oracle.ahf Do you want to change AHF Location (/opt/oracle.ahf) ? Y|[N] : AHF Location : /opt/oracle.ahf AHF Data Directory stores diagnostic collections and metadata. AHF Data Directory requires at least 5GB (Recommended 10GB) of free space. Choose Data Directory from below options : 1. /opt/oracle.ahf [Free Space : 71390 MB] 2. Enter a different Location Choose Option [1 - 2] : 1 AHF Data Directory : /opt/oracle.ahf/data Do you want to add AHF Notification Email IDs ? [Y]|N : Enter Email IDs separated by space : abuzer@kadayif.com Extracting AHF to /opt/oracle.ahf Configuring TFA Services Discovering Nodes and Oracle Resources Starting TFA Services Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service. Created symlink from /etc/systemd/system/graphical.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service. .------------------------------------------------------------------------------. | Host | Status of TFA | PID | Port | Version | Build ID | +-----------+---------------+------+-------+------------+----------------------+ | localhost | RUNNING | 3138 | 34125 | 19.3.0.0.0 | 19300020200121131037 | '-----------+---------------+------+-------+------------+----------------------' Running TFA Inventory... Adding default users to TFA Access list... .-------------------------------------------------------. | Summary of AHF Configuration | +-----------------+-------------------------------------+ | Parameter | Value | +-----------------+-------------------------------------+ | AHF Location | /opt/oracle.ahf | | TFA Location | /opt/oracle.ahf/tfa | | Orachk Location | /opt/oracle.ahf/orachk | | Data Directory | /opt/oracle.ahf/data | | Repository | /opt/oracle.ahf/data/repository | | Diag Directory | /opt/oracle.ahf/data/localhost/diag | '-----------------+-------------------------------------' AHF binaries are available in /opt/oracle.ahf/bin AHF is successfully installed Moving /tmp/ahf_install_9090_2020_01_21.log to /opt/oracle.ahf/data/localhost/diag/ahf/ # |
Installation completed successfully, let’s check the status.
1 2 3 4 5 6 7 8 9 10 11 | # 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: active (running) since Tue 2020-01-21 00:00:00 UTC; 2h 21min ago Main PID: 4270 (init.tfa) CGroup: /system.slice/oracle-tfa.service ├─ 4270 /bin/sh /etc/init.d/init.tfa run >/dev/null 2>&1 </dev/null ├─ 4376 /opt/oracle.ahf/jre/bin/java -server -Xms64m -Xmx128m -Djava.awt.headless=true -Ddisable.checkForUpdate=true oracle.rat.tfa.TFAMain /opt/oracle.ahf/tfa ├─ 9572 /opt/oracle.ahf/jre/bin/java -server -Xms64m -Xmx128m -Djava.awt.headless=true -Ddisable.checkForUpdate=true oracle.rat.tfa.TFAMain /opt/oracle.ahf/tfa └─26504 /bin/sleep 50 # |
Now that our vehicle is properly installed, we can run it.
1 2 3 4 5 | # go to the directory with root cd /opt/oracle.ahf/bin # run with root ./orachk |
We ran our tool with our ./orachk command.
First of all, it will provide control in applications such as grid and database after the operating system and will ask us on which SID we will operate.
After we make a selection, it will give us our output with full control.
The database we used for the test is “KADAYIFDB”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # orachk Started orachk discovery caching.... List of running databases 1. KADAYIFDB 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 Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name ------------------------------------------------------------------------------------------------------- localhost No No Yes No No Yes KADAYIFDB ------------------------------------------------------------------------------------------------------- Copying plug-ins . . . . . . . . . . Collections and audit checks log file is opt/oracle.ahf/data/localhost/orachk/orachk_localhost_kadayifdb_012120_16493/log/orachk.log Successfully completed orachk discovery caching. Setting up orachk auto restart functionality oracle-orachkscheduler start/running, process 22031 Starting orachk daemon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . orachk daemon started successfully Daemon log file location is : opt/oracle.ahf/data/localhost/orachk/orachk_localhost_kadayifdb_012120_16493/log/orachk.log # |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ============================================================ Node name - localhost ============================================================ Collecting - Database Parameters for kadayifdb database Collecting - Database Undocumented Parameters for kadayifdb database Collecting - RDBMS Feature Usage for kadayifdb database Collecting - CPU Information Collecting - Disk I/O Scheduler on Linux Collecting - DiskMount Information Collecting - Kernel parameters Collecting - Maximum number of semaphore sets on system Collecting - Maximum number of semaphores on system Collecting - Maximum number of semaphores per semaphore set Collecting - Memory Information Collecting - OS Packages Collecting - Operating system release information and kernel version Collecting - Patches for RDBMS Home Collecting - Table of file system defaults Collecting - number of semaphore operations per semop system call Collecting - Disk Information Collecting - ORAchk Daemon/Scheduler configuration Collecting - Root user limits Collecting - UHC_12c_Agent Status Collecting - UHC_Agent User Shell Limits Collecting - Verify no database server kernel out of memory errors INFO => Important Storage Minimum Requirements for Grid & Database Homes FAIL => Database parameter DB_LOST_WRITE_PROTECT is not set to recommended value on kadayifdbinstance INFO => umask for RDBMS owner is not set to 0022 WARNING => Database parameter DB_BLOCK_CHECKING on PRIMARY is NOT set to the recommended value. for kadayifdb 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 INFO => Database/Cluster/Site failure prevention best practices INFO => Client failover operational best practices WARNING => One or more components in database registry are not valid for kadayifdb WARNING => Duplicate objects were found in the SYS and SYSTEM schemas for kadayifdb WARNING => Oracle clusterware is not being used WARNING => RAC Application Cluster is not being used for database high availability on kadayifdb instance WARNING => DISK_ASYNCH_IO is NOT set to recommended value for kadayifdb WARNING => Flashback on PRIMARY is not configured for kadayifdb INFO => Database failure prevention best practices WARNING => Database Archivelog Mode should be set to ARCHIVELOG for kadayifdb FAIL => Active Data Guard is not configured for kadayifdb WARNING => Redo log write time is more than 500 milliseconds for kadayifdb |
All our tests have been completed.
AHF output:
1 | ”opt/oracle.ahf/data/localhost/orachk/orachk_localhost_kadayifdb_012120_16493/log/orachk_localhost_kadayifdb_012120_16493.html” |