4.3 Using On-Demand Diagnostic Collections

Run Oracle Trace File Analyzer on demand using tfactl command-line tool.

4.3.1 Collecting Diagnostics and Analyzing Logs On-Demand

The tfactl command uses a combination of different Oracle Database support tools when it performs analysis.

The tfactl command enables you to access Oracle Database support tools using common syntax. Using common syntax hides the complexity of the syntax differences between the tools.

Use the Oracle Trace File Analyzer tools to perform analysis and resolve problems. If you need more help, then use the tfactl command to collect diagnostics for Oracle Support.

Oracle Trace File Analyzer does the following:

  • Collects all relevant log data from a time of your choosing.

  • Trims log files to collect only what is necessary for diagnosis.

  • Packages all diagnostics on the node where tfactl was run from.

Figure 4-4 On-Demand Collections

Description of Figure 4-4 follows
Description of "Figure 4-4 On-Demand Collections"

4.3.2 Viewing System and Cluster Summary

The summary command gives you a real-time report of system and cluster status.

Syntax

tfactl summary [options]

For more help use:
tfactl summary -help

4.3.3 Investigating Logs for Errors

Use Oracle Trace File Analyzer to analyze all of your logs across your cluster to identify recent errors.

  1. To find all errors in the last one day:
    $ tfactl analyze –last 1d
  2. To find all errors over a specified duration:
    $ tfactl analyze –last 18h
  3. To find all occurrences of a specific error on any node, for example, to report ORA-00600 errors:
    $ tfactl analyze -search “ora-00600" -last 8h

4.3.4 Analyzing Logs Using the Oracle Database Support Tools

The Oracle Database support tools bundle is available only when you download Oracle Trace File Analyzer from My Oracle Support note 2550798.1.

Oracle Trace File Analyzer with Oracle Database support tools bundle includes the following tools:

Table 4-5 Tools Included in Linux and UNIX

Tool Description

orachk or exachk

Provides health checks for the Oracle stack.

Oracle Autonomous Health Framework installs either Oracle EXAchk for engineered systems or Oracle ORAchk for all non-engineered systems.

For more information, see My Oracle Support notes 1070954.1 and 2550798.1.

oswatcher (oswbb)

Collects and archives operating system metrics. These metrics are useful for instance or node evictions and performance Issues.

For more information, see My Oracle Support note 301137.1.

procwatcher (prw)

Automates and captures database performance diagnostics and session level hang information.

For more information, see My Oracle Support note 459694.1.

oratop

Provides near real-time database monitoring.

For more information, see My Oracle Support note 1500864.1.

alertsummary

Provides summary of events for one or more database or Oracle ASM alert files from all nodes.

ls

Lists all files that 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.

summary

Provides high-level summary of the configuration.

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 operating system parameters that match a specified pattern.

dbglevel

Sets and unsets multiple Oracle Clusterware 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. The report includes database parameters, operating system parameters, and the patches that are applied.

calog

Reports major events from the cluster event log.

events

Reports warnings and errors in the logs.

managelogs

Shows disk space usage and purges Automatic Diagnostic Repository (ADR) log and trace files.

ps

Finds processes.

triage

Summarizes oswatcher or exawatcher data.

Table 4-6 Tools Included in Microsoft Windows

Tool Description

calog

Reports major events from the cluster event log.

changes

Reports changes in the system setup over a given time period. The report includes database parameters, operating system parameters, and patches applied.

dir

Lists all files Oracle Trace File Analyzer knows about for a given file name pattern across all nodes.

events

Reports warnings and errors seen in the logs.

findstr

Searches for a given string in the alert or trace files with a specified database.

history

Shows the shell history for the tfactl shell.

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 operating system parameters that match a specified pattern.

summary

Provides high-level summary of the configuration.

tasklist

Finds processes.

To verify which tools you have installed:

$ tfactl toolstatus

You can run each tool using tfactl either in command line or shell mode. To run a tool from the command line:

$ tfactl run tool

The following example shows how to use tfactl in shell mode. Running the command starts tfactl, connects to the database MyDB, and then runs oratop:

$ tfactl
tfactl > database MyDB
MyDB tfactl > oratop

4.3.5 Searching Oracle Trace File Analyzer Metadata

You can search all metadata stored in the Oracle Trace File Analyzer index using tfactl search -showdatatypes|-json [json_details].

You can search for all events for a particular Oracle Database between certain dates.

For example, on Linux systems:
tfactl search -json 
'{
  "data_type":"event",
  "content":"oracle",
  "database":"rac11g",
  "from":"01/20/2017 00:00:00",
  "to":"12/20/2018 00:00:00"
 }'
For example, on Linux and Windows systems:
tfactl search -json
"{
   \"data_type\":\"event\",
   \"content\":\"oracle\",
   \"database\":\"rac11g\",
   \"from\":\"01/20/2017 00:00:00\",
   \"to\":\"12/20/2018 00:00:00\"
}"

To list all index events on Linux, AIX, and Solaris systems: tfactl search -json '{"data_type":"event"}'

To list all index events on Windows systems: tfactl search -json "{\"data_type\":\"event\"}"

To list all available datatypes: tfactl search -showdatatypes

4.3.6 Oracle Trace File Analyzer Service Request Data Collections (SRDCs)

Oracle Trace File Analyzer Service Request Data Collections (SRDCs) enable you to quickly collect the right diagnostic data.

To perform Service Request Data Collections:

$ tfactl diagcollect -srdc srdc_name

Running the command trims and collects all important log files updated in the past n hours across the whole cluster. The default number of hours for log collection varies from SRDC to SRDC. You can change the diagcollect timeframe with the –last n h|d option.

Oracle Support often asks you to run a Service Request Data Collection (SRDC). The SRDC depends on the type of problem that you experienced. An SRDC 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 with a single command:

$ tfactl diagcollect 
[-srdc srdc_profile] 
[–sr sr_number]
[-tag tagname] 
[-z filename] 
[-last nh|d | -from time -to time | -for date] 
[-database database]
Option Description

[-srdc srdc_profile]

Specify the SRDC profile.

-tag description

Use this parameter to create a subdirectory for the resulting collection in the Oracle Trace File Analyzer repository.

-z file_name

Use this parameter to specify an output file name.

