一、工具简介
TFA :收集日志的工具
ORAchk/EXAchk : 检查系统的工具
AHF :Oracle在2019年10月18日发布自治健康框架Autonomous Health Framework (AHF) 19.3,将ORAchk,EXAchk,TFA三种诊断工具合并入AHF,作为一个单一的安装软件被称作AHF。AHF可以使用root或者非root用户安装,而且所有的命令行指令和之前版本一样,ORAchk,EXAchk,TFA被放置在AHF_LOC/bin的目录下。----AHF需要定期更新。
二、安装
AHF安装过程如下:
--1、安装需要的包
[root@rhel75 ~]# yum -y install perl-Data-Dumper.x86_64
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Server | 4.3 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================
Installing:
perl-Data-Dumper x86_64 2.145-3.el7 Server 47 k
Transaction Summary
==========================================================================================================================================
Install 1 Package
Total download size: 47 k
Installed size: 97 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/1
Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 1/1
Installed:
perl-Data-Dumper.x86_64 0:2.145-3.el7
Complete!
[root@rhel75 ~]#
2、解压
[root@rhel75 ~]# unzip AHF-LINUX_v20.1.3.zip
Archive: AHF-LINUX_v20.1.3.zip
inflating: README.txt
inflating: ahf_setup
[root@rhel75 ~]#
--查看说明
[root@rhel75 ~]# cat README.txt
Oracle Autonomous Health Framework (AHF) - with ORAchk, EXAchk & Trace File Analyzer
------------------------------------------------------------------------------------
Installation Instructions
-------------------------
This must be completed for each node of a cluster.
1) Copy the zip file to a target machine and unzip
2) Run the command: ahf_setup
For advanced installation options see the User Guide
User Guide:
---------------
The AHF User Guide can now be found online at https://docs.oracle.com/en/engineered-systems/health-diagnostics/autonomous-health-framework/ahfug/index.html
Enhancements and Bug Fixes
--------------------------
A full list of enhancements and bugs fixed in each release is available at:
https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=2550798.1:AHF_VERSION_HISTORY
[root@rhel75 ~]#
3、安装
注意:若是RAC,想同时检查两边节点,则需要先配置两节点root的互信,然后在节点1安装AHF时会提示在节点2自动安装。若root未互信成功,则不能在节点2正常安装。
[root@rhel75 ~]# ./ahf_setup
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_59936_2020_06_04-02_25_33.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 20.1.3 Build Date: 202004290950
Default AHF Location : /opt/oracle.ahf
Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : Y
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.
Please Enter AHF Data Directory : /opt
AHF Data Directory : /opt/oracle.ahf/data
Do you want to add AHF Notification Email IDs ? [Y]|N : N
Extracting AHF to /opt/oracle.ahf
Configuring TFA Services
Discovering Nodes and Oracle Resources
Successfully generated certificates.
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 |
+--------+---------------+-------+-------+------------+----------------------+
| rhel75 | RUNNING | 60857 | 13274 | 20.1.3.0.0 | 20130020200429095054 |
'--------+---------------+-------+-------+------------+----------------------'
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/rhel75/diag |
'-----------------+----------------------------------'
Starting orachk daemon from AHF ...
AHF binaries are available in /opt/oracle.ahf/bin
AHF is successfully installed
Moving /tmp/ahf_install_59936_2020_06_04-02_25_33.log to /opt/oracle.ahf/data/rhel75/diag/ahf/
[root@rhel75 ~]#
---查看进程
[root@rhel75 ~]# ps -ef |grep -i ahf
root 60857 1 11 02:26 ? 00:00:26 /opt/oracle.ahf/jre/bin/java -server -Xms32m -Xmx64m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/opt/oracle.ahf/data/rhel75/diag/tfa oracle.rat.tfa.TFAMain /opt/oracle.ahf/tfa
root 63344 55078 0 02:30 pts/8 00:00:00 grep --color=auto -i ahf
[root@rhel75 ~]#
三、AHF使用
(1)用root执行orachk,后面会提示操作。
(2)若仅安装了GI或GI和DB,未创建实例,则需使用如下 -nordbms,否则无法执行成功。