Oracle AHF 安装部署及使用

Oracle AHF 安装部署及使用ahf Autonomous Health Framework 就是 oracle 官方收集日志的工具集合包 包内涵盖了 TFA 收集日志的工具 ORAchk EXAchk 检查系统的工具 1 AHF 的安装 AHF 软件需要从 oracle 官方下载

大家好,我是讯享网,很高兴认识大家。

        ahf(Autonomous Health Framework):就是oracle官方收集日志的工具集合包,包内涵盖了TFA :收集日志的工具;ORAchk/EXAchk : 检查系统的工具。

1、AHF的安装

AHF软件需要从oracle官方下载 用unzip解压到指定的目录 [root@oracle19c ~]# unzip AHF-LINUX_v21.2.1.zip -d AHF-LINUX Archive: AHF-LINUX_v21.2.1.zip inflating: AHF-LINUX/README.txt inflating: AHF-LINUX/ahf_setup extracting: AHF-LINUX/ahf_setup.dat inflating: AHF-LINUX/oracle-tfa.pub 需要先安装perl-Data-Dumper.x86_64包 [root@oracle19c AHF-LINUX]# yum install perl-Data-Dumper.x86_64 已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. media | 2.8 kB 00:00:00 (1/2): media/group_gz | 95 kB 00:00:00 (2/2): media/primary | 2.1 MB 00:00:00 media 5231/5231 正在解决依赖关系 --> 正在检查事务 ---> 软件包 perl-Data-Dumper.x86_64.0.2.145-3.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ============================================================================================================================================== Package 架构 版本 源 大小 ============================================================================================================================================== 正在安装: perl-Data-Dumper x86_64 2.145-3.el7 media 47 k 事务概要 ============================================================================================================================================== 安装 1 软件包 总下载量:47 k 安装大小:97 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : perl-Data-Dumper-2.145-3.el7.x86_64 1/1 验证中 : perl-Data-Dumper-2.145-3.el7.x86_64 1/1 已安装: perl-Data-Dumper.x86_64 0:2.145-3.el7 完毕! [root@oracle19c AHF-LINUX]# 开始安装AHF [root@oracle19c AHF-LINUX]# ./ahf_setup AHF Installer for Platform Linux Architecture x86_64 AHF Installation Log : /tmp/ahf_install__2519_2021_09_03-14_12_32.log Starting Autonomous Health Framework (AHF) Installation AHF Version: 21.2.1 Build Date: 2 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 | +-----------+---------------+------+-------+------------+----------------------+ | oracle19c | RUNNING | 4156 | 30928 | 21.2.1.0.0 |  | '-----------+---------------+------+-------+------------+----------------------' 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/oracle19c/diag | '-----------------+-------------------------------------' Starting orachk scheduler from AHF ... AHF binaries are available in /opt/oracle.ahf/bin AHF is successfully installed Do you want AHF to store your My Oracle Support Credentials for Automatic Upload ? Y|[N] : n Moving /tmp/ahf_install__2519_2021_09_03-14_12_32.log to /opt/oracle.ahf/data/oracle19c/diag/ahf/ [root@oracle19c AHF-LINUX]#

讯享网

2、ORAchk的使用


讯享网

讯享网使用root账户运行orachk,即可检查rdbms的健康检查
[root@oracle19c ~]# orachk 
 
List of running databases

1. xhh
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]. 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
-------------------------------------------------------------------------------------------------------
  oracle19c                  No           No          Yes           No       No      Yes                 xhh
-------------------------------------------------------------------------------------------------------

Copying plug-ins

. .
.  .  .  .  .  .  

* Checking Best Practice Recommendations ( Pass / Warning / Fail ) *
.  

Collections and audit checks log file is 
/opt/oracle.ahf/data/oracle19c/orachk/user_root/output/orachk_oracle19c_xhh_090321_14222/log/orachk.log

Translated Message files for the language (zh) is not found. Using the default (en) Message files

============================================================
              Node name - oracle19c
