Trace File Analyzer
Trace File Analyzer
Overview
OR AC LE WHI TE P AP E R | N OVEMBER 2017
Table of Contents
Introduction 1
Command Interfaces 3
Conclusion 12
It's not always easy. You've got to run the right tools, at the right time. If you're using Oracle Clusterware, then you have
to also collect from all the database nodes. You might need to use lots of different tools that you only ever use now and
again, and they each have their own syntax.
Once you've managed to get all the data, it can be huge. Only a fraction of what you've collected is useful, but who
knows which bit is relevant? That's if you were able to get everything. If you were quick enough before it was
overwritten.
In the meantime, you still have a problem. This is costing your company money and you still need to get it fixed.
Oracle Trace File Analyzer helps you perform real-time health monitoring, fault detection & diagnosis via a single
interface. It will securely consolidate all distributed diagnostic data.
Its continuously available and watching your logs for significant problems that may affect your service. If desired it can
also automatically collect the relevant diagnostics, when it sees these problems.
Oracle Trace File Analyzer knows what is relevant in log files. This allows it to trim them to the smallest size, yet still
gather everything necessary. It also collects data across cluster nodes and consolidates everything in one place. Once
done collecting it can automatically upload the collection to Oracle Support.
Using important database diagnostic tools is easy with Oracle Trace File Analyzer. It hides the complexity by providing
a single interface and syntax to them all.
This all combines to ensure you can get exactly what you need, when you need it and save your business money.
Autonomous Diagnostic Collections
The resource footprint is small. You will not usually be aware it is running. The only times Oracle Trace File Analyzer will consume
noticeable CPU are:
» When performing an inventory of diagnostic files
» During diagnostic collection
Oracle Trace File Analyzer will watch your logs for significant problems, such as internal errors like ORA-00600 or node evictions. If
detected it will:
Invoke any necessary diagnostics and collect all relevant log data at the time of a pr oblem
Trim log files around the time of the problem, so it only collects what is necessary for diagnosis
Collect and package all trimmed diagnostics. From all nodes in the cluster, consolidating everything on a single node
Store the collection in the Oracle Trace File Analyzer repository
Send you email notification of the problem and details of diagnostic collection, ready for upload to Oracle Support
You can then either use TFA to upload the collection to Oracle Support, if you can make a connection from that
environment, or transfer the collection somewhere else for upload
Oracle Trace File Analyzer uses a flood control mechanism. Repeated errors do not flood the system with automatic collections .
The identification of an event triggers the start point for a collection. 5 minutes later diagnostic gathering starts. This is to capture any
other relevant events together. If after 5 minutes events are still occurring, diagnostic collection continues to wait. It will wait for a period
of 30 seconds with no events occurring, up to a further 5 minutes.
If events are still occurring after 10 minutes, a diagnostic collection happens. A new collection point starts.
Once collection completes TFA will send email notification to relevant people, including details of where the collection results are.
Command Interfaces
The tfactl tool functions as:
Command line $ tfactl <command> Specify all command options at the command line
Shell interface $ tfactl Set and change context. Then run commands from within the shell
Menu Interface $ tfactl menu Select menu navigation options then choose the command you want to run
To set the notification email address to use for a specific ORACLE_HOME, include the OS owner in the command:
<mask_strings>
<mask_string>
<original>WidgetNode1</original>
<replacement>MyReplacementName</replacement>
</mask_string>
<mask_string>
<original>192.168.5.1</original>
<replacement>Node1-IP</replacement>
</mask_string>
</mask_strings>
On-demand Analysis and Collection
You can run Oracle Trace File Analyzer on-demand via the command line tool tfactl.
Usage:
For example:
or
This will report all errors it finds over the specified duration.
You can also use Oracle Trace File Analyzer to find all occurrences of a specific error on any node. For example, this command will
search for ORA-00600 errors:
Oracle Trace File Analyzer with database support tools bundle includes the following tools. These tools are only available when Oracle
Trace File Analyzer is downloaded from Document 1513912.1.
Tool Description
oswatcher Collects and archives OS metrics. These are useful for instance or node evictions & performance Issues. See document 301137.1 for more
details
procwatcher Automates & captures database performance diagnostics and session level hang information. See document 459694.1 for more details
oratop Provides near real-time database monitoring. See document 1500864.1 for more details.
sqlt Captures SQL trace data useful for tuning. See document 215187.1 for more details.
alertsummary Provides summary of events for one or more database or ASM alert files from all nodes
ls Lists all files Oracle Trace File Analyzer knows about for a given file name pattern, across all nodes
pstack Generates the process stack for the specified processes, across all nodes
grep Searches for a given string in the alert or trace files with a specified database
vi Opens alert or trace files for viewing a given database and file name pattern in the vi editor
tail Runs a tail on an alert or trace files for a given database and file name pattern
param Shows all database and OS parameters that match a specified pattern
dbglevel Sets and unsets multiple CRS trace levels with one command
history Shows the shell history for the tfactl shell
changes Reports changes in the system setup over a given time period. This includes database parameters, OS parameters and patches applied
managelogs Shows disk space usage and purges ADR log and trace files
ps Finds processes
Tool Description
changes Reports changes in the system setup over a given time period. This includes database parameters, OS parameters and patches applied
dir Lists all files Oracle Trace File Analyzer knows about for a given file name pattern, across all nodes
findstr Searches for a given string in the alert or trace files with a specified database
managelogs Shows disk space usage and purges ADR log and trace files
notepad Opens alert or trace files for viewing a given database and file name pattern in the notepad editor
param Shows all database and OS parameters that match a specified pattern
$ tfactl toolstatus
Each tool can be run using tfactl either in command line or shell mode.
$ tfactl
$ tfactl diagcollect
This will trim & collect all important log files updated in the past 12 hours across the whole cluster. Oracle Trace File Analyzer will store
collections in the repository directory. You can change the diagcollect timeframe with the option –last <n>h|d.
Oracle Support will often ask you to run a Service Request Data Collection (SRDC). The SRDC is dependent on the type of problem
you experienced. It is a series of many data gathering instructions aimed at diagnosing your problem. Collecting the SRDC manually
can be difficult, with many different steps required.
Oracle Trace File Analyzer can run SRDC collections for you with a single command:
If your environment can make a connection to oracle.com you can add –sr <sr_number> and Oracle Trace File Analyzer will
automatically upload the collection to your Service Request for analysis by Oracle Support. Prior to uploading, you will need to store
your My Oracle Support credentials in the Oracle Trace File Analyzer wallet. This is a onetime task and must be done by root:
$ tfactl setupmos
You can upload using the wallet, which was setup previously by root using tfactl setupmos:
You can also upload without the wallet. When uploading without the wallet tfactl prompts for the password.
tfactl upload -user user_id -sr <sr_number> <space-separated list of files to upload>
To run SRDCs use one of the Oracle privileged user accounts:
» ORACLE_HOME owner
» GRID_HOME owner
Available
Type of Problem
SRDCs
Oracle Trace File Analyzer will prompt you to enter the information it needs based on the SRDC type.
For example, this is what happens when you run the ora4031 SRDC:
$ tfactl diagcollect –srdc <srdc_type> -database <db> -from "<date> <time>" -to "<date> <time>"
or
All commands will apply cluster wide unless you specify -local to restrict to only the local node.
USEFUL USER ACCESS COMMANDS
Command Description
Oracle Trace File Analyzer makes it easy to enable and then disable the correct trace levels. Use dbglevel.
You can find the required trace level settings grouped by problem trace profiles. To set a trace profile use:
Applying standard PSUs will automatically update Oracle Trace File Analyzer. However the PSU version does not contain the res t of
the Database Support Tools Bundle updates. So if you want the latest and greatest version of Oracle Trace File Analyzer with the
database support tools bundle download it from Document 1513912.1
Upgrading is similar to first time install. As root use the installTFA<platform> script. If Oracle Trace File Analyzer is already installed, it
will update the existing installation. When already installed, a cluster upgrade does not need ssh. The cluster upgrade uses the existing
daemon secure socket communication between hosts.
$ ./installTFA<platform>
If you're not able to install as root then install as the ORACLE_HOME owner. Use the -extractto and –javahome options:
If something does go wrong, Oracle Trace File Analyzer helps you analyze and collect what you need, to fix it.
For more information and to download Oracle Trace File Analyzer see Document 1513912.1.
C ON N E C T W I TH U S
blogs.oracle.com/oracle
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the
contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
facebook.com/oracle warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any
twitter.com/oracle
means, electronic or mechanical, for any purpose, without our prior written permission.
oracle.com Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 1117