Benutzer-Werkzeuge

Webseiten-Werkzeuge


dba:oracle_rac_12c_tfa_trace_file_analyser

Oracle 12c / 18c Die RAC Umgebung mit Oracle Trace File Analyzer (TFA) überprüfen - ab 19c Autonomous Health Framework (AHF)

Der Trace File Analyzer (TFA) ist Teil des Oracle Autonomous Health Frameworks.

Im dem TFA ist auch das bekannte Werkzeug oraChk nun (siehe ⇒ Oracle 12c Linux RAC Umgebung mit ORAchk überprüfen enthalten. Nur wo? Nach der Installation ist OraChk bei mir hier gelandet ⇒ „/opt/oracle.tfa/tfa/racdb01/tfa_home/ext/orachk“. Einfacher ist, es über orachek nun über „tfactl orachk“ aufzurufen!

D.h. alle für die Analyse eines Cluster notwendigen Tools sind nun in diesem Werkzeug gebundelt.

Das hilft entscheidend dem DBA alle notwendigen Information für einen Support Fall einzusammeln und unterstützt bei der täglichen Arbeit um proaktive Fehler im Cluster zu finden.

Siehe dazu auch diesen Vortrag: https://www.doag.org/de/home/news/aufgezeichnet-oracles-autonomous-health-framework/detail/


Installation und Setup

Ab 12c/18c scheint TAF bereits in der Grid Software enthalten zu sein, mit einem RU wird auch der TFA geupdated.

Nach der Installation prüfen ob per (default!) orachk Job aktiviert wird! Jeder Lauf verbraucht auffällig viel Plattenplatz! Test mit „./tfactl orachk -d nextautorun“, abschalten mit „/tfactl run orachk -autostop“

Download über den Support

Download über das Support Dokument ⇒ „TFA Collector - TFA with Database Support Tools Bundle (Doc ID 1513912.1)“ kann das Tool komplett heruntergeladen werden. Ab min August 2019 über „Autonomous Health Framework (AHF) - Including TFA and ORAchk/EXAChk (Doc ID 2550798.1)“

Vorbereitung

  • Prüfen ob unzip auf beiden Knoten installiert ist!
    yum install unzip
  • Port 5000 muss zwischen den beiden Knoten freigeschaltet sein!
  • Download über das Support Portal (Doc ID 1513912.1)

Installation als Root

Als root auspacken und installieren:

# TFA Home anlegen auf beiden Knoten!!
mkdir /opt/oracle/tfa
 
mkdir -p /opt/install/tfa
 
unzip /tmp/TFA-LINUX_v18.1.1.zip -d /opt/install/tfa/
 
cd /opt/install/tfa/
 
 
## Perl Package nachinstallieren falls noch nicht vorhanden
yum install perl-Data-Dumper.x86_64
yum install perl-Digest-MD5
 
 
####### Installation ##################
 
 
 
 
[root@racdb01 tfa]# ./installTFA-LINUX
 
TFA Installation Log will be written to File : /tmp/tfa_install_47300_2018_02_26-15_55_38.log
 
Starting TFA installation
 
TFA Version: 181100 Build Date: 201802010159
 
Enter a location for installing TFA (/tfa will be appended if not supplied) [/opt/install/tfa]:
/opt/oracle/tfa
 
Running Auto Setup for TFA as user root...
 
Would you like to do a [L]ocal only or [C]lusterwide installation ? [L|l|C|c] [C] : C
 
The following installation requires temporary use of SSH.
If SSH is not configured already then we will remove SSH
when complete.
  Do you wish to Continue ? [Y|y|N|n] [Y] Y
Installing TFA now...
 
Discovering Nodes and Oracle resources
 
Starting Discovery...
 
 
Getting list of nodes in cluster . . . . .
 
List of nodes in cluster:
racdb01
racdb02
 
 
Checking ssh user equivalency settings on all nodes in cluster
 
Node racdb02 is configured for ssh user equivalency for root user
 
CRS_HOME=/opt/12.1.0.2/grid
 
Searching for running databases...
1. GPIDB
 
 
Searching out ORACLE_HOME for selected databases...
 
 
Getting Oracle Inventory...
 
ORACLE INVENTORY: /opt/oraInventory
 
 
Discovery Complete...
 
 
 
TFA Will be Installed on the Following Nodes:
++++++++++++++++++++++++++++++++++++++++++++
 
Install Nodes
=============
racdb01
racdb02
 
Do you wish to make changes to the Node List ? [Y/y/N/n] [N] N
 
TFA will scan the following Directories
++++++++++++++++++++++++++++++++++++++++++++
 
.--------------------------------------------------------------------------.
|                                  racdb01                                 |
+--------------------------------------------------------------+-----------+
| Trace Directory                                              | Resource  |
+--------------------------------------------------------------+-----------+
| /opt/12.1.0.2/grid/cfgtoollogs                               | CFGTOOLS  |
| /opt/12.1.0.2/grid/crf/db/racdb01                            | CRS       |
| /opt/12.1.0.2/grid/crs/log                                   | CRS       |
| /opt/12.1.0.2/grid/css/log                                   | CRS       |
**
**
| /opt/oracle/diag/tnslsnr/racdb01/listener_scan3/trace        | TNS       |
| /opt/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs            | CFGTOOLS  |
| /opt/oracle/product/12.1.0.2/dbhome_1/install                | INSTALL   |
| /opt/oracle/product/12.1.0.2/dbhome_1/rdbms/log              | RDBMS     |
| ASM|+ASM1                                                    | pipperr   |
'--------------------------------------------------------------+-----------'
 
 
 
Installing TFA on racdb01:
HOST: racdb01   TFA_HOME: /opt/oracle/tfa/racdb01/tfa_home
 
Installing TFA on racdb02:
HOST: racdb02   TFA_HOME: /opt/oracle/tfa/racdb02/tfa_home
 
.----------------------------------------------------------------------------.
| Host    | Status of TFA | PID   | Port | Version    | Build ID             |
+---------+---------------+-------+------+------------+----------------------+
| racdb01 | RUNNING       | 48210 | 5000 | 18.1.1.0.0 | 18110020180201015951 |
| racdb02 | RUNNING       |  8279 | 5000 | 18.1.1.0.0 | 18110020180201015951 |
'---------+---------------+-------+------+------------+----------------------'
 
Running Inventory in All Nodes...
 
Enabling Access for Non-root Users on racdb01...
 
Adding default users to TFA Access list...
 
Summary of TFA Installation:
.------------------------------------------------------------.
|                           racdb01                          |
+---------------------+--------------------------------------+
| Parameter           | Value                                |
+---------------------+--------------------------------------+
| Install location    | /opt/oracle/tfa/racdb01/tfa_home |
| Repository location | /opt/oracle/tfa/repository       |
| Repository usage    | 0 MB out of 7427 MB                  |
'---------------------+--------------------------------------'
 
.------------------------------------------------------------.
|                           racdb02                          |
+---------------------+--------------------------------------+
| Parameter           | Value                                |
+---------------------+--------------------------------------+
| Install location    | /opt/oracle/tfa/racdb02/tfa_home |
| Repository location | /opt/oracle/tfa/repository       |
| Repository usage    | 0 MB out of 7427 MB                  |
'---------------------+--------------------------------------'
 
TFA is successfully installed...
 
Usage : /opt/12.1.0.2/grid/bin/tfactl <command> [options]
    commands:diagcollect|collection|analyze|ips|run|start|stop|enable|disable|status|print|access|purge|directory|host|receiver|set|toolstatus|uninstall|diagnosetfa|syncnodes|setupmos|upload
For detailed help on each command use:
  /opt/12.1.0.2/grid/bin/tfactl <command> -help
 
 
Moving Install log file to /opt/oracle.tfa/tfa/racdb01/tfa_home/log

Nach der Installation prüfen ob es auch läuft:

[root@racdb01 tfa]# /opt/oracle/tfa/bin/tfactl status
 
.-----------------------------------------------------------------------------------------------.
| Host    | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+---------+---------------+-------+------+------------+----------------------+------------------+
| racdb01 | RUNNING       | 48210 | 5000 | 18.1.1.0.0 | 18110020180201015951 | COMPLETE         |
| racdb02 | RUNNING       |  8279 | 5000 | 18.1.1.0.0 | 18110020180201015951 | COMPLETE         |
'---------+---------------+-------+------+------------+----------------------+------------------'

Püfen ober der Dämon für orachk aktiviert ist:

cd /opt/12.1.0.2/grid/bin/
 
/tfactl orachk -d status
 
/tfactl orachk -d info
 
./tfactl orachk -d nextautorun

Ganz deaktieren mit :

./tfactl run orachk -autostop
 
..
orachk daemon successfully stopped
..

Wieder deinstallieren

als Root User:

cd $TFA_HOME/bin
 
tfactl uninstall

Patchen

Der Installer erkennt automatisch ob bereits eine bestehende TFA Installation vorliegt und patched nach dem Aufruf die vorhandene TFA Installation automatisch

./installTFA-LINUX
TFA Installation Log will be written to File : /tmp/tfa_install_14760_2018_07_09-08_58_22.log
 
Starting TFA installation
 
TFA Version: 182100 Build Date: 201805291110
 
TFA HOME : /opt/12.1.0.2/grid/tfa/tng1db01/tfa_home
 
Installed Build Version: 121260 Build Date: 201510211538
 
TFA is already installed. Patching /opt/12.1.0.2/grid/tfa/tng1db01/tfa_home...
....
Do you want to continue with patching TFA? [Y|N] [Y]: Y
...

Konfigurieren

Das Tool ist ausgesprochen mächtig und bündelt so einige administrative Aufgaben.

Um das Setup zu vereinfachen gibt es auch einen Menü Modus:

./tfactl run menu

 Oracle Trace File Analyzer Menu

Nun ist es etwas einfacher durch die ganzen Optionen zu „browsen“.


EMail benachrichtigung aktivieren

SMTP Einstellung überprüfen:

tfactl print smtp

SMTP Einstellungen angeben:

tfactl set smtp

Email Adresse hinterlegen:

#testen
./tfactl sendmail mymonitor@logger.cn

Email Adresse hinterlegen:

 ./tfactl set notificationAddress=mymonitor@logger.cn

Im TAFA Home mit nach dem „smtp.debug.log“ suchen falls es zu Problemen kommt.

Wenn das nächste Mal ez.b. ein ORA-600 gefunden wird wird eine Benachrichtigung abgesetzt. Testweise erzeugen mit Ora-600 Eintrag für Metrik Test Zwecke im Alert Log erzeugen.


Einsatzmöglichkeiten

Alle Logfiles auswerten

cd /opt/12.1.0.2/grid/bin/
 
./tfactl analyze -comp
 
# der letzten 5 tage
 
./tfactl  analyze -last 5d

alle Logs löschen

/opt/oracle/tfa/db01/tfa_home/bin/tfactl managelogs -purge -older 10d

Summary Übersicht



Arbeiten mit dem Tool

Access Denied: Only TFA Admin can run this command

als root user:

tfactl access lsusers
 
 
# User freischalten
tfactl access enable
tfactl access add -user oracle
tfactl access add -user grid

Problem - Plattenplatz auf dem Cluster Knoten läuft voll!

Am nächsten Tag nach der Installation tritt das Problem aus das plötzlich die root Platte auf den Knoten des Clustes voll läuft.

Es fällt auf das im root Home alle zwei Stunden ein Verzeichnis „.orachk_***“ angelegt wird. Die Dateien in dem Verzeichnis verbrauchen um die 300~400 MB.

Ohne etwas weiter konfiguriert zu haben, scheint im Hintergrund nun alle zwei Stunden ein orachk Lauf durchgeführt zu werden.

Abfragen der aktuellen Einstellungen mit:

/tfactl orachk -d status
 
/tfactl orachk -d info
 
./tfactl orachk -d nextautorun

Nach Kontrolle der Doku „ORAchk - Health Checks for the Oracle Stack (Doc ID 1268927.2)“ fällt folgendes Feature ins Auge:

von What's New in ORAchk 18.3.0

.. Automatic start from TFA install

Oracle Trace File Analyzer root installations on Linux or Solaris on non-engineered systems will automatically setup and run the ORAchk daemon. … Any collections older than 2 weeks will automatically be purged. .. .. Once auto start is enabled the daemon settings can be changed as per normal and auto start can be removed any time by using orachk -autostop or tfactl run orachk -autostop ..

8-O


Problem mit tfactl rediscover "Can't locate Data/Dumper.pm"

Problem beim Start von „tfactl rediscover“:

Can't locate Data/Dumper.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /opt/oracle/tfa/db01/tfa_home/bin/../bin /opt/oracle/tfa/db01/tfa_home/bin/../bin/common /opt/oracle/tfa/db01/tfa_home/bin/../bin/modules /opt/oracle/tfa/db01/tfa_home/bin/../bin/common/exceptions) at /opt/oracle/tfa/db01/tfa_home/bin/../bin/common/tfactlshare.pm line 1166, <F1> line 1.
BEGIN failed--compilation aborted at /opt/oracle/tfa/db01/tfa_home/bin/../bin/common/tfactlshare.pm line 1166, <F1> line 1.
Compilation failed in require at /opt/oracle/tfa/db01/tfa_home/bin/../bin/discover_ora_stack.pl line 69, <F1> line 1.
BEGIN failed--compilation aborted at /opt/oracle/tfa/db01/tfa_home/bin/../bin/discover_ora_stack.pl line 69, <F1> line 1.
 
und
 
 
Can't locate Digest/MD5.pm in @INC (@INC contains: /

Lösung:

yum install perl-Data-Dumper.x86_64
yum install perl-Digest-MD5

Problem Could not find ORACLE_BASE in tfa_setup.txt

Problem :

[root@db01 bin]# ./tfactl rediscover
OSWatcher is already deployed at /opt/oracle/tfa/db01/tfa_home/ext/oswbb
Could not find ORACLE_BASE in tfa_setup.txt
<code>
 
Einfach zu tfa_setup.txt hinzufügen:
<code bash>
cd $TFA_HOME
 vi ./db01/tfa_home/tfa_setup.txt
 
ORACLE_BASE=/opt/oracle

Quellen

Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
"Autor: Gunther Pipperr"
dba/oracle_rac_12c_tfa_trace_file_analyser.txt · Zuletzt geändert: 2021/02/18 09:05 von gpipperr