============================================================
. . . . . . 

 Collecting - Database Parameters for xhh database
 Collecting - Database Undocumented Parameters for xhh database
 Collecting - List of active logon and logoff triggers for xhh 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 - Root user limits
 Collecting - Verify ORAchk scheduler configuration
 Collecting - Verify TCP Selective Acknowledgement is enabled
 Collecting - Verify no database server kernel out of memory errors
 Collecting - Verify the vm.min_free_kbytes configuration

Data collections completed. Checking best practices on oracle19c.
------------------------------------------------------------

 WARNING =>  Linux swap configuration does not meet recommendation
 WARNING =>  There are some application objects with STALE statistics for xhh
 INFO =>     Most recent ADR incidents for /u01/app/oracle/product/19.0.0/dbhome_1
 FAIL =>     The OMS user does not have the correct value of umask set
 FAIL =>     The EM_NODEMGR_PORT has expired or will expire within the next day.
 INFO =>     Oracle GoldenGate failure prevention best practices
 CRITICAL => The vm.min_free_kbytes configuration is not set as recommended
 INFO =>     user_dump_dest has trace files older than 30 days for xhh
 WARNING =>  One or more redo log groups are not multiplexed for xhh
 WARNING =>  Primary database is not protected with Data Guard (standby database) for real-time data protection and availability for xhh
 INFO =>     Important Storage Minimum Requirements for Grid & Database Homes
 CRITICAL => Operating system hugepages count does not satisfy total SGA requirements
 WARNING =>  OSWatcher is not running as is recommended.
 FAIL =>     Database parameter DB_LOST_WRITE_PROTECT is not set to recommended value on xhh instance
 INFO =>     The Optimizer Fix 28345522 is disabled by default for xhh
 WARNING =>  Database parameter DB_BLOCK_CHECKING on primary is not set to the recommended value. for xhh
 INFO =>     The Optimizer Fix 22149010 is disabled by default for xhh
 INFO =>     The Optimizer Fix 25167306 is disabled by default for xhh
 WARNING =>  Oracle patch 30786641 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Consider setting the value of the parameter _cursor_obsolete_threshold  to 1024 for Non-Multitenant environment which is the appropriate recommended value for xhh
 INFO =>     The Optimizer Fix 28965084 is disabled by default for xhh
 INFO =>     The Optimizer Fix 28776811 is disabled by default for xhh
 INFO =>     The Optimizer Fix 29132869 is disabled by default for xhh
 INFO =>     The Optimizer Fix 28498976 is disabled by default for xhh
 INFO =>     The Optimizer Fix 29687220 is disabled by default for xhh
 INFO =>     The Optimizer Fix 30232638 is disabled by default for xhh
 INFO =>     The Optimizer Fix 29930457 is disabled by default for xhh
 INFO =>     The Optimizer Fix 29304314 is disabled by default for xhh
 INFO =>     The Optimizer Fix 28776431 is disabled by default for xhh
 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 =>  Oracle patch 30712670 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 29423227 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 31031240 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 29867728 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 31142749 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 26749785 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 29302565 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle patch 29259068 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Logical and physical size of all datafiles are not same for xhh
 WARNING =>  Oracle patch 28907129 is not applied on RDBMS_HOME /u01/app/oracle/product/19.0.0/dbhome_1
 WARNING =>  Oracle clusterware is not being used
 WARNING =>  RAC Application Cluster is not being used for database high availability on xhh instance
 WARNING =>  DISK_ASYNCH_IO is NOT set to recommended value for xhh
 FAIL =>     Table AUD$[FGA_LOG$] should use Automatic Segment Space Management for xhh
 WARNING =>  Flashback on PRIMARY is not configured for xhh
 INFO =>     Database failure prevention best practices
 WARNING =>  fast_start_mttr_target has NOT been changed from default on xhh instance
 FAIL =>     Active Data Guard is not configured for xhh
 INFO =>     Parallel Execution Health-Checks and Diagnostics Reports for xhh
 INFO =>     Oracle recovery manager(rman) best practices
 INFO =>     Database feature usage statistics for xhh
 WARNING =>  Consider investigating changes to the schema objects such as DDLs or new object creation for xhh
 WARNING =>  Consider increasing the value of the session_cached_cursors database parameter for xhh
