Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the tfa log collection tool in oracle

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to use the tfa log collection tool in oracle, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The TFA tool theoretically provides support for all database versions, as well as for both RAC and non-RAC databases. However, from the current documentation, there is no mention of versions prior to 10.2.0.4.

The TFA tool was first installed with the grid software by default in version 11.2.0.4, and the default installation path is the home directory of grid. The TFA tool is not included in the installation package prior to 11.2.0.4 and needs to be installed manually. Since 11.2.0.4.5, a version update of TFA has been included in GI PSU. TFA will be installed automatically during the installation of GI PSU.

Tfa command mode:

The purpose of 1.TFA is:

TFA is a tool launched on version 11.2 to collect diagnostic logs in Grid Infrastructure/RAC environment, it can use very simple commands to assist users to collect logs in RAC for further diagnosis; TFA is an oracle cluster log collector similar to diagcollection, and TFA is more powerful than diagcollection centralized and automated diagnostic information collection. TFA has the following characteristics:

1. TFA can execute a simple command on a machine to package and encapsulate the logs of all nodes.

2. TFA can "trim" logs in the process of collection to reduce the amount of data collection.

3. TFA can collect data for diagnosis "within a period of time".

4. TFA can collect and package the logs of all nodes and put them on a certain node for transmission and reading.

5. TFA can specify some components of Cluster for log collection, such as ASM, RDBMS,Clusterware

6. TFA can scan the alarm log in real time (DB Alert Logs, ASM Alert Logs, Clusterware Alert Logs, etc) according to the condition configuration.

7. TFA can automatically collect diagnostic logs according to the results of real-time scanning.

8. TFA can scan the alarm log according to the specified error

9. TFA can collect diagnostic logs based on the results of the specified error scan.

2. Installation requirements of TFA:

Platform:

Currently, TFA supports the following platforms:

Intel Linux (Enterprise Linux, RedHat Linux, SUSE Linux)

Linux Itanium

Oracle Solaris SPARC

Oracle Solaris x86-64

AIX (requires bash shell version 3.2 or higher installed)

HPUX Itanium

HPUX PA-RISC

3. Supported database versions:

TFA's current design is designed separately from RDBMS and CRS, so the design is originally designed for all versions and is not restricted by the version of RDBMS or CRS.

Download TFA Collector:

This version of the TFA and related TFA user guide can be downloaded by clicking on the relevant download link below.

TFA Collector:

Https://mosemp.us.oracle.com/epmos/main/downloadattachmentprocessorattachid=1513912.2:TFA_NOJRE&clickstream=no

TFA user's Manual:

Https://mosemp.us.oracle.com/epmos/main/downloadattachmentprocessorattachid=1513912.2:TFA_USER_GUIDE&clickstream=no

4. TFA Quick installation Guide:

Installation:

Note: before installing, make sure that JRE1.6 or later JRE is installed on your environment. If not, install JRE1.6 first.

1)。 Please log in to the system using the root user

2)。 Prepare an installation location for TFA on all nodes, be careful not to put this location in the Cluster file system

3)。 Execute installTFALite.sh on node 1 to start the installation process:

-

[root@rac1 tmp] #. / installTFALite.sh

Starting TFA installation

-

Note: the latest version of TFA has changed installTFALite.sh to installTFALite. You can execute installTFALite directly during installation, and you can specify TFA BASE and JAVA_HOME.

4)。 When prompted for the installation location, enter the TFA installation for the location selected in step 2:

-

Enter a location for installing TFA [/ opt/oracle/tfa]: / opt/oracle/tfa

Checking for available space in / opt/oracle/tfa/

-

5)。 Enter the JAVA_HOME where JRE1.6 was previously installed, and note that this location needs to be the same on all nodes:

-

Enter a Java Home that contains Java 1.6 or later: / usr/java/jre1.7.0_11

Running Auto Setup for TFA as user root...

-

6. Follow the instructions below to complete the installation:

-

Would you like to do a [L] ocal only or [C] lusterwide installation [L | l | 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] [N] Y

Installing TFA at / opt/oracle/tfa in all hosts

Discovering Nodes and Oracle resources

Checking whether CRS is up and running

Getting list of nodes in cluster

Checking ssh user equivalency settings on all nodes in cluster

Node rac2 is configured for ssh user equivalency for root user