[-last nh|d | -from time -to time | -for date]

  • Specify the -last parameter to collect files that have relevant data for the past specific number of hours (h) or days (d). By default, using the command with this parameter also trims files that are large and shows files only from the specified interval.

    You can also use -since, which has the same functionality as -last. This option is included for backward compatibility.

  • Specify the -from and -to parameters (you must use these two parameters together) to collect files that have relevant data during a specific time interval, and trim data before this time where files are large.

    Supported time formats:

    "Mon/dd/yyyy hh:mm:ss"

    "yyyy-mm-dd hh:mm:ss"

    "yyyy-mm-ddThh:mm:ss"

    "yyyy-mm-dd"

  • Specify the -for parameter to collect files that have relevant data for the date specified. The files tfactl collects will have timestamps in between which the time you specify after -for is included. No data trimming is done for this option.

    Supported time formats:

    "Mon/dd/yyyy"

    "yyyy-mm-dd"

Note:

If you specify both date and time, then you must enclose both the values in double quotation marks (""). If you specify only the date or the time, then you do not have to enclose the single value in quotation marks.

-database database

Specify the name of the database.

Note:

To upload collections to the SR as part of diag collection:

If you have already set MOS configuration using the tfactl setupmos command, then you can use the -sr option along with the diag collection command. Note that tfactl setupmos is supported only in versions earlier than 20.2.

If you have not set MOS configuration using the tfactl setupmos command, then set up MOS configuration using the new generic command, ahfctl setupload -name mos -type https and follow the instructions.

For example: tfactl diagcollect -srdc srdc_type –sr sr_number

To run SRDCs, use one of the Oracle privileged user accounts:

  • ORACLE_HOME owner
  • GRID_HOME owner

Table 4-7 One Command Service Request Data Collections

Available SRDCs Type of Problem Collection Scope Auto Collection

ahf

Oracle Orachk and Oracle Exachk problems (to be run after running with -debug)

Local only

No

avs

Audit Vault Server related files

Cluster-wide

No

crs

Collect crs traces

Cluster-wide

No

crsasm

ASM CRS-related problems

Cluster-wide

No

crsasmcell

ASM CRS CELL-related problems

Cluster-wide

No

dbacl

Problems with Access Control Lists (ACLs)

Local only

No

dbaqgen

Problems in an Oracle Advanced Queuing environment

Local only

No

dbaqmon

Queue Monitor (QMON) problems

Local only

No

dbaqnotify

Notification problems in an Oracle Advanced Queuing environment

Local only

No

dbaqperf

Performance problems in an Oracle Advanced Queuing environment

Local only

No

dbaqpurge

Non-purged messages in an Oracle Advanced Queuing environment problems

Local only

No

dbasm

Oracle Database storage problems

Local only

No

dbaudit

Standard information for Oracle Database auditing

Local only

No

dbaum

AUM: Checklist of Evidence to Supply (Doc ID 1682741.1)

Local only

No

dbaumwaitevents

Wait Events related to Undo: Checklist of Evidence to Supply (Doc ID 1682723.1)

Local only

No

dbawrspace

Oracle Database Automatic Workload Repository (AWR) space problems

Local only

No

dbbeqconnection

Bequeath Connection Issues: Checklist of Evidence to Supply (Doc ID 1928047.1)

Local only

No

dbcorrupt

Generic Oracle Database corruption

Local only

No

dbdataguard

Data Guard problems including Broker

Local only

No

dbawrspace

Excessive SYSAUX space is used by the Automatic Workload Repository (AWR)

Local only

No

dbdatapatch

Datapatch problems

Local only

No

dbddlerrors

DDL Errors: Checklist of Evidence to Supply (Doc ID 2383662.1)

Local only

No

dbemon

Event Monitor (EMON) problems

Local only

No

dbenqdeq

Collect standard information for Advanced Queueing problems using TFA Collector (recommended) or manual steps

Local only

No

dbexpdp

dbexpdpapi

dbexpdpperf

dbexpdptts

Oracle Data Pump Export (expdp)

Local only

No

dbfs

Oracle Automatic Storage Management (Oracle ASM) / Database File System (DBFS) / Direct NFS / Oracle Advanced Cluster File System (Oracle ACFS) problems

Local only

No

dbfra

Fast Recovery Area, also known as Flash Recovery Area problems

Local only

No

dbggclassicmode

dbggintegratedmode

Oracle GoldenGate

Local only

No

dbhang

Oracle Database hang problems

Local only

No

dbhangperflite

Oracle Database performance and hang problems

Local only

No

dbimpdp

dbimpdpperf

Oracle Data Pump Import (impdp)

Local only

No

dbimpdpperf

Data Pump Import performance problems

Local only

No

dbinstall

dbupgrade

dbpreupgrade

Oracle Database install / upgrade problems

Local only

No

dbparameters

Oracle Database single instance shutdown problems

Local only

No

dbparameterfiles

Parameter Files: Checklist of Evidence to Supply (Doc ID 1914153.1)

Local only

No

dbpartition

Create or maintain partitioned table, subpartitioned table, and index problems

Local only

No

dbpartitionperf

Slow Create, Alter, or Drop commands against partitioned table or index

Local only

No

dbpatchinstall

dbpatchconflict

Oracle Database patching problems

Local only

No

dbperf

Oracle Database performance problems

Cluster-wide

No

dbperf_and_hang

Oracle Database performance and hang problems on FASaaS environments

Local only

No

dbplugincompliance

Enterprise Manager compliance related issues

Local only

No

dbpreupgrade

Oracle Database preupgrade problems

Local only

No

dbprocmgmt

Generic Process Management and Related Issues: Checklist of Evidence to Supply (Doc ID 2500734.1)

Local only

No

dbrac

Oracle RAC-related data collection for Oracle Clusterware and Oracle ASM problems

Local only

No

dbracinst

Oracle RAC-related data collection for Oracle Database problems

Local only

No

dbracperf

Oracle RAC-related performance problems

Cluster-wide No

dbresmgr

Oracle Database problems related to Resource Manager

Local only

No

dbrman

dbrmanperf

Recovery Manager (RMAN) problems

Local only

No

dbscn

System Change Number (SCN)

Local only

No

dbshutdown

dbstartup

Oracle Database startup or shutdown problems

Local only

No

dbslowddl

