In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to use Oracle fault log collection tool TFA". In daily operation, I believe many people have doubts about how to use Oracle fault log collection tool TFA. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use Oracle fault log collection tool TFA". Next, please follow the editor to study!
Is collecting log information a "high-consuming" physical task? In many cases.
Imagine that if there was a hang failure in the database, and the database had eight nodes, we might need to collect log information for rdbms, ASM, grid, OS,osw, and so on. Even in a common two-node RAC environment, it may take a short period of time, and subsequent supplementary log collection may have to be done.
If you are not familiar with the environment and platform differences, you need to filter and collect specific log information at the time of failure, there are many nodes in the database, and there are many problems such as file control in the environment where logs need to be collected. may affect the speed and accuracy of collecting log information, and then affect the progress of problem analysis and location.
So we have a very real question, how to reduce the time consumed by log collection and improve accuracy, and spend more time on problem analysis?
In fact, Oracle has officially provided a solution-TFA (Trace File Analyzer Collector), which can help us actually implement a command to complete log collection.
Version 1 and installation
Officially list the platforms supported by TFA:
Intel Linux (Enterprise Linux, RedHat Linux, SUSE Linux)
Linux on System Z
Linux Itanium
Oracle Solaris SPARC
Oracle Solaris x86-64
AIX
HPUX Itanium
HPUX PA-RISC
All platforms require support for bash shell 3.2 and JRE 1.5 and above.
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.
The details of support and installation listed by Oracle are as follows:
TFA updates are very fast, with version 11.2.0.4 released in August 2013, with a built-in TFA tool version of 2.5.1.5. The current (October 2015) latest version is 12.1.2.5.2, and we can see the huge difference between the two versions from the help menu:
Version 2.5.1.5 help menu:
Version 12.1.2.5.2 help menu:
As you can see, version 12.1.2.5.2 adds a lot of features compared to version 2.5.1.5.
Oracle's support for TFA is also growing, and even TFA updates have been included in PSU. Taking version 11.2.0.4 as an example, we can find the following information in GI PSU Fixed List:
That is, starting from 11.2.0.4.5, a version update of TFA is included in GI PSU. TFA will be installed automatically during the installation of GI PSU.
The way 2TFA works
From an official TFA workflow chart provided by Oracle, we can clearly see how TFA works:
DBA issues the diagcollect command to start the TFA log collection process.
The local TFA sends a collection request to the TFA of the other node and starts log collection on the other node.
The local TFA also started log collection at the same time.
All TFA logs involving nodes are archived to the "master" node that initiated the diagcollect command.
DBA extracts archived TFA log information, analyzes it or submits it to SR for processing
Throughout the process, DBA only needs to execute one command and then extract the archived TFA logs.
The use of 3TFA
Take version 11.2.0.4 RAC and version 12.1.2.5.2 TFA environment as examples:
First, let's take a look at one of the simplest and most common collection commands:
This command collects various types of logs for rdbms, ASM, grid, and OS, such as alert logs, trace files, clusterware component logs, listener logs, and operating system logs. In the process of execution, the continuous log processing such as alert log and listener log is also more intelligent, which can intercept the log for a specified period of time without copy the entire log file. If the osw tool is deployed, osw logs are also collected automatically.
If you need to specify the scope of log collection, such as collecting only related logs from the database, you can use the tfactl diagcollect-database command. For more information on how to use it, please refer to the tfactl diagcollect-help output.
The latest version of TFA (12.1.2.5.2) can also collect AWR reports, as shown in the following command example:
However, in the practical application, it is found that the function of collecting AWR reports by TFA is not perfect.
For the-database parameter, the description of the help menu is:
-database Collect database logs from databases specified
Currently, the-awrhtml parameter needs to be used in conjunction with the-database parameter, but when the-database parameter is used with the-awrhtml parameter, not only to indicate the role of the database name, but also to collect database alert logs and trace files. Executing the above command will collect AWR reports for a specified period of time, as well as database alert logs and trace files.
TFA also has the function of automatic collection, which can collect some booking errors automatically. Scheduled errors and collection rules can be found in the Appendix B. Scan Events section of "Trace File Analyzer Collector User Guide". This feature is off by default and can be manually enabled using the following command:
Tfactl set autodiagcollect=ON
It is recommended that this feature be verified in a test environment before being used in a production environment.
TFA can also undertake some log analysis functions, and can realize a command to automatically analyze DB&ASM&CRS alert logs, operating system commands and some osw logs, although it is not powerful enough compared with its log collection function. A simple and general analysis command:
Tfactl analyze-since 7d
This command will analyze and find all (including DB/ASM/CRS/ACFS/OS/OSW/OSWSLABINFO) logs for ERROR-level error messages within 7 days and extract them.
The ERROR level information listed in "Trace File Analyzer Collector User Guide" is as follows:
You can also search for custom strings using the following command:
By default, the TFA tool only grants permissions to root users and grid users, and you will receive an error if you use the oracle user to execute the tfactl diagcollect command:
User oracle does not have keys to run TFA. Please check with TFA Admin (root)
It is also recommended to grant oracle users the right to use TFA for daily use. Root users can add oracle users to the list of authorized users using the following command:
Tfactl access add-user oracle
If there is a space management requirement for collecting logs, you can use the tfactl set command to set it up. The current setting can be done through the
Tfactl print config
Command, and an example of the output is as follows:
More information about TFA usage and settings can be found in the tfactl-h output and the "Trace File Analyzer Collector User Guide" documentation.
It is rare to see a description of the impact on DB or GI during the operation of TFA on MOS, mainly for the following two problems:
If you encounter problems with RAC nodes starting hang under the Linux platform and TFA is installed in the environment, you can modify the oracle-tfa.conf file according to the instructions in document 1983567.1. The problem mentioned in document 1668630.1 has been fixed in PSU above 11.2.0.4.3 and can be ignored if the PSU version is 11.2.0.4.3 or later.
At this point, the study on "how to use Oracle fault log collection tool TFA" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.