Best Practice checking completed. Checking recommended patches on oracle19c
--------------------------------------------------------------------------------
Collecting patch inventory on ORACLE_HOME /u01/app/oracle/product/19.0.0/dbhome_1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1 Recommended RDBMS patches for 190000 from /u01/app/oracle/product/19.0.0/dbhome_1 on oracle19c
--------------------------------------------------------------------------------
Patch#   RDBMS    ASM     type                Patch-Description                       
--------------------------------------------------------------------------------
32904851 no               merge                Database Release Update 19.12.0.0.210720                                       
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
              RDBMS homes patches summary report
--------------------------------------------------------------------------------
Total patches  Applied on RDBMS Applied on ASM ORACLE_HOME    
--------------------------------------------------------------------------------
1              1              0                /u01/app/oracle/product/19.0.0/dbhome_1
--------------------------------------------------------------------------------

------------------------------------------------------------
Detailed report (html) -  /opt/oracle.ahf/data/oracle19c/orachk/user_root/output/orachk_oracle19c_xhh_090321_14222/orachk_oracle19c_xhh_090321_14222.html

UPLOAD [if required] - /opt/oracle.ahf/data/oracle19c/orachk/user_root/output/orachk_oracle19c_xhh_090321_14222.zip
Unable to make DB connection

[root@oracle19c ~]# 
收集完毕后,就可以去“/opt/oracle.ahf/data/oracle19c/orachk/user_root/output/orachk_oracle19c_xhh_090321_14222”查看具体的库的诊断信息

三、TFA工具使用

使用tfactl收集9月3日的日志 [root@oracle19c orachk_oracle19c_xhh_090321_14222]# tfactl diagcollect -for "2021-09-03" Collecting data for all nodes TFA is using system timezone for collection, All times shown in CST. Scanning files for sep/03/2021 Collection Id : 146oracle19c Detailed Logging at : /opt/oracle.ahf/data/repository/collection_Fri_Sep_03_14_51_49_CST_2021_node_all/diagcollect_146_oracle19c.log 2021/09/03 14:51:54 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom 2021/09/03 14:51:54 CST : Collection Name : tfa_Fri_Sep_03_14_51_48_CST_2021.zip 2021/09/03 14:51:54 CST : Collecting diagnostics from hosts : [oracle19c] 2021/09/03 14:51:54 CST : Scanning of files for Collection in progress... 2021/09/03 14:51:54 CST : Collecting additional diagnostic information... 2021/09/03 14:51:59 CST : Getting list of files satisfying time range [09/03/2021 00:00:00 CST, 09/03/2021 14:51:54 CST] 2021/09/03 14:52:03 CST : Collecting ADR incident files... 2021/09/03 14:53:32 CST : Completed collection of additional diagnostic information... 2021/09/03 14:53:34 CST : Completed Local Collection .-------------------------------------. | Collection Summary | +-----------+-----------+------+------+ | Host | Status | Size | Time | +-----------+-----------+------+------+ | oracle19c | Completed | 17MB | 100s | '-----------+-----------+------+------' Logs are being collected to: /opt/oracle.ahf/data/repository/collection_Fri_Sep_03_14_51_49_CST_2021_node_all /opt/oracle.ahf/data/repository/collection_Fri_Sep_03_14_51_49_CST_2021_node_all/oracle19c.tfa_Fri_Sep_03_14_51_48_CST_2021.zip

关于TFA更加深入的操作,请参考官方文档:

TFA Collector- The Preferred Tool for Automatic or ADHOC Diagnostic Gathering Across All Cluster Nodes [ID .2]

小讯
上一篇 2025-04-08 11:22
下一篇 2025-01-17 09:04

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/98098.html