Slow DDL: Checklist of Evidence to Supply

Local only

No

dbspacewait

Space Related Wait Events and Performance Issues : Checklist of Evidence to Supply (Doc ID 2560286.1)

Local only

No

dbspatialexportimport

Oracle Spatial export or import problems

Local only

No

dbspatialinstall

Oracle Spatial installation problems

Local only

No

dbspatialperf

Oracle Spatial performance problems

Local only

No

dbspatialupgrade

Oracle Spatial upgrade problems

Local only

No

dbspatialusage

Oracle Spatial usage problems

Local only

No

dbsqlperf

SQL performance problems

Local only

No

dbstandalonedbca

Oracle Database Configuration Assistant (Oracle DBCA) problems

Local only

No

dbstoragestructuregeneric

Storage structure related diagnosis

Local only

No

dbtablespacegeneric

Generic Tablespace and Segment Management: Checklist of Evidence to Supply (Doc ID 2560291.1)

Local only

No

dbtde

Transparent Data Encryption (TDE) problems

Local only

No

dbtextindex

Oracle Text problems

Local only

No

dbtextissue

Oracle Text installation problems - 12c.

Local only

No

dbtextupgrade

dbtextinstall

Oracle Text version 12.1.0.1 and later upgrade problems

Local only

No

dbunixresources

Oracle Database resource problems

Local only

No

dbvault

Collect standard information for Database Vault

Local only

No

dbwindowsresources

Oracle Database on Microsoft Windows resources: Checklist of Evidence to Supply

Local only

No

dbwinservice

OracleService on Microsoft Windows: Checklist of Evidence to Supply (Doc ID 1918781.1)

Local only

No

dbxdb

XDB installation or invalid object problems

Local only

No

dbxdbgeneric

XDB installation and invalid object problems

Local only

No

dbxdbupgrade

XDB installation and invalid object problems in 12c and above

Local only

No

dnfs

XDB upgrade problems

Local only

No

emagentgeneric

Collect trace/log information for Enterprise Manager Management Agent generic problems

Oracle Management Service (OMS) and Agent

No

emagentpatching

Enterprise Manager failures during agent patching

Oracle Management Service (OMS) and Agent

No

emagentperf

Enterprise Manager 13c Agent performance problems

Agent

No

emagentssl

Enterprise Manager Agent SSL configuration issues

Oracle Management Service (OMS) and Agent

No

emagentstartup

Enterprise Manager 13c Agent startup problems

Agent

No

emagentunreach

Enterprise Manager 13c Agent unreachable errors or status

Agent

No

emagentupload

Enterprise Manager 13c Agent upload errors

Agent

No

emagtpatchdeploy

Enterprise Manager 13c Agent patch deployment problems

Oracle Management Service (OMS) and Agent

No

emagtupginst

Collecting diagnostic data for Enterprise Manager 13c Agent installation, upgrade, or deployment problems

Agent

No

emagtupgpatch

Enterprise Manager 13c Agent upgrade, local installation, or patching problems.

Oracle Management Service (OMS) and Agent

No

emauthldap

Enterprise Manager authentication using LDAP provider issues

Oracle Management Service (OMS)

No

emblackout

Enterprise Manager blackout issues

Oracle Management Service (OMS) and Agent

No

emcliadd

emclusdisc

emdbsys

emgendisc

Enterprise Manager target discovery or add problems

Oracle Management Service (OMS) and Agent

Agent

Oracle Management Service (OMS) and Agent

Oracle Management Service (OMS) and Agent

No

emcomm

Enterprise Manager communication information between Oracle Management Service (OMS) and Agent

Oracle Management Service (OMS) and Agent

No

emdbaasdeploy

Database As A Service (DBaaS): Collect trace or log information for failures during DBaaS deployment.

Oracle Management Service (OMS) and remote DBaaS deployment server

No

emdebugon

emdebugoff

Enterprise Manager debug log collection

Run emdebugon, reproduce the problem then run emdebugoff, which disables debug again and collects debug logs

Oracle Management Service (OMS) or Agent

No

emfleetpatching

Enterprise Manager Fleet Maintenance Patching problems

Oracle Management Service (OMS) and Agent

No

emjobs

Enterprise Manager all job related issues

Oracle Management Service (OMS)

No

emmetricalert

Enterprise Manager general metrics page or threshold problems

Agent

No

emnotif

Enterprise Manager incident rules and notification issues

Oracle Management Service (OMS)

No

emomsfailstart

Enterprise Manager Oracle Management Service (OMS) startup failures

Oracle Management Service (OMS)

No

emomscrash

Enterprise Manager Oracle Management Service (OMS) crash problems

Oracle Management Service (OMS)

No

emomsheap

Enterprise Manager Java heap usage or performance problems

Oracle Management Service (OMS)

No

emomshungcpu

Enterprise Manager Oracle Management Service (OMS) crash, restart or performance problems

Oracle Management Service (OMS)

No

emomspatching

Enterprise Manager failures during Oracle Management Service (OMS) patching

Oracle Management Service (OMS)

No

emomsssl

Enterprise Manager Oracle Management Service (OMS) SSL configuration issues

Oracle Management Service (OMS)

No

emomsupginst

Enterprise Manager Oracle Management Service (OMS) installation, upgrade, and patching

Local only

No

empatchplancrt

Enterprise Manager patch plan creation problems

Oracle Management Service (OMS) and Agent

No

emprocdisc

Oracle Database, Listener, or ASM target is not discovered or detected by the discovery process

Local only

No

emtbsmetric

Enterprise Manager tablespace usage metric problems

Local only (on Enterprise Manager Agent target)

No

emwlsssl

Enterprise Manager WebLogic Server (WLS) SSL configuration issues

Local only

No

emdbrat

Enterprise Manager RAT collection issues

Target replay/capture database

No

emcreds

Enterprise Manager credential issues

Oracle Management Service (OMS) and Agent

No

emdbpluginstatus

Enterprise Manager DB plugin issues

Oracle Management Service (OMS) and/or Agent

No

emdeployoms

Enterprise Manager deploying additional Oracle Management Service (OMS) issues

Oracle Management Service (OMS)

No

emomsmigration

Enterpriser Manager Oracle Management Service (OMS) migration/cloning issues

Oracle Management Service (OMS)

No

esexalogic

