9.3.2.1 tfactl analyze
Use the tfactl analyze
command to obtain analysis of your system by parsing the database, Oracle Automatic Storage Management (Oracle ASM), and Oracle Grid Infrastructure alert logs, system message logs, OSWatcher Top, and OSWatcher Slabinfo files.
Filter the output of the command by component, error type, and time.
With the tfactl analyze
command, you can choose from the following types of log file analysis:
-
Show the most common messages within the logs: This analysis provides a quick indication of where larger issues are occurring. Oracle Trace File Analyzer takes important messages out of the alert logs and strips the extraneous information from the log messages, organizes the most commonly occurring messages, and displays them in the order from most common to least common. By default, Oracle Trace File Analyzer analyzes error messages, but you can specify a particular type of message for analysis.
-
Search for text within log messages: This is similar to using the
grep
utility to search, only faster because Oracle Trace File Analyzer checks the time of each message and only shows those matching the last x number of minutes or any interval of time. -
Analyze the Oracle OSWatcher log statistics: Oracle Trace File Analyzer reads the various statistics available in the
OSWatcher
log files and provides detailed analysis showing first, highest, lowest, average, and the last three readings of each statistic. Choose any interval down to a specific minute or second. Oracle Trace File Analyzer optionally provides the original data from theOSWatcher
logs for each value reported on (data point).
Syntax
tfactl analyze
[-search "pattern"]
[-comp db|asm|crs|acfs|os|osw|oswslabinfo|oratop|all]
[-type error|warning|generic]
[-last n[h|d]]
[-from time]
[-to time]
[-for time]
[-node all|local|n1,n2,...]
[-verbose]
[-o file]
[timeline [-l n] f1 f2...fn]
[-examples]
Parameters
Table 9-79 tfactl analyze Command Parameters
Parameter | Description |
---|---|
|
Searches for a pattern enclosed in double quotation marks ("") in system and alert logs within a specified time range. This parameter supports both case-sensitive and case-insensitive search in alert and system message files across the cluster within the specified filters. Default is case insensitive. If you do not specify the Oracle Trace File Analyzer displays message counts grouped by type
( |
|
Select which components you want Oracle Trace File Analyzer to analyze. Default is
When |
|
Select what type of messages Oracle Trace File Analyzer analyzes. Default is
|
|
Specify an amount of time, in hours or days, before current time that you want Oracle Trace File Analyzer to analyze. |
|
Specify a time interval, using the Supported time
formats:
Or, a specific time using the Supported time
formats:
|
|
Specify a comma-separated list of host names. Use |
|
Displays verbose output. |
|
Specify a file where Oracle Trace File Analyzer writes the output instead of displaying on the screen. |
|
Displays timeline for the specified trace or alert log files.
Debug levels:
|
|
Specify this parameter to view |
-type Parameter Arguments
The tfactl analyze
command classifies all the messages into different categories when you specify the -type
parameter. The analysis component provides count of messages by the message type you configure and lists all unique messages grouped by count within specified filters. The message type patterns for each argument are listed in the following table.
Table 9-80 tfactl analyze -type Parameter Arguments
Argument | Description |
---|---|
error |
Error message patterns for Oracle Database and Oracle ASM alert logs:
Error message patterns for Oracle Grid Infrastructure alert
logs:
|
warning |
Warning message patterns for database and Oracle ASM alert logs:
|
generic |
Any messages that do not match any of the preceding patterns. |
oratop options
-comp oratop
: -database dbname oratop options logon
Table 9-81 tfactl analyze -comp oratop options
Argument | Description |
---|---|
|
Specify the name of the Oracle Database to run |
|
Default is Specify a different user using,
Connect Identifier:
|
Table 9-82 oratop options
Argument | Description |
---|---|
|
Specify the batch mode. Default: text-based user interface. |
|
Specify the maximum number of iterations. |
|
Writes console output to a file (in batch mode). |
|
Specify the interval delay in seconds. Default: 5 seconds. |
|
Real-time (RT) wait events. (sec 3, default: Cumulative) |
|
Specify
|
|
Specify the SQL mode (section 4). Default: process mode. |
|
Specify the detailed format (132 columns). Default: standard (80 columns). |
|
Displays |
Examples
The following command examples demonstrate how to use Oracle Trace File Analyzer to search collected data:
-
tfactl analyze -search "error" -last 2d
Oracle Trace File Analyzer searches database alert and system log files collected since the past two days for messages that contain case-insensitive string "error".
-
tfactl analyze -comp os -for "Jul/01/2021 11" -search "."
Oracle Trace File Analyzer displays all system log messages collected at the date and time specified, that is, July 1, 2021 at 11 am.
-
tfactl analyze -search "/ORA-/c" -comp db -last 2d
Oracle Trace File Analyzer searches database alert and system log files collected since the past two days for messages that contain case-sensitive string "ORA-".
-
tfactl analyze -search "ORA-00600" -last 8h
Oracle Trace File Analyzer searches database alert and system log files collected since the last eight hours for the messages that contain case-insensitive string "ORA-00600".
The following command examples demonstrate how to use Oracle Trace File Analyzer to analyze collected data:
-
tfactl analyze -last 5h
Oracle Trace File Analyzer displays a summary of events from all alert logs and system messages collected since the past five hours.
-
tfactl analyze -comp os -last 1d
Oracle Trace File Analyzer displays a summary of events from system messages collected since the past day.
-
tfactl analyze -last 1h -type generic
Oracle Trace File Analyzer analyzes all generic messages collected since the last hour.
-
tfactl analyze -type generic -last 1d
Oracle Trace File Analyzer analyzes all generic messages collected since the past day.
-
tfactl analyze -last 1d -node $HOSTNAME
Oracle Trace File Analyzer displays a summary of events for the past day from all database alert and system log files collected on the node specified.
-
tfactl analyze -database $ORACLE_SID
Oracle Trace File Analyzer displays a summary of events from all database alert and system log files for the database instance specified.
The following command examples demonstrate how to use Oracle Trace File Analyzer to
analyze OSWatcher
Top and Slabinfo:
-
tfactl analyze -comp osw -last 6h
Oracle Trace File Analyzer displays
OSWatcher
Top summary for the past six hours. -
tfactl analyze -comp oswslabinfo -from "2021-07-01" -to "2021-07-03"
Oracle Trace File Analyzer displays
OSWatcher
Slabinfo summary for time period specified.