Searching for running databases. . . . .

.

List of running databases registered in OCR

1. ORCL

. .

Checking Status of Oracle Software Stack-Clusterware, ASM, RDBMS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TFA Will be Installed on the Following Nodes

+

Install Nodes

=

Rac1

Rac2

Do you wish to make changes to the Node List [Y/y/N/n] [N]

TFA will scan the following Directories

+

. -.

| | rac2 |

+-+ +

| | Trace Directory | Resource |

+-+ +

| | / u01/app/11.2.0/grid/cfgtoollogs | INSTALL |

| | / u01/app/11.2.0/grid/crs/log | CRS |

| | / u01/app/11.2.0/grid/css/log | CRS |

| | / u01/app/11.2.0/grid/cv/log | CRS |

| | / u01/app/11.2.0/grid/evm/admin/log | CRS |

| | / u01/app/11.2.0/grid/evm/admin/logger | CRS |

| | / u01/app/11.2.0/grid/evm/log | CRS |

| | / u01/app/11.2.0/grid/install | INSTALL |

| | / u01/app/11.2.0/grid/log/ | CRS |

| | / u01/app/11.2.0/grid/network/log | CRS |

| | / u01/app/11.2.0/grid/oc4j/j2ee/home/log | CRSOC4J |

| | / u01/app/11.2.0/grid/opmn/logs | CRS |

| | / u01/app/11.2.0/grid/racg/log | CRS |

| | / u01/app/11.2.0/grid/rdbms/log | ASM |

| | / u01/app/11.2.0/grid/scheduler/log | CRS |

| | / u01/app/11.2.0/grid/srvm/log | CRS |

| | / u01/app/oraInventory/ContentsXML | INSTALL |

| | / u01/app/oraInventory/logs | INSTALL |

| | / u01/app/oracle/cfgtoollogs | CFGTOOLS |

| | / u01/app/oracle/diag/asm/+asm/+ASM2/trace | ASM |

| | / u01/app/oracle/diag/rdbms/orcl/ORCL2/trace | RDBMS |

| | / u01/app/oracle/diag/tnslsnr | TNS |

| | / u01/app/oracle/diag/tnslsnr/rac2/listener/trace | TNS |

| | / u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs | INSTALL |

| | / u01/app/oracle/product/11.2.0/dbhome_1/install | INSTALL |

'- + -'

. -.

| | rac1 |

+-+ +

| | Trace Directory | Resource |

+-+ +

| | / u01/app/11.2.0/grid/cfgtoollogs | INSTALL |

| | / u01/app/11.2.0/grid/crs/log | CRS |

| | / u01/app/11.2.0/grid/css/log | CRS |

| | / u01/app/11.2.0/grid/cv/log | CRS |

| | / u01/app/11.2.0/grid/evm/admin/log | CRS |

| | / u01/app/11.2.0/grid/evm/admin/logger | CRS |

| | / u01/app/11.2.0/grid/evm/log | CRS |

| | / u01/app/11.2.0/grid/install | INSTALL |

| | / u01/app/11.2.0/grid/log/ | CRS |

| | / u01/app/11.2.0/grid/network/log | CRS |

| | / u01/app/11.2.0/grid/oc4j/j2ee/home/log | CRSOC4J |

| | / u01/app/11.2.0/grid/opmn/logs | CRS |

| | / u01/app/11.2.0/grid/racg/log | CRS |

| | / u01/app/11.2.0/grid/rdbms/log | ASM |

| | / u01/app/11.2.0/grid/scheduler/log | CRS |

| | / u01/app/11.2.0/grid/srvm/log | CRS |

| | / u01/app/oraInventory/ContentsXML | INSTALL |

| | / u01/app/oraInventory/logs | INSTALL |

| | / u01/app/oracle/cfgtoollogs | CFGTOOLS |

| | / u01/app/oracle/diag/asm/+asm/+ASM1/trace | ASM |

| | / u01/app/oracle/diag/rdbms/orcl/ORCL1/trace | RDBMS |

| | / u01/app/oracle/diag/tnslsnr | TNS |

| | / u01/app/oracle/diag/tnslsnr/rac1/listener/trace | TNS |

| | / u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs | INSTALL |

| | / u01/app/oracle/product/11.2.0/dbhome_1/install | INSTALL |

'- + -'