Oracle Exalogic full Exalogs data collection information

Local only

No

exadata

Collect Oracle Exadata information

Local only

No

exservice

Oracle Exadata: Storage software service or offload server service problems

Local only

No

exsmartscan

Oracle Exadata: Smart Scan not working problems

Local only

No

generic

Fallthrough SRDC for Oracle Database error

Local only

No

gg_abend

Oracle GoldenGate covering both classic and microservices implementations

Local only

No

ggintegratedmodenodb

Oracle GoldenGate extract/replicate abends problems

Local only

No

gridinfra

Oracle RAC-related data collection for Oracle Clusterware problems

Local only

No

gridinfrainst

Oracle RAC upgrade and patching problems

Local only

No

instterm

Collect traces for the following ORA errors:
  • ORA-00469
  • ORA-00470
  • ORA-00480
  • ORA-00490
  • ORA-00491
  • ORA-00492
  • ORA-00493
  • ORA-00495
  • ORA-00496
  • ORA-00497
  • ORA-00498

Local only

No

internalerror

Other internal Oracle Database errors

Local only

No

listener_services

Listener errors: TNS-12516 / TNS-12518 / TNS-12519 / TNS-12520

Local only

No

naming_services

Naming service errors: TNS-12154 / TNS-12528

Local only

No

ORA-00020

ORA-00060

ORA-00494

ORA-00600

ORA-00700

ORA-01031

ORA-01555

ORA-01578

ORA-01628

ORA-03137

ORA-04020

ORA-04021

ORA-04030

ORA-04023

ORA-04031

ORA-04063

ORA-07445

ORA-08102

ORA-08103

ORA-22924

ORA-27300

ORA-27301

ORA-27302

ORA-30036

ORA Errors

Local only

Only the following SRDCs:
  • ORA-00600
  • ORA-04030
  • ORA-04031
  • ORA-04021
  • ORA-07445
  • ORA-01578

ORA-01000

Open Cursors problems

Local only

No

ORA-00018

ORA-00018 or sessions parameter problems

Local only

No

ORA-12751

ORA-12751 collection errors

Local only

No

ORA-25319

Collect information for troubleshooting ORA-25319 error in an Advanced Queuing Environment

ORA-25319 problems in an Oracle Advanced Queuing Environment

Local only

No

ORA-00227

Collect information for troubleshooting Control File block corruption reported by error ORA-00227

Local only

No

privsroles

Data Collection for privileges and roles

Local only

No

xdb600

Diagnostic data collection for XDB ORA-00600 and ORA-07445 internal rrror issues using TFA Collector

Local only

No

zlgeneric

Zero Data Loss Recovery Appliance (ZDLRA) problems

Local only

No

For more information about SRDCs, run tfactl diagcollect –srdc -help.

Note:

When you run the tfactl diagcollect command to query an ora-* error event, for example, tfactl diagcollect -srdc ora-600, AHF lists all ora-* error events without filtering. This is because of generic event mapping for all ORA-* error events in the srdc_dbrac.xml file.

The types of information that the SRDCs collect varies for each type, for example, the following table lists and describes what the SRDCs collect for each type.

Table 4-8 SRDC collections

Command What gets collected

$ tfactl diagcollect –srdc ORA-04031

  • Incident Packaging Service (IPS) package
  • Patch listing
  • Automatic Workload Repository (AWR) report
  • Memory information

$ tfactl diagcollect –srdc dbperf

  • Automatic Database Diagnostic Monitor (ADDM) report
  • Automatic Workload Repository (AWR) for good period and problem period
  • Automatic Workload Repository (AWR) Compare Period report
  • Active Session History (ASH) report for good and problem period
  • OSWatcher
  • Incident Packaging Service (IPS) package (if there are any errors during problem period)
  • Oracle ORAchk (performance-related checks)

Oracle Trace File Analyzer prompts you to enter the information required based on the SRDC type.

For example, when you run ORA-4031 SRDC:

$ tfactl diagcollect –srdc ORA-04031

Oracle Trace File Analyzer:

  1. Prompts to enter event date, time, and database name.
  2. Scans the system to identify recent events in the system (up to 10).
  3. Proceeds with diagnostic collection after you choose the relevant event.
  4. Identifies all the required files.
  5. Trims all the files where applicable.
  6. Packages all data in a zip file ready to provide to support.

You can also run an SRDC collection in non-interactive silent mode. Provide all the required parameters up front as follows:

$ tfactl diagcollect –srdc srdc_type -database db -from "date time" -to "date time"

4.3.7 Diagnostic Upload

Diagnostic upload eliminates the need for different set of commands to upload Oracle ORAchk, Oracle EXAchk, and Oracle Trace File Analyzer diagnostic collections to AHF Service, database, and Oracle Support.

Diagnostic upload enables you to manage configurations of different types of uploads in a generic way. Through ahfctl command-line interface, you use generic upload commands to set, get, unset, and check configurations. Configurations are uniquely identified using configuration name so that you can pass the configuration name in command-line to perform upload and other operations.

AHF synchronizes the configuration automatically across the cluster nodes. If you find any sync issues, then run the tfactl syncahfconfig -c command to sync configuration across the cluster nodes.

Diagnostic upload supports multiple operating system users to run the diagnostic upload commands if you install AHF as root. If you install AHF as a non-root user, then you cannot benefit from the multiple operating system users support.

Note:

Currently not supported on Microsoft Windows.

Currently, AHF supports HTTP, SQLNET, and SFTP types or protocols, or end points. Following sections list the parameters or arguments supported by different end points while setting the configuration.

HTTP

Set Parameters: url, user, password, proxy, noauth, https_token, header, secure, and storetype

Upload Parameters: id, file, and https_token

SQLNET

Set Parameters: user, password, connectstring, and uploadtable

Upload Parameters: file

SFTP

Set Parameters: server, user, and password

Upload Parameters: (optional) id and file

Parameters or arguments Supported by Different Endpoints

Table 4-9 Parameters or Arguments Supported by Different Endpoints

Parameter Description

url

The target URL to upload files in case of HTTPS type. For example, https://samplehost.com.

server

The name of the server to which you want to upload files. For example, sftpserver.domain.com.

user

The user who has the privileges to access the endpoint. For example, upload.user@example.com.

password

Password of the user.

