Install TFA on 12c environment

reference documents

TFA Collector- The Preferred Tool for Automatic or ADHOC Diagnostic Gathering Across All Cluster Nodes [ID 1513912.2]
OSWatcher Analyzer User Guide (Doc ID 461053.1)

[root@db ~]#  cd /u01/app/oracle/product/12.2.0/db_1/crs/install
[root@db install]#  ./tfa_setup

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_13329_2023_08_18-09_18_35.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 193100 Build Date: 201911181744

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 : 278654 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 :

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             |
+------+---------------+-------+-------+------------+----------------------+
| db   | RUNNING       | 14465 | 36165 | 19.3.1.0.0 | 19310020191118174453 |
'------+---------------+-------+-------+------------+----------------------'

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/db/diag    |
'-----------------+---------------------------------'

AHF binaries are available in /opt/oracle.ahf/bin

AHF is successfully installed

Moving /tmp/ahf_install_13329_2023_08_18-09_18_35.log to /opt/oracle.ahf/data/db/diag/ahf/

[root@db ~]#   tfactl status
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

.---------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID   | Port  | Version    | Build ID             | Inventory Status |
+------+---------------+-------+-------+------------+----------------------+------------------+
| db   | RUNNING       | 14465 | 36165 | 19.3.1.0.0 | 19310020191118174453 | COMPLETE         |
'------+---------------+-------+-------+------------+----------------------+------------------'

显示当前tfa配置
[root@db ~]#  tfactl print config
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
.------------------------------------------------------------------------------------.
|                                         db                                         |
+-----------------------------------------------------------------------+------------+
| Configuration Parameter                                               | Value      |
+-----------------------------------------------------------------------+------------+
| TFA Version                                                           | 19.3.1.0.0 |
| Java Version                                                          | 1.8        |
| Public IP Network                                                     | false      |
| Automatic Diagnostic Collection                                       | true       |
| Alert Log Scan                                                        | true       |
| Disk Usage Monitor                                                    | true       |
| Managelogs Auto Purge                                                 | false      |
| Trimming of files during diagcollection                               | true       |
| Granular Tracing                                                      | false      |
| Debug Mask (Hex)                                                      | 0          |
| Repository current size (MB)                                          | 3          |
| Repository maximum size (MB)                                          | 10240      |
| Max Size of TFA Log (MB)                                              | 50         |
| Max Number of TFA Logs                                                | 10         |
| Max Size of Core File (MB)                                            | 50         |
| Max Collection Size of Core Files (MB)                                | 500        |
| Max File Collection Size (MB)                                         | 5120       |
| Minimum Free Space to enable Alert Log Scan (MB)                      | 500        |
| Time interval between consecutive Disk Usage Snapshot(minutes)        | 60         |
| Time interval between consecutive Managelogs Auto Purge(minutes)      | 60         |
| Logs older than the time period will be auto purged(days[d]|hours[h]) | 30d        |
| Automatic Purging                                                     | true       |
| Age of Purging Collections (Hours)                                    | 12         |
| TFA IPS Pool Size                                                     | 5          |
| TFA ISA Purge Age (seconds)                                           | 604800     |
| TFA ISA Purge Mode                                                    | profile    |
| TFA ISA Purge Thread Delay (minutes)                                  | 60         |
| Lucene index recovery mode                                            | recreate   |
| Setting for ACR redaction (none|SANITIZE|MASK)                        | none       |
| Email Notification will be sent for CHA EVENTS if address is set      | true       |
| AUTO Collection will be generated for CHA EVENTS                      | true       |
| Generation of Telemetry Data                                          | false      |
'-----------------------------------------------------------------------+------------'

List which directories are counted
[root@db ~]# tfactl print directories

tfa自带的组件
[root@db ~]#    tfactl toolstatus
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