Do you wish to change the Trace Directory List [Y/y/N/n] [N]

Installing TFA on rac1

Installing TFA on rac2

TFA is running

Successfully added host: rac2

.

| | Host | Status of TFA | PID | |

+-+

| | rac1 | RUNNING | 11685 | |

| | rac2 | RUNNING | 5081 | |

'- + -'

Setting TFA cookie in all nodes

Successfully set cookie=77411b8fff446d2954d5c080225052ac

TFA Cookie: 77411b8fff446d2954d5c080225052ac

Summary of TFA Installation

. -.

| | rac1 |

+-- +

| | Parameter | Value |

+-- +

| | Install location | / opt/oracle/tfa/tfa_home |

| | Repository location | / opt/oracle/tfa/tfa_home/repository |

| | Repository usage | 0 MB out of 10240 MB |

'- +--'

. -.

| | rac2 |

+-- +

| | Parameter | Value |

+-- +

| | Install location | / opt/oracle/tfa/tfa_home |

| | Repository location | / opt/oracle/tfa/tfa_home/repository |

| | Repository usage | 0 MB out of 10240 MB |

'- +--'

TFA is successfully installed..

-

5.TFA start and stop:

TFA runs on init on Linux and Unix platforms, so this will start automatically when the server starts.

By default, we name this script init.tfa.

Location depends on different platforms, such as:

Linux and Solaris: / etc/init.d/init.tfa

Aix: / etc/init.tfa

HP-UX: / sbin/init.d/init.tfa

The following imperative is used as an example on the Linux platform:

Start:

# / etc/init.d/init.tfa start

Stop:

# / etc/init.d/init.tfa stop

Restart:

# / etc/init.d/init.tfa restart

6. Collect diagnostics manually:

We control the TFA to collect the diagnostic information we expect by calling the command of tfactl and the diagnostic verb diagnostic. Tfactl provides users with a variety of optional modes to collect, for example, collecting log information within a period of time to reduce the amount of logs we collect.

You can see the commands for specific operations in the following ways:

# $TFA_HOME/bin/tfactl diagcollect-h

Usage: / u01/app/tfa/tfa_home/bin/tfactl diagcollect [- all |-database |-asm |-crs |-os |-install |-node |-tag]

[- since |-from-to |-for]

[- copy |-nocopy] [- symlink] [- notrim]

Options:

-all Collect logs of all types

-crs Collect only CRS logs

-asm Collect only ASM logs

-database Collect only database logs from databases specified

-os Collect only OS files

-install Collect only INSTALL files

-node Specify comma separated list of host names for collection.

-copy Copy back the zip files to master node from all nodes

-nocopy Does not copy back the zip files to master node from all nodes

-notrim Does not trim the files collected

-symlink This option should be used with-for.

Creates symlinks for files which are updated during the input time.

-since Files from past 'n' [d] ays or 'n' [h] ours

-from From time

-to To time

-for Specify an incident time.

-z Output file name

-tag Enter a tag for the zip (s) created

In the following example, we used-all to collect diagnostic logs of all types using TFA, from midnight to 13:00 on January 21. This command starts the specified diagnostics on all cluster nodes collected in the background, compresses it into a zip file and places it in the TFA_HOME of each node:

# $TFA_HOME/bin/tfactl diagcollect-all-from "Jan/21/2013"-to "Jan/21/2013 13:00:00"

Time: Jan/21/2013

Valid pattern

Month: 1

Time: Jan/21/2013 13:00:00

Valid pattern

Month: 1

Rac1:startdiagcollection:-database-asm-crs-os-install-from Jan/21/2013-to Jan/21/2013 13:00:00-z Mon_Jan_21_11_52_20_EST_2013-node all-copy

Logs are collected to:

/ opt/oracle/tfa/tfa_home/repository/rac1.Mon_Jan_21_11_52_20_EST_2013.zip

/ opt/oracle/tfa/tfa_home/repository/rac2.Mon_Jan_21_11_52_20_EST_2013.zip

7. Diagnosing problems or uploads diagnostic information to Oracle Support engineers:

No matter which method we use to collect diagnostic information, the log information will be packaged and placed in the directory of $TFA_HOME/repository so that you can upload the file to Oracle's support engineer.

The above is all the contents of the article "how to use the tfa Log Collection tool in oracle". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report