proxy

The URL of the proxy server. For example, www.example.com:80.

id

The location or target where you want to upload your files to.

file

The name of the file to upload.

noauth

Specify true and false. Default value is false.

If noauth is set to true, then HTTPS upload will skip authentication.

For example, upload files to PAR, Pre Authenticated URL where no user/password authentication is required.

https_token

Any static header values while configuring. For example, set auth tokens while configuring the HTTPS end point.

For example, ahfctl setupload -name config -type https -https_token 'abc:13'.

You can also pass dynamic headers at upload time by passing the -https_token headers command option to tfactl upload command.

For example: -H 'X-TFA-REQUESTID: 1'.

header

Stores the executionId in the ahf.properties file.

For example, to set the header:ahfctl setupload -name a1 -type https -header X-TFA-HEADERS:executionId=aeldb1db01_2020.06.16_19.20.55.15336025

secure

Specify true or false. Default value is true. Specifying the secure value checks for certificates.

If secure is set to false, then the upload command will run an unsecure upload.

connectstring

The database connect string to log in to the database where you want to upload files.

For example, (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl))).

uploadtable

Specify the name of the table where you want to upload files as BLOB type.

For example, for uploading Oracle ORAchk collections to the Collection Manager it is set to RCA13_DOCS.

Example 4-2 Diagnostic Upload Examples To upload files to My Oracle Support

To setup MOS configuration:
ahfctl setupload -name mos -type https 

Enter mos.https.user: user_id 
Enter mos.https.password: ######## 
Enter mos.https.url: https://transport.oracle.com/upload/issue 

Upload configuration set for: mos 
type: https 
user: user_id 
password: ######## 
url: https://transport.oracle.com/upload/issue
To set proxy:
ahfctl setupload -name mos -type https -proxy www-proxy.example.com:80
Single-line command:
ahfctl setupload -name mos -type https -user user_id -url https://transport.oracle.com/upload/issue -proxy www-proxy.example.com:80

Note:

Instead of mos, you can specify any configuration name of your choice.
To upload collections or files to MOS: There are multiple ways you can upload files to MOS after configuring MOS.
  • Upload files as part of Oracle Trace File Analyzer diagnostic collection:
    tfactl diagcollect -last 1h -upload mos -id 3-23104325631
  • Upload files standalone:
    tfactl upload -name mos -id 3-23104325631 -file /tmp/generated.zip
  • Backward compatibility or upload using -sr flag with diagcollcet command:
    tfactl diagcollect -last 1h -sr 3-23104325631

    Note:

    In this case, upload configuration name should be mos as internally Oracle Trace File Analyzer looks for this name. It works even if MOS configuration is set using the tfactl setupmos command in versions earlier than 20.2.

Example 4-3 Uploading a File Using SFTP

ahfctl upload -name sftp1 -file test_sftp_upload.log
Upload for: sftp1
Uploading file using pexpect
sftp> put test_sftp_upload.log
put test_sftp_upload.log
Uploading test_sftp_upload.log to /root/test_sftp_upload.log
test_sftp_upload.log                          100%   17     0.0KB/s   00:00    
sftp> quit
type: sftp
file: test_sftp_upload.log
Upload completed successfully

Example 4-4 Diagnostic Upload Examples

To set configuration parameters for the specified configuration name and SQLNET configuration type:
ahfctl setupload -name mysqlnetconfig -type sqlnet
[root@myserver1]# ahfctl setupload -name mysqlnetconfig -type sqlnet
Enter mysqlnetconfig.sqlnet.user: testuser
Enter mysqlnetconfig.sqlnet.password: ########
Enter mysqlnetconfig.sqlnet.connectstring: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testservice)))
Enter mysqlnetconfig.sqlnet.uploadtable: RCA13_DOCS

Upload configuration set for: mysqlnetconfig
type: sqlnet
user: testuser
password: ########

connectstring: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testservice)))
uploadtable: RCA13_DOCS
To set individual parameters for the specified configuration name and SQLNET configuration type:
ahfctl setupload -name mysqlnetconfig2 -type sqlnet -user user_name@example.com
This omits the -password option and therefore reports:
Database upload parameter(s) successfully stored.
AHF will not upload collections into the database until the following
parameters are also set:
['password', 'connectstring', 'uploadtable']
When you specify the -user command option, ahfctl does NOT prompt for the other required parameters so you must explicitly specify them at the command line as follows:
ahfctl setupload -type sqlnet -name orachkcm -user testuser -password  -connectstring sqlnet connect string -uploadtable RCA13_DOCS

The -password command option DOES NOT take any arguments. When specified, ahfctl prompts you to provide the password for the user you specified using the -user command option.

To get the list of all configured names in the AHF.properties file:
ahfctl getupload
# ahfctl getupload
Upload configurations available:
1. mysftpconfig
2. myhttpsconfig
3. mysqlnetconfig
To get all configuration parameters for the specified configuration name:
ahfctl getupload -name mysftpconfig
# ahfctl getupload -name mysftpconfig
Upload configuration get for: mysftpconfig
type: sftp
user: testuser1@example.com
password: #########
server: sftphost.example.com
To get individual parameter for the specified configuration name:
ahfctl getupload -name mysftpconfig -user
[root@myserver1]# ahfctl getupload -name mysftpconfig -user
Upload configuration get for: mysftpconfig 
type: sftp 
user: testuser1@example.com
To check or validate configuration of the specified configuration name:
ahfctl checkupload -name mysftpconfig
# ahfctl checkupload -name mysftpconfig -type sftp
Upload configuration check for: mysftpconfig
Parameters are configured correctly to upload files to sftp end point mysftpconfig
To upload to target using the configuration name specified:
tfactl upload -name mysftpconfig -id 30676598 -file /tmp/temp.txt
# tfactl upload -name mysftpconfig -id 30676598 -file /tmp/filename.txt
Upload for: mysftpconfig
type: sftp 
file: /tmp/filename.txt
id: 30676598
Upload completed successfully.
To unset individual parameter of the specified configuration name:
ahfctl unsetupload -name mysftpconfig -user
# ahfctl unsetupload -name mysftpconfig -user 
Upload configuration successfully unset for: mysftpconfig
To unset all parameters of the specified configuration name:
ahfctl unsetupload -name mysftpconfig -all
# ahfctl unsetupload -name mysftpconfig -all
Upload configuration successfully unset for: mysftpconfig
To auto upload generated zip file to the database using Oracle ORAchk:
exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
# exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
Orachk.zip successfully uploaded to RCA13_DOCS table
To auto upload generated zip file to MOS using tfactl diagcollect:
$ tfactl diagcollect -since 1h -upload mos -id 3-123456789
To upload generated zip to the database with the configurations set by AHF with the specified database config name:
exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447 -db_config_name user_dbconf
# exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447 -db_config_name user_dbconf
Orachk.zip successfully uploaded to RCA13_DOCS table