.------------------------------------------------------------------.
|                     TOOLS STATUS - HOST : db                     |
+----------------------+--------------+--------------+-------------+
| Tool Type            | Tool         | Version      | Status      |
+----------------------+--------------+--------------+-------------+
| Development Tools    | orachk       |   19.3.0.0.0 | DEPLOYED    |
|                      | oratop       |       14.1.2 | DEPLOYED    |
+----------------------+--------------+--------------+-------------+
| Support Tools Bundle | oswbb        |        8.3.2 | NOT RUNNING |
|                      | prw          | 12.1.13.11.4 | NOT RUNNING |
+----------------------+--------------+--------------+-------------+
| TFA Utilities        | alertsummary |   19.3.0.0.0 | DEPLOYED    |
|                      | calog        |   19.3.0.0.0 | DEPLOYED    |
|                      | dbcheck      |   18.3.0.0.0 | DEPLOYED    |
|                      | dbglevel     |   19.3.0.0.0 | DEPLOYED    |
|                      | grep         |   19.3.0.0.0 | DEPLOYED    |
|                      | history      |   19.3.0.0.0 | DEPLOYED    |
|                      | ls           |   19.3.0.0.0 | DEPLOYED    |
|                      | managelogs   |   19.3.0.0.0 | DEPLOYED    |
|                      | menu         |   19.3.0.0.0 | DEPLOYED    |
|                      | param        |   19.3.0.0.0 | DEPLOYED    |
|                      | ps           |   19.3.0.0.0 | DEPLOYED    |
|                      | pstack       |   19.3.0.0.0 | DEPLOYED    |
|                      | summary      |   19.3.0.0.0 | DEPLOYED    |
|                      | tail         |   19.3.0.0.0 | DEPLOYED    |
|                      | triage       |   19.3.0.0.0 | DEPLOYED    |
|                      | vi           |   19.3.0.0.0 | DEPLOYED    |
'----------------------+--------------+--------------+-------------'

Note :-
  DEPLOYED    : Installed and Available - To be configured or run interactively.
  NOT RUNNING : Configured and Available - Currently turned off interactively.
  RUNNING     : Configured and Available.

[root@db ~]#   tfactl diagcollect -database orcl
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

By default TFA will collect diagnostics for the last 12 hours. This can result in large collections
For more targeted collections enter the time of the incident, otherwise hit <RETURN> to collect for the last 12 hours
[YYYY-MM-DD HH24:MI:SS,<RETURN>=Collect for last 12 hours] :

Collecting data for the last 12 hours for this component ...
Collecting data for all nodes

Collection Id : 20230818092903db

Detailed Logging at : /opt/oracle.ahf/data/repository/collection_Fri_Aug_18_09_29_04_CST_2023_node_all/diagcollect_20230818092903_db.log
2023/08/18 09:29:10 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2023/08/18 09:29:10 CST : Collection Name : tfa_Fri_Aug_18_09_29_04_CST_2023.zip
2023/08/18 09:29:10 CST : Collecting diagnostics from hosts : [db]
2023/08/18 09:29:10 CST : Getting list of files satisfying time range [08/17/2023 21:29:10 CST, 08/18/2023 09:29:10 CST]
2023/08/18 09:29:10 CST : Collecting additional diagnostic information...
2023/08/18 09:29:10 CST : Collecting ADR incident files...
2023/08/18 09:29:21 CST : Completed collection of additional diagnostic information...
2023/08/18 09:29:25 CST : Completed Local Collection
.---------------------------------.
|        Collection Summary       |
+------+-----------+-------+------+
| Host | Status    | Size  | Time |
+------+-----------+-------+------+
| db   | Completed | 763kB |  15s |
'------+-----------+-------+------'

Logs are being collected to: /opt/oracle.ahf/data/repository/collection_Fri_Aug_18_09_29_04_CST_2023_node_all
/opt/oracle.ahf/data/repository/collection_Fri_Aug_18_09_29_04_CST_2023_node_all/db.tfa_Fri
_Aug_18_09_29_04_CST_2023.zip You have mail in /var/spool/mail/root
[root @db ~]# tfactl set autodiagcollect=ON TFA starts automatic collection
[root@db ~]# tfactl start oswbb
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
Starting OSWatcher
[root@db ~ ]# tfactl start oswbb 60 168
Collect all logs managed by TFA before 2 hours: tfactl diagcollect -all -since 2h

Guess you like

Origin blog.csdn.net/kevinyu998/article/details/132367985