4.3.8 Changing Oracle Grid Infrastructure Trace Levels

Enable trace levels to collect enough diagnostics to diagnose the cause of the problem.

Oracle Support asks you to enable certain trace levels when reproducing a problem. You can enable and then disable the trace levels. Use the dbglevel option to set the trace level. You can find the required trace level settings grouped by problem trace profiles.

To set trace levels:

  1. To set a trace profile:
    tfactl dbglevel –set profile
  2. To list all available profiles:
    tfactl dbglevel –help

4.3.8.1 tfactl dbglevel

Use the tfactl dbglevel command to set Oracle Grid Infrastructure trace levels.

Syntax

tfactl [run] dbglevel 
[ {-set|-unset} profile_name 
-dependency [dep1,dep2,...|all] 
-dependency_type [type1,type2,type3,...|all] 
| {-view|-drop} profile_name 
| -lsprofiles 
| -lsmodules 
| -lscomponents [module_name] 
| -lsres 
| -create profile_name [ -desc description 
| [-includeunset] [-includetrace] 
| -debugstate | -timeout time ] 
| -modify profile_name [-includeunset] [-includetrace] 
| -getstate [ -module module_name ] 
| -active [profile_name] 
| -describe [profile_name] ] ]

Parameters

Table 4-10 tfactl dbglevel Command Parameters

Parameter Description

profile_name

Specify the name of the profile.

active

Displays the list of active profiles.

set

Sets the trace or log levels for the profile specified.

unset

Unsets the trace or log levels for the profile specified.

view

Displays the trace or log entries for the profile specified.

create

Creates a profile.

drop

Drops the profile specified.

modify

Modifies the profile specified.

describe

Describes the profiles specified.

lsprofiles

Lists all the available profiles.

lsmodules

Lists all the discovered Oracle Clusterware modules.

lscomponents

Lists all the components associated with the Oracle Clusterware module.

lsres

Lists all the discovered Oracle Clusterware resources.

getstate

Displays the current trace or log levels for the Oracle Clusterware components or resources.

module

Specify the Oracle Clusterware module.

dependency

Specify the dependencies to consider, start, or stop dependencies, or both.

dependency_type

Specify the type of dependencies to be consider.

debugstate

Generates a System State Dump for all the available levels.

includeunset

Adds or modifies an unset value for the Oracle Clusterware components or resources.

includetrace

Adds or modifies a trace value for the Oracle Clusterware components.

WARNING:

Set the profiles only at the direction of Oracle Support.

4.3.9 Performing Custom Collections

Use the custom collection options to change the diagnostic collections from the default.

4.3.9.1 Adjusting the Diagnostic Data Collection Period

Oracle Trace File Analyzer trims and collects any important logs updated in the past one hour.

If you know that you only want logs for a smaller window, then you can cut this collection period. Cutting the collection period helps you make collections as small and quick as possible.

There are four different ways you can specify the period for collection:

Table 4-11 Ways to Specify the Collection Period

Command Description

tfactl diagcollect -last n h|d

Collects since the previous n hours or days.

  • Number of days must be less than or equal to 7
  • Number of hours must be less than or equal to 168

tfactl diagcollect -from “yyyy-mm-dd

Collects from the date and optionally time specified.

Valid date and time formats:

"Mon/dd/yyyy hh:mm:ss"

"yyyy-mm-dd hh:mm:ss"

"yyyy-mm-ddThh:mm:ss"

"yyyy-mm-dd"

tfactl diagcollect –from "yyyy-mm-dd" -to "yyyy-mm-dd"

Collects between the date and optionally time specified.

Valid date and time formats:

"Mon/dd/yyyy hh:mm:ss"

"yyyy-mm-dd hh:mm:ss"

"yyyy-mm-ddThh:mm:ss"

"yyyy-mm-dd"

tfactl diagcollect -for “yyyy-mm-dd

Collects for the specified date.

Valid date formats:

"Mon/dd/yyyy"

"yyyy-mm-dd"

4.3.9.2 Collecting for Specific Events

Perform default diagnostic collection or choose an event from the list of recent incidents to collect diagnostic data for that event alone.

Choose to run:

  • A diagnostic collection for a specific recent event
  • A default time range diagnostic collection

To collect for specific events:

  1. To run a default diagnostic collection:
    tfactl diagcollect
    For example:
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 10
    
    By default TFA will collect diagnostics for the last 12 hours. This can result in large collections
    For more targeted collections enter the time of the incident, otherwise hit <RETURN> to collect for the last 12 hours
    [YYYY-MM-DD HH24:MI:SS,<RETURN>=Collect for last 12 hours] :
    
    Collecting data for the last 12 hours for all components...
    Collecting data for all nodes
    
    Collection Id : 20190312163846node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all/diagcollect_20190312163846_node1.log
    2019/03/12 16:38:50 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:38:50 PDT : Collection Name : tfa_Tue_Mar_12_16_38_47_PDT_2019.zip
    2019/03/12 16:38:50 PDT : Collecting diagnostics from hosts : [node1]
    2019/03/12 16:38:50 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:38:50 PDT : Collecting additional diagnostic information...
    2019/03/12 16:38:55 PDT : Getting list of files satisfying time range [03/12/2019 04:38:50 PDT, 03/12/2019 16:38:55 PDT]
    2019/03/12 16:39:02 PDT : Collecting ADR incident files...
    2019/03/12 16:39:06 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:39:07 PDT : Completed Local Collection
    .------------------------------------.
    |         Collection Summary         |
    +----------+-----------+------+------+
    | Host     | Status    | Size | Time |
    +----------+-----------+------+------+
    | node1 | Completed | 21MB |  17s |  |    
    '----------+-----------+------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all
    /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all/node1.tfa_Tue_Mar_12_16_38_47_PDT_2019.zip
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 1
    User root does not have permissions to run SRDC 'ora4030' for database 'orcl'.
  2. To run a diagnostic collection for a specific event that does not have an SRDC:
    tfactl diagcollect
    For example:
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 9
    Collecting data for all nodes
    Scanning files from mar/11/2019 18:02:19 to mar/11/2019 23:02:19
    
    Collection Id : 20190312162708node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all/diagcollect_20190312162708_node1.log
    2019/03/12 16:27:12 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:27:12 PDT : Collection Name : tfa_Tue_Mar_12_16_27_09_PDT_2019.zip
    2019/03/12 16:27:12 PDT : Collecting diagnostics from hosts : [node1]
    2019/03/12 16:27:12 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:27:12 PDT : Collecting additional diagnostic information...
    2019/03/12 16:27:17 PDT : Getting list of files satisfying time range [03/11/2019 18:02:19 PDT, 03/11/2019 23:02:19 PDT]
    2019/03/12 16:27:23 PDT : Collecting ADR incident files...
    2019/03/12 16:27:28 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:27:33 PDT : Completed Local Collection
    .------------------------------------.
    |         Collection Summary         |
    +----------+-----------+------+------+
    | Host     | Status    | Size | Time |
    +----------+-----------+------+------+
    | node1 | Completed | 10MB |  21s |
    '----------+-----------+------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all
    /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all/node1.tfa_Tue_Mar_12_16_27_09_PDT_2019.zip
  3. To run a diagnostic collection for a specific event that has an SRDC:

    Note:

    When choosing an SRDC the user running the collection needs to be in the dba group of the database chosen in the event.
    tfactl diagcollect
    For example:
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 1
    Scripts to be run by this srdc: srdc_db_sid_memorysizes_10glower.sql srdc_db_sid_memorysizes_11gplus.sql ipspack 
    Components included in this srdc: OS DATABASE CHMOS
    Collecting data for local node(s)
    Scanning files from Mar/12/2019 14:08:20 to Mar/12/2019 18:08:20
    WARNING: End time entered is after the current system time.
    
    Collection Id : 20190312163524node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local/diagcollect_20190312163524_node1.log
    2019/03/12 16:35:30 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:35:30 PDT : Collection Name : tfa_srdc_ora4030_Tue_Mar_12_16_35_25_PDT_2019.zip
    2019/03/12 16:35:30 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:35:30 PDT : Collecting additional diagnostic information...
    2019/03/12 16:35:35 PDT : Getting list of files satisfying time range [03/12/2019 14:08:20 PDT, 03/12/2019 16:35:30 PDT]
    2019/03/12 16:35:49 PDT : Collecting ADR incident files...
    2019/03/12 16:35:52 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:35:54 PDT : Completed Local Collection
    .-------------------------------------.
    |          Collection Summary         |
    +----------+-----------+-------+------+
    | Host     | Status    | Size  | Time |
    +----------+-----------+-------+------+
    | node1 | Completed | 2.9MB |  24s |
    '----------+-----------+-------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local
    /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local/node1.tfa_srdc_ora4030_Tue_Mar_12_16_35_25_PDT_2019.zip

4.3.9.3 Excluding Large Files from Diagnostic Collection

Prevent excessively large files from delaying or stalling collections.

Run the tfactl set maxfilecollectionsize for the diagnostic collection command to consider only the last 200 KB for the files that are larger than the size specified.

  1. To set the maximum file size:
    tfactl set maxfilecollectionsize=size_in_MB
  2. To collect diagnostic data:
    tfactl diagcollect

4.3.9.4 Collecting from Specific Nodes

To collect from specific nodes:

  1. To collect from specific nodes:
    tfactl diagcollect –node list of nodes
    For example:
    $ tfactl diagcollect -last 1d -node myserver65

Related Topics

4.3.9.5 Collecting from Specific Components

To collect from specific components:

  1. To collect from specific components:
    tfactl diagcollect component

    For example:

    To trim and collect all files from the databases hrdb and fdb in the last 1 day:
    tfactl –diagcollect -database hrdb,fdb -last 1d
    To trim and collect all Oracle Clusterware files, operating system logs, and CHMOS/OSW data from node1 and node2 updated in the last 6 hours:
    tfactl diagcollect -crs -os -node node1,node2 -last 6h
    To trim and collect all Oracle ASM logs from node1 updated between from and to time:
    tfactl diagcollect -asm -node node1 -from "2016-08-15" -to "2016-08-17"
    Following are the available component options.

    Table 4-12 Component Options

    Component Option Description

    -cha

    Collects Oracle Cluster Health Advisor logs.

    -ips

    Collects Incident Packaging Service logs.

    -database database_names

    Collects database logs from databases specified in a comma-separated list.

    -asm

    Collects Oracle ASM logs.

    -crsclient

    Collects Client Logs that are under GIBASE/diag/clients.

    -dbclient

    Collects Client Logs that are under DB ORABASE/diag/clients.

    -dbwlm

    Collects Database Workload Management (DBWLM) logs.

    -tns

    Collects TNS logs.

    -rhp

    Collects Rapid Home Provisioning (RHP) logs.

    -procinfo

    Collects Gathers stack and fd from /proc for all processes.

    -afd

    Collects AFD logs.

    -crs

    Collects Oracle Clusterware logs.

    -wls

    Collects Oracle WebLogic Server (WLS) logs.

    -emagent

    Collects Oracle Enterprise Manager Agent (EMAGENT) logs.

    -oms

    Collects Oracle Management Service (OMS) logs.

    -ocm

    Collects Oracle Configuration Manager (OCM) logs.

    -emplugins

    Collects Oracle Enterprise Manager Plug-ins (EMPLUGINS) logs.

    -em

    Collects Oracle Enterprise Manager (EM) logs.

    -acfs

    Oracle Advanced Cluster File System (Oracle ACFS).

    -install

    Collects Oracle Installation related files.

    -cfgtools

    Collects configuration tools logs.

    -os

    Collects operating system files such as /var/log/messages and /var/log/exadatatmp/*netdiag* files only on Exadata systems.

    -ashhtml

    Collects Generate Active Session History (ASH) HTML report.

    -ashtext

    Collects Generate Active Session History (ASH) text report.

    -awrhtml

    Collects Automatic Workload Repository (AWR) HTML logs.

    -awrtext

    Collects Automatic Workload Repository (AWR) text report.

    -avs

    Collects Audit Vault Server logs.

Related Topics

4.3.9.6 Collecting from Specific Directories

Oracle Trace File Analyzer discovers all Oracle diagnostics and collects relevant files based on the type and last time updated.

If you want to collect other files, then you can specify extra directories. Oracle Trace File Analyzer collects only the files updated in the relevant time range (one hour by default).

You can configure collection of all files irrespective of the time last updated. Configure on a directory by directory basis using the -collectall option.

To collect from specific directories:

  1. To include all files updated in the last one hour:
    tfactl diagcollect –collectdir dir1,dir2,...dirn

    For example:

    To trim and collect all Oracle Clusterware files updated in the last one hour as well as all files from /tmp_dir1 and /tmp_dir2 at the initiating node:
    $ tfactl diagcollect –crs –collectdir /tmp_dir1,/tmpdir_2
  2. To configure Oracle Trace File Analyzer to collect all files from a directory, first configure it with the -collectall option:
    $ tfactl add dir -collectall

    or

    tfactl modify dir -collectall
    Start a diagnostic collection using the -collectalldirs option:
    $ tfactl diagcollect -collectalldirs

    Note:

    If the -collectalldirs option is not used normal, then the file type, name, and time range restrictions are applied.

Related Topics

4.3.9.7 Changing the Collection Name

Oracle Trace File Analyzer zips collections and puts the zip files in the repository directory using the following naming format:

repository/collection_date_time/node_all/node.tfa_date_time.zip

You must only change the name of the zipped files using the following options. Manually changing the file name prevents you from using collections with various Oracle Support self-service tools.

To change the collection name:

  1. To use your own naming to organize collections:
    –tag tagname

    The files are collected into tagname directory inside the repository.

  2. To rename the zip file:
    –z zip name

Related Topics

4.3.9.8 Preventing Copying Zip Files and Trimming Files

By default, Oracle Trace File Analyzer Collector:

  • Copies back all zip files from remote notes to the initiating node

  • Trims files around the relevant time

To prevent copying zip files and trimming files:

  1. To prevent copying the zip file back to the initiating node:
    –nocopy
    For example:
    $ tfactl diagcollect -last 1d -nocopy
  2. To avoid trimming files:
    –notrim
    For example:
    $ tfactl diagcollect -last 1d -notrim

Related Topics

4.3.9.9 Performing Silent Collection

  1. To initiate a silent collection:
    –silent

    The diagcollect command is submitted as a background process.

    For example:
    $ tfactl diagcollect -last 1d -silent

Related Topics

4.3.9.10 Collecting Core Files

  1. To collect core files:
    –cores
    For example:
    $ tfactl diagcollect -last 1d -cores

Related Topics

4.3.9.11 Collecting Incident Packaging Service (IPS) Packages

Incident Packaging Service packages details of problems stored by Oracle Database in ADR for later diagnosis.

Syntax

Oracle Trace File Analyzer runs IPS to query and collect these packages.

tfactl ips option

Table 4-13 tfactl ips Command Parameters

Command Description

tfactl ips

Runs the IPS.

tfactl ips show incidents

Shows all IPS incidents.

tfactl ips show problems

Shows all IPS problems.

tfactl ips show package

Shows all IPS Packages.

tfactl diagcollect -ips -h

Shows all available diagcollect IPS options.

tfactl diagcollect -ips

Performs an IPS collection following prompts. You can use all the standard diagcollect options to limit the scope of IPS collection.

tfactl diagcollect -ips -adrbasepath adr_base -adrhomepath adr_home

Performs an IPS collection in silent mode.

tfactl diagcollect -ips -incident incident_id

Collects ADR details about a specific incident id.

tfactl diagcollect -ips -problem problem_id

Collect ADR details about a specific problem id.

You can change the contents of the IPS package. Use the following options:

  1. Start the collection.

  2. Suspend the collection using the -manageips option.

    For example:

    $ tfactl diagcollect -ips -incident incident_id -manageips -node local
  3. Find the suspended collection using the print suspendedips option.

    For example:

    $ tfactl print suspendedips
  4. Manipulate the package.

  5. Resume the collection using the -resumeips option.

    For example:

    $ tfactl diagcollect -resumeips collection_id

Related Topics

4.3.10 Limit the Maximum Amount of Memory Used by Oracle Trace File Analyzer

You can now limit the amount of memory used by Oracle Trace File Analyzer.

Note:

This feature is available only on Linux and only when Autonomous Health Framework is installed using a full installation by the root user.

Memory can be limited between 150 MB and 2GB or 25% of system memory, whichever is lower. By default, memory limits are enabled and set to the maximum.

There are various use cases including the following when Oracle Trace File Analyzer resource limits apply:
  • When Oracle Trace File Analyzer is performing automatic diagnostic collections, for example, when Oracle Trace File Analyzer detects an ORA-600 error has occurred and collects diagnostics for it.
  • When running on-demand collections, for example, if you run an SRDC collection at the request of support.
  • During any other Oracle Trace File Analyzer analysis such as using the tfactl analyze command to search logs for recent errors.

Memory can be limited at either the system level using ahfctl setresourcelimit -resource kmem or combined system and swap memory using ahfctl setresourcelimit -resource swmem

For example:

To limit the memory usage to only 1 GB of system memory run:
ahfctl setresourcelimit -resource kmem -value 1024
Alternatively, to limit the combined total of system memory and the swap memory to 2 GB run:
ahfctl setresourcelimit -resource swmem -value 2048

4.3.11 Limit Oracle Trace File Analyzer's CPU Usage

On Linux the CPU usage of Oracle Trace File Analyzer can be limited with the command ahfctl setresourcelimit [-value value]

For example to limit Oracle Trace File Analyzer to a maximum of 50% of a single CPU use: ahfctl setresourcelimit -value 0.5

CPU resource limits for Oracle Trace File Analyzer can be set between a minimum of 0.5 and maximum of 4 or 75% of available CPUs, whichever is lower. By default, the Oracle Trace File Analyzer CPU limit is set to the maximum.