F.3 Running Diagnostic Collection Commands

Run the diagnostic collection commands to collect diagnostic data.

Topics:

F.3.1 tfactl diagcollect

Use the tfactl diagcollect command to perform on-demand diagnostic collection.

Oracle Trace File Analyzer Collector can perform three types of on-demand collections:

  • Default collections

  • Event-driven Support Service Request Data Collection (SRDC) collections

  • Custom collections

Prerequisites

Event-driven Support Service Request Data Collection (SRDC collections require components from the Oracle Trace File Analyzer Database Support Tools Bundle, which is available from My Oracle Support Note 1513912.2.

Syntax

tfactl diagcollect [-all | [component_name1] [component_name2] ... [component_nameN]]  
[-node all|local|n1,n2,..] [-tag description] 
[-z filename] 
[-last nh|d| -from time -to time | -for time] 
[-nocopy] [-notrim] [-silent] [-nocores] [-collectalldirs] 
[-collectdir dir1,dir2..] [-examples] 
[-node [node1,node2,nodeN] 
components:-ips|-database|-asm|-crsclient|-dbclient|-dbwlm|-tns|-rhp|-procinfo|-afd
|-crs|-wls|-emagent|-oms|-ocm|-emplugins|-em|-acfs|-install|-cfgtools|-os|-ips
|-ashhtml|-ashtext|-awrhtml|-awrtext

Parameters

Each option must be prefixed with a minus sign (-).

Option Description

-all | [component_name1] [component_name2] ... [component_nameN]

Specify that you want to collect data on all components, or specify specific components for which you want to obtain collections.

-node all|local|n1,n2,...

Specify a comma-delimited list of nodes from which to collect diagnostic information. Default is all.

-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 numberh | d | -from "mmm/dd/yyyy hh:mm:ss" -to "mmm/dd/yyyy hh:mm:ss" | -for "mmm/dd/yyyy hh:mm:ss"

  • 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.

  • 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.

  • Specify the -for parameter to collect files that have relevant data for the time given. 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.

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.

-nocopy

Specify this parameter to stop the resultant trace file collection from being copied back to the initiating node. The file remains in the Oracle Trace File Analyzer repository on the executing node.

-notrim

Specify this parameter to stop trimming the files collected.

-silent

Specify this parameter to run diagnostic collection as a background process

-nocores

Specify this parameter to stop collecting core files when it would normally have been collected.

-collectalldirs

Specify this parameter to collect all files from a directory that has Collect All  flag marked true.

-collectdir dir1,dir2,...dirn

Specify a comma-delimited list of directories and collection includes all files from these directories irrespective of type and time constraints in addition to the components specified.

-examples

Specify this parameter to view diagcollect usage examples.

Examples

  • The following command trims and zips all files updated in the last four hours, including chmos and osw data, from across the cluster and collects it on the initiating node:
    $ tfactl diagcollect –all
    
    Collecting data for the last 12 hours for this component ...
    Collecting data for all nodes
    Creating ips package in master node ...
    Trying ADR basepath /scratch/app/orabase
    Trying to use ADR homepath diag/crs/node1/crs ...
    Submitting request to generate package for ADR homepath /scratch/app/orabase/diag/crs/node1/crs
    Trying ADR basepath /scratch/app/oracle
    Trying to use ADR homepath diag/rdbms/prod/prod_1 ...
    Submitting request to generate package for ADR homepath /scratch/app/oracle/diag/rdbms/prod/prod_1
    Trying to use ADR homepath diag/rdbms/prod/prod_2 ...
    Submitting request to generate package for ADR homepath /scratch/app/oracle/diag/rdbms/prod/prod_2
    Trying to use ADR homepath diag/rdbms/webdb/webdb_2 ...
    Submitting request to generate package for ADR homepath /scratch/app/oracle/diag/rdbms/webdb/webdb_2
    Trying to use ADR homepath diag/rdbms/webdb/webdb_1 ...
    Submitting request to generate package for ADR homepath /scratch/app/oracle/diag/rdbms/webdb/webdb_1
    Master package completed for ADR homepath /scratch/app/oracle/diag/rdbms/prod/prod_1
    Master package completed for ADR homepath /scratch/app/oracle/diag/rdbms/prod/prod_2
    Master package completed for ADR homepath /scratch/app/oracle/diag/rdbms/webdb/webdb_1
    Master package completed for ADR homepath /scratch/app/oracle/diag/rdbms/webdb/webdb_2
    Master package completed for ADR homepath /scratch/app/orabase/diag/crs/node1/crs
    Created package 2 based on time range 2016-09-29 12:11:00.000000 -07:00 to 2016-09-30 00:11:00.000000 -07:00, 
    correlation level basic
    Remote package completed for ADR homepath(s) /diag/crs/node2/crs,/diag/crs/node3/crs
    
    Collection Id : 20160930001113node1
    
    Detailed Logging at : /scratch/app/orabase/tfa/repository/collection_Fri_Sep_30_00_11_13_PDT_2016_node_all/diagcollect_20160930001113_node1.log
    2016/09/30 00:12:21 PDT : Collection Name : tfa_Fri_Sep_30_00_11_13_PDT_2016.zip
    2016/09/30 00:12:21 PDT : Collecting diagnostics from hosts : [node1, node3, node2]
    2016/09/30 00:12:21 PDT : Scanning of files for Collection in progress...
    2016/09/30 00:12:21 PDT : Collecting additional diagnostic information...
    2016/09/30 00:12:26 PDT : Getting list of files satisfying time range [09/29/2016 12:12:21 PDT, 09/30/2016 00:12:26 PDT]
    2016/09/30 00:13:05 PDT : Collecting ADR incident files...
    2016/09/30 00:15:02 PDT : Completed collection of additional diagnostic information...
    2016/09/30 00:15:24 PDT : Completed Local Collection
    2016/09/30 00:15:26 PDT : Remote Collection in Progress...
    .------------------------------------.
    |         Collection Summary         |
    +---------+-----------+-------+------+
    | Host    | Status    | Size  | Time |
    +---------+-----------+-------+------+
    | node3   | Completed | 82MB  | 172s |
    | node2   | Completed | 95MB  | 183s |
    | node1   | Completed | 157MB | 183s |
    '---------+-----------+-------+------'
    
    Logs are being collected to: /scratch/app/orabase/tfa/repository/collection_Fri_Sep_30_00_11_13_PDT_2016_node_all
    /scratch/app/orabase/tfa/repository/collection_Fri_Sep_30_00_11_13_PDT_2016_node_all/node3.tfa_Fri_Sep_30_00_11_13_PDT_2016.zip
    /scratch/app/orabase/tfa/repository/collection_Fri_Sep_30_00_11_13_PDT_2016_node_all/node2.tfa_Fri_Sep_30_00_11_13_PDT_2016.zip
    /scratch/app/orabase/tfa/repository/collection_Fri_Sep_30_00_11_13_PDT_2016_node_all/node1.tfa_Fri_Sep_30_00_11_13_PDT_2016.zip
  • The following command trims and zips all files updated in the last eight hours, including chmos and osw data, from across the cluster and collects it on the initiating node:
    $ tfactl diagcollect –all –last 8h
  • The following command trims and zips all files from databases hrdb and fdb updated in the last one day and collects it on the initiating node:
    $ tfactl diagcollect -database hrdb,fdb -last 1d -z foo
  • The following command trims and zips all Oracle Clusterware files, operating system logs, and chmos and osw data from node1 and node2 updated in the last six hours, and collects it on the initiating node:
    $ tfactl diagcollect –crs -os -node node1,node2 -last 6h
  • The following command trims and zips all Oracle ASM logs from node1 updated between September 22, 2016 and September 23, 2016 at 21:00, and collects it on the initiating node:
    $ tfactl diagcollect -asm -node node1 -from Sep/22/2016 -to "Sep/23/2016 21:00:00"
  • The following command trims and zips all log files updated on September 23, 2016 and collect at the initiating node:
    $ tfactl diagcollect -for Sep/23/2016
  • The following command trims and zips all log files updated from 09:00 on September 22, 2016, to 09:00 on September 23, 2016, which is 12 hours before and after the time specified in the command, and collects it on the initiating node:
    $ tfactl diagcollect -for "September/22/2016 21:00:00"

F.3.2 tfactl directory

Use the tfactl directory command to add a directory to, or remove a directory from the list of directories to analyze their trace or log files.

Also, use the tfactl directory command to change the directory permissions. When automatic discovery adds a directory, the directory is added as public. Any user who has sufficient permissions to run the tfactl diagcollect command collects any file in that directory. This is only important when non-root or sudo users run TFACTL commands.

If a directory is marked as private, then Oracle Trace File Analyzer, before allowing any files to be collected:

  • Determines which user is running TFACTL commands

  • Verifies if the user has permissions to see the files in the directory

Note:

A user can only add a directory to Oracle Trace File Analyzer to which they have read access. If you have automatic diagnostic collections configured, then Oracle Trace File Analyzer runs as root, and can collect all available files.

The tfactl directory command includes three verbs with which you can manage directories: add, remove, and modify.

Syntax

tfactl directory add directory [-public] [-exclusions | -noexclusions | -collectall] [-node all | n1,n2...]
tfactl directory remove directory [-node all | n1,n2...]
tfactl directory modify directory [-private | -public] [-exclusions | -noexclusions | -collectall]

For each of the three syntax models, you must specify a directory path where Oracle Trace File Analyzer stores collections.

Parameters

Table F-11 tfactl directory Command Parameters

Parameter Description
-public

Use the -public parameter to make the files contained in the directory available for collection by any Oracle Trace File Analyzer user.

-private

Use the -private parameter to prevent an Oracle Trace File Analyzer user who does not have permission to see the files in a directory (and any subdirectories) you are adding or modifying, from running a command to collect files from the specified directory.

-exclusions

Use the -exclusions parameter to specify that files in this directory are eligible for collection if the files satisfy type, name, and time range restrictions.

-noexclusions

Use the -noexclusions parameter to specify that files in this directory are eligible for collection if the files satisfy time range restrictions.

-collectall

Use the -collectall parameter to specify that files in this directory are eligible for collection irrespective of type and time range when the user specifies the -collectalldirs parameter with the tfactl diagcollect command.

-node all | n1,n2...

Add or remove directories from every node in the cluster or use a comma-delimited list to add or remove directories from specific nodes.

Usage Notes

You must add all trace directory names to the Berkeley database so that Oracle Trace File Analyzer can collect file metadata in that directory. The discovery process finds most directories, but if new or undiscovered directories are required, then you can add these manually using the tfactl directory command.

When you add a directory using TFACTL, then Oracle Trace File Analyzer attempts to determine whether the directory is for

  • Oracle database

  • Oracle Clusterware

  • Operating system logs

  • Some other component

  • Which database or instance

If Oracle Trace File Analyzer cannot determine this information, then Oracle Trace File Analyzer returns an error and requests that you enter the information, similar to the following:

# tfactl directory add /tmp

Failed to add directory to TFA. Unable to determine parameters for directory: /tmp
Please enter component for this Directory [RDBMS|CRS|ASM|INSTALL|OS|CFGTOOLS|TNS|DBWLM|ACFS|ALL] : RDBMS
Please enter database name for this Directory :MYDB
Please enter instance name for this Directory :MYDB1

Note:

For OS, CRS, CFGTOOLS, ACFS, ALL, or INSTALL files, only the component is requested and for Oracle ASM only the instance is created. No verification is done for these entries so use caution when entering this data.

Examples

The following command adds a directory:

# tfactl directory add /u01/app/grid/diag/asm/+ASM1/trace

The following command modifies a directory and makes the contents available for collection only to Oracle Trace File Analyzer users with sufficient permissions:

# tfactl directory modify /u01/app/grid/diag/asm/+ASM1/trace -private

The following command removes a directory from all nodes in the cluster:

# tfactl directory remove /u01/app/grid/diag/asm/+ASM1/trace -node all

F.3.3 tfactl ips

Use the tfactl ips  command to collect Automatic Diagnostic Repository diagnostic data.

Syntax

tfactl ips [ADD] [ADD FILE] [ADD NEW INCIDENTS] [CHECK REMOTE KEYS] [COPY IN FILE] 
[COPY OUT FILE] [CREATE PACKAGE] [DELETE PACKAGE] [FINALIZE PACKAGE] [GENERATE PACKAGE] 
[GET MANIFEST] [GET METADATA] [GET REMOTE KEYS] [PACK] [REMOVE] [REMOVE FILE] 
[SET CONFIGURATION] [SHOW CONFIGURATION] [SHOW FILES] [SHOW INCIDENTS] [SHOW PROBLEMS] 
[SHOW PACKAGE] [UNPACK FILE] [UNPACK PACKAGE] [USE REMOTE KEYS] [options]

Parameters

Table F-12 tfactl ips Command Parameters

Parameter Description

ADD

Adds incidents to an existing package.

ADD FILE

Adds a file to an existing package.

ADD NEW INCIDENTS

Finds new incidents for the problems and add the latest ones to the package.

CHECK REMOTE KEYS

Creates a file with keys matching incidents in specified package.

COPY IN FILE

Copies an external file into Automatic Diagnostic Repository, and associates it with a package and (optionally) an incident.

COPY OUT FILE

Copies an Automatic Diagnostic Repository file to a location outside Automatic Diagnostic Repository.

CREATE PACKAGE

Creates a package, and optionally select contents for the package.

DELETE PACKAGE

Drops a package and its contents from Automatic Diagnostic Repository.

FINALIZE PACKAGE

Gets a package ready for shipping by automatically including correlated contents.

GENERATE PACKAGE

Creates a physical package (zip  file) in target directory.

GET MANIFEST

Extracts the manifest from a package file and displays it.

GET METADATA

Extracts the metadata XML document from a package file and displays it.

GET REMOTE KEYS

Creates a file with keys matching incidents in specified package.

PACK

Creates a package, and immediately generates the physical package.

REMOVE

Removes incidents from an existing package.

REMOVE FILE

Removes a file from an existing package.

SET CONFIGURATION

Changes the value of an Incident Packaging Service configuration parameter.

SHOW CONFIGURATION

Shows the current Incident Packaging Service settings.

SHOW FILES

Shows the files included in the specified package.

SHOW INCIDENTS

Shows incidents included in the specified package.

SHOW PROBLEMS

Shows problems for the current Automatic Diagnostic Repository home.

SHOW PACKAGE

Shows details for the specified package.

UNPACK FILE

Unpackages a physical file into the specified path.

UNPACK PACKAGE

Unpackages physical files in the current directory into the specified path, if they match the package name.

USE REMOTE KEYS

Adds incidents matching the keys in the specified file to the specified package.

Topics:

F.3.3.1 tfactl ips ADD

Use the tfactl ips ADD  command to add incidents to an existing package.

Syntax

tfactl ips ADD [INCIDENT incid | PROBLEM prob_id | PROBLEMKEY prob_key | SECONDS seconds | TIME start_time TO end_time] PACKAGE package_id

Parameters

Table F-13 tfactl ips ADD Command Parameters

Parameter Description

incid

Specify the ID of the incident to add to the package contents.

prob_id

Specify the ID of the problem to add to the package contents.

prob_key

Specify the problem key to add to the package contents.

seconds

Specify the number of seconds before now for adding package contents.

start_time

Specify the start of time range to look for incidents in.

end_time

Specify the end of time range to look for incidents in.

F.3.3.2 tfactl ips ADD FILE

Use the tfactl ADD FILE  command to add a file to an existing package.

Syntax

The file must be in the same ADR_BASE  as the package.

tfactl ips ADD FILE file_spec PACKAGE pkgid

Parameters

Table F-14 tfactl ips ADD FILE Command Parameters

Parameter Description

file_spec

Specify the file with file and path (full or relative).

package_id

Specify the ID of the package to add the file to.

F.3.3.3 tfactl ips COPY IN FILE

Use the tfactl ips COPY IN FILE  command to copy an external file into Automatic Diagnostic Repository, and associate the file with a package and (optionally) an incident.

Syntax

tfactl ips COPY IN FILE file [TO new_name] [OVERWRITE] PACKAGE pkgid [INCIDENT incid]

Parameters

Table F-15 tfactl ips COPY IN FILE Command Parameters

Parameter Description

file

Specify the file with file name and full path (full or relative).

new_name

Specify a name for the copy of the file.

pkgid

Specify the ID of the package to associate the file with.

incid

Specify the ID of the incident to associate the file with.

Options

OVERWRITE: If the file exists, then use the OVERWRITE option to overwrite the file.

F.3.3.4 tfactl ips REMOVE

Use the tfactl ips REMOVE  command to remove incidents from an existing package.

Syntax

The incidents remain associated with the package, but not included in the physical package file.

tfactl ips REMOVE [INCIDENT incid | PROBLEM prob_id | PROBLEMKEY prob_key] PACKAGE package_id

Parameters

Table F-16 tfactl ips REMOVE Command Parameters

Parameter Description

incid

Specify the ID of the incident to add to the package contents.

prob_id

Specify the ID of the problem to add to the package contents.

prob_key

Specify the problem key to add to the package contents.

Example

$ tfactl ips remove incident 22 package 12

F.3.3.5 tfactl ips REMOVE FILE

Use the tfactl ips REMOVE FILE  command to remove a file from an existing package.

Syntax

The file must be in the same ADR_BASE  as the package. The file remains associated with the package, but not included in the physical package file.

tfactl ips REMOVE FILE file_spec PACKAGE pkgid

Example

$ tfactl ips remove file ADR_HOME/trace/mydb1_ora_13579.trc package 12

F.3.3.6 tfactl ips ADD NEW INCIDENTS PACKAGE

Use the tfactl ips ADD NEW INCIDENTS PACKAGE  command to find new incidents for the problems in a specific package, and add the latest ones to the package.

Syntax

tfactl ips ADD NEW INCIDENTS PACKAGE package_id

Parameters

Table F-17 tfactl ips ADD NEW INCIDENTS PACKAGE Command Parameters

Parameter Description

package_id

Specify the ID of the package to add the incidents to.

F.3.3.7 tfactl ips GET REMOTE KEYS FILE

Use the tfactl ips GET REMOTE KEYS FILE  command to create a file with keys matching incidents in a specific package.

Syntax

tfactl ips GET REMOTE KEYS FILE file_spec PACKAGE package_id

Parameters

Table F-18 tfactl ips GET REMOTE KEYS FILE Command Parameters

Parameter Description

file_spec

Specify the file with file name and full path (full or relative).

package_id

Specify the ID of the package to get keys for.

Example

$ tfactl ips get remote keys file /tmp/key_file.txt package 12

F.3.3.8 tfactl ips USE REMOTE KEYS FILE

Use the tfactl ips USE REMOTE KEYS FILE  command to add incidents matching the keys in a specific file to a specific package.

Syntax

tfactl ips USE REMOTE KEYS FILE file_spec PACKAGE package_id

Example

$ tfactl ips use remote keys file /tmp/key_file.txt package 12

F.3.3.9 tfactl ips CREATE PACKAGE

Use the tfactl ips CREATE PACKAGE  command to create a package, and optionally select the contents for the package.

Syntax

tfactl ips CREATE PACKAGE [INCIDENT inc_id | PROBLEM prob_id 
| PROBLEMKEY prob_key | SECONDS seconds | TIME start_time TO end_time] [CORRELATE BASIC | TYPICAL | ALL] [MANIFEST file_spec] 
[KEYFILE file_spec]

Parameters

Table F-19 tfactl ips CREATE PACKAGE Command Parameters

Parameter Description

incid

Specify the ID of the incident to use for selecting the package contents.

prob_id

Specify the ID of the problem to use for selecting the package contents.

prob_key

Specify the problem key to use for selecting the package contents.

seconds

Specify the number of seconds before now for selecting the package contents.

start_time

Specify the start of time range to look for the incidents in.

end_time

Specify the end of time range to look for the incidents in.

Options

  • CORRELATE BASIC: The package includes the incident dumps and the incident process trace files. If the incidents share relevant correlation keys, then more incidents are included automatically.

  • CORRELATE TYPICAL: The package includes the incident dumps and all trace files that were modified in a time window around each incident. If the incidents share relevant correlation keys, or occurred in a time window around the main incidents, then more incidents are included automatically.

  • CORRELATE ALL: The package includes the incident dumps and all trace files that were modified between the first selected incident and the last selected incident. If the incidents occurred in the same time range, then more incidents are included automatically.

  • MANIFEST file_spec: Generates the XML format package manifest file.

  • KEYFILE file_spec: Generates the remote key file.

Note:

  • If you do not specify package contents, such as incident, problem, and so on, then Oracle Trace File Analyzer creates an empty package.

    You can add files and incidents later.

  • If you do not specify the correlation level, then Oracle Trace File Analyzer uses the default level.

  • The default is normally TYPICAL, but you can change using the IPS SET CONFIGURATION  command.

Example

$tfactl ips create package incident 861

$ tfactl ips create package time '2006-12-31 23:59:59.00 -07:00' to '2007-01-01 01:01:01.00 -07:00'

F.3.3.10 tfactl ips FINALIZE PACKAGE

Use the tfactl ips FINALIZE PACKAGE  command to get a package ready for shipping by automatically including correlated contents.

Syntax

tfactl ips FINALIZE PACKAGE package_id

F.3.3.11 tfactl ips GENERATE PACKAGE

Use the tfactl ips GENERATE PACKAGE  command to create a physical package (zip file) in the target directory.

Syntax

tfactl ips GENERATE PACKAGE package_id [IN path][COMPLETE | INCREMENTAL]

Parameters

Table F-20 tfactl ips GENERATE PACKAGE Command Parameters

Parameter Description

package_id

Specify the ID of the package to create physical package file for.

path

Specify the path where the physical package file must be generated.

Options

  • COMPLETE: (Default) The package includes all package files even if a previous package sequence was generated.

  • INCREMENTAL: The package includes only the files that have been added or changed since the last package was generated.

Note:

If no target path is specified, then Oracle Trace File Analyzer generates the physical package file in the current working directory.

Example

$ tfactl ips generate package 12 in /tmp

F.3.3.12 tfactl ips DELETE PACKAGE

Use the tfactl ips DELETE PACKAGE  command to drop a package and its contents from the Automatic Diagnostic Repository.

Syntax

tfactl ips DELETE PACKAGE package_id

Parameters

Table F-21 tfactl ips DELETE PACKAGE Command Parameters

Parameter Description

package_id

Specify the ID of the package to delete.

Example

$ tfactl ips delete package 12

F.3.3.13 tfactl ips GET MANIFEST FROM FILE

Use the tfactl ips GET MANIFEST FROM FILE  command to extract the manifest from a package file and view it.

Syntax

tfactl ips GET MANIFEST FROM FILE file

Parameters

Table F-22 tfactl ips GET MANIFEST FROM FILE Command Parameters

Parameter Description

file

Specify the external file with file name and full path.

Example

$ tfactl ips GET MANIFEST FROM FILE /tmp/IPSPKG_200704130121_COM_1.zip

F.3.3.14 tfactl ips GET METADATA

Use the tfactl ips GET METADATA  command to extract the metadata XML document from a package file and view it.

Syntax

tfactl ips GET METADATA [FROM FILE file | FROM ADR]

Example

$ tfactl ips get metadata from file /tmp/IPSPKG_200704130121_COM_1.zip

F.3.3.15 tfactl ips PACK

Use the tfactl ips PACK command to create a package and immediately generate the physical package.

Syntax

tfactl ips PACK [INCIDENT incid | PROBLEM prob_id | PROBLEMKEY prob_key | SECONDS seconds | TIME start_time TO end_time] 
[CORRELATE BASIC | TYPICAL | ALL] [MANIFEST file_spec] [KEYFILE file_spec]

Parameters

Table F-23 tfactl ips PACK Command Parameters

Parameter Description

incid

Specify the ID of the incident to use for selecting the package contents.

prob_id

Specify the ID of the problem to use for selecting the package contents.

prob_key

Specify the problem key to use for selecting the package contents.

seconds

Specify the number of seconds before the current time for selecting the package contents.

start_time

Specify the start of time range to look for the incidents in.

end_time

Specify the end of time range to look for the incidents in.

path

Specify the path where the physical package file must be generated.

Options

  • CORRELATE BASIC: The package includes the incident dumps and the incident process trace files. If the incidents share relevant correlation keys, then more incidents are included automatically.

  • CORRELATE TYPICAL: The package includes the incident dumps and all trace files that were modified in a time window around each incident. If the incidents share relevant correlation keys, or occurred in a time window around the main incidents, then more incidents are included automatically.

  • CORRELATE ALL: The package includes the incident dumps and all trace files that were modified between the first selected incident and the last selected incident. If the incidents occurred in the same time range, then more incidents are included automatically.

  • MANIFEST file_spec: Generate the XML format package manifest file.

  • KEYFILE file_spec: Generate remote key file.

Note:

If you do not specify package contents, such as incident, problem, and so on, then Oracle Trace File Analyzer creates an empty package.

You can add files and incidents later.

If you do not specify the correlation level, then Oracle Trace File Analyzer uses the default level.

The default is normally TYPICAL, but you can change using the IPS SET CONFIGURATION  command.

Example

$ tfactl ips pack incident 861

$ tfactl ips pack time '2006-12-31 23:59:59.00 -07:00' to '2007-01-01 01:01:01.00 -07:00'

F.3.3.16 tfactl ips SET CONFIGURATION

Use the tfactl ips SET CONFIGURATION  command to change the value of an Incident Packaging Service configuration parameter.

Syntax

tfactl ips SET CONFIGURATION parameter_id value

Parameters

Table F-24 tfactl ips SET CONFIGURATION Command Parameters

Parameter Description

parameter_id

Specify the ID of the parameter to change.

value

Specify the new value for the parameter.

Example

$ tfactl ips set configuration 6 2

F.3.3.17 tfactl ips SHOW CONFIGURATION

Use the tfactl ips SHOW CONFIGURATION  command to view the current Incident Packaging Service settings.

Syntax

tfactl ips SHOW CONFIGURATION parameter_id

F.3.3.18 tfactl ips SHOW PACKAGE

Use the tfactl ips SHOW PACKAGE  command to view the details of a specific package.

Syntax

tfactl ips SHOW PACKAGE package_id [BASIC | BRIEF | DETAIL]

Note:

It is possible to specify the level of detail to use with this command.

BASIC :  Shows a minimal amount of information. It is the default when no package ID is specified.

BRIEF :  Shows a more extensive amount of information. It is the default when a package ID is specified.

DETAIL :  Shows the same information as BRIEF, and also some package history and information on included incidents and files.

Example

$ tfactl ips show package
$ tfactl ips show package 12 detail

F.3.3.19 tfactl ips SHOW FILES PACKAGE

Use the tfactl ips SHOW FILES PACKAGE  command to view the files included in a specific package.

Syntax

tfactl ips SHOW FILES PACKAGE package_id

Example

$ tfactl ips show files package 12

F.3.3.20 tfactl ips SHOW INCIDENTS PACKAGE

Use the tfactl ips SHOW INCIDENTS PACKAGE  command to view the incidents included in a specific package.

Syntax

tfactl ips SHOW INCIDENTS PACKAGE package_id

Example

$ tfactl ips show incidents package 12

F.3.3.21 tfactl ips SHOW PROBLEMS

Use the tfactl ips SHOW PROBLEMS  command to view the problems for the current Automatic Diagnostic Repository home.

Syntax

tfactl ips SHOW PROBLEMS

F.3.3.22 tfactl ips UNPACK FILE

Use the tfactl ips UNPACK FILE  command to unpack a physical file into a specific path.

Syntax

Running the following command automatically creates a valid ADR_HOME  structure. The path must exist and be writable.

tfactl ips UNPACK FILE file_spec [INTO path]

Example

$ tfactl ips unpack file /tmp/IPSPKG_20061026010203_COM_1.zip into /tmp/newadr

F.3.3.23 tfactl ips UNPACK PACKAGE

Use the tfactl ips UNPACK PACKAGE  command to unpack physical files in the current directory into a specific path, if they match the package name.

Syntax

Running the following command automatically creates a valid ADR_HOME structure. The path must exist and be writable.

tfactl ips UNPACK PACKAGE pkg_name [INTO path]

Example

$ tfactl ips unpack package IPSPKG_20061026010203 into /tmp/newadr

F.3.4 tfactl collection

Use the tfactl collection  command to stop a running Oracle Trace File Analyzer collection.

Syntax

tfactl collection [stop collection_id]

You can only stop a collection using the tfactl collection command. You must provide a collection ID, which you can obtain by running the tfactl print  command.

F.3.5 tfactl print

Use the tfactl print command to print information from the Berkeley database.

Syntax

tfactl print [status | config | directories | hosts | actions | repository | cookie]

Parameters

Table F-25 tfactl print Command Parameters

Parameter Description

status

Displays the status of Oracle Trace File Analyzer across all nodes in the cluster. Also, displays the Oracle Trace File Analyzer version and the port on which it is running.

config

Displays the current Oracle Trace File Analyzer configuration settings.

directories

Lists all the directories that Oracle Trace File Analyzer scans for trace or log file data. Also, displays the location of the trace directories allocated for the database, Oracle ASM, and instance.

hosts

Lists the hosts that are part of the Oracle Trace File Analyzer cluster, and that can receive cluster-wide commands.

actions

Lists all the actions submitted to Oracle Trace File Analyzer, such as diagnostic collection. By default, tfactl print commands only display actions that are running or that have completed in the last hour.

repository

Displays the current location and amount of used space of the repository directory. Initially, the maximum size of the repository directory is the smaller of either 10 GB or 50% of available file system space. If the maximum size is exceeded or the file system space gets to 1 GB or less, then Oracle Trace File Analyzer suspends operations and closes the repository. Use the tfactl purge command to clear collections from the repository.

cookie

Generates and displays an identification code for use by the tfactl set command.

Example

The tfactl print config command returns output similar to the following:
$ tfactl print config

.------------------------------------------------------------------------------------.
|                                       node1                                        |
+-----------------------------------------------------------------------+------------+
| Configuration Parameter                                               | Value      |
+-----------------------------------------------------------------------+------------+
| TFA Version                                                           | 12.2.1.0.0 |
| Java Version                                                          | 1.8        |
| Public IP Network                                                     | true       |
| Automatic Diagnostic Collection                                       | true       |
| Alert Log Scan                                                        | true       |
| Disk Usage Monitor                                                    | true       |
| Managelogs Auto Purge                                                 | false      |
| Trimming of files during diagcollection                               | true       |
| Inventory Trace level                                                 | 1          |
| Collection Trace level                                                | 1          |
| Scan Trace level                                                      | 1          |
| Other Trace level                                                     | 1          |
| Repository current size (MB)                                          | 5          |
| Repository maximum size (MB)                                          | 10240      |
| Max Size of TFA Log (MB)                                              | 50         |
| Max Number of TFA Logs                                                | 10         |
| Max Size of Core File (MB)                                            | 20         |
| Max Collection Size of Core Files (MB)                                | 200        |
| Minimum Free Space to enable Alert Log Scan (MB)                      | 500        |
| Time interval between consecutive Disk Usage Snapshot(minutes)        | 60         |
| Time interval between consecutive Managelogs Auto Purge(minutes)      | 60         |
| Logs older than the time period will be auto purged(days[d]|hours[h]) | 30d        |
| Automatic Purging                                                     | true       |
| Age of Purging Collections (Hours)                                    | 12         |
| TFA IPS Pool Size                                                     | 5          |
'-----------------------------------------------------------------------+------------'

In the preceding sample output:

  • Automatic diagnostic collection: When ON (default is OFF), if scanning an alert log, then finding specific events in those logs triggers diagnostic collection.

  • Trimming of files during diagcollection: Determines if Oracle Trace File Analyzer trims large files to contain only data that is within the specified time ranges. When trimming is OFF, no trimming of trace files occurs for automatic diagnostic collection.

  • Repository current size in MB: How much space in the repository is used.

  • Repository maximum size in MB: The maximum size of storage space in the repository. Initially, the maximum size is set to the smaller of either 10 GB or 50% of free space in the file system.

  • Trace Level: 1 is the default, and the values 2, 3, and 4 have increasing verbosity. While you can set the trace level dynamically for running the Oracle Trace File Analyzer daemon, increasing the trace level significantly impacts the performance of Oracle Trace File Analyzer. Increase the trace level only at the request of My Oracle Support.

  • Automatic Purging: Automatic purging of Oracle Trace File Analyzer collections is enabled by default. Oracle Trace File Analyzer collections are purged if their age exceeds the value of Minimum Age of Collections to Purge, and the repository space is exhausted.

  • Minimum Age of Collections to Purge (Hours): The minimum number of hours that Oracle Trace File Analyzer keeps a collection, after which Oracle Trace File Analyzer purges the collection. You can set the number of hours using the tfactl set minagetopurge=hours command.

  • Minimum Space free to enable Alert Log Scan (MB): The space limit, in MB, at which Oracle Trace File Analyzer temporarily suspends alert log scanning until space becomes free. Oracle Trace File Analyzer does not store alert log events if space on the file system used for the metadata database falls below the limit.

F.3.6 tfactl purge

Use the tfactl purge command to delete diagnostic collections from the Oracle Trace File Analyzer repository that are older than a specific time.

Syntax

tfactl purge -older number[h | d]

Example

The following command removes files older than 30 days:
$ tfactl purge -older 30d

F.3.7 tfactl managelogs

Use the tfactl managelogs  command to manage Automatic Diagnostic Repository log and trace files.

Syntax

tfactl managelogs [-purge [[-older nm|h|d] | [-gi] | [-database all|d1,d2,...]]] 
[-show [usage|variation] [[-older nd] | [-gi] | [-database all|d1,d2,...]]]

Parameters

Table F-26 tfactl managelogs Purge Options

Purge Option Description

-older

Time period for purging logs.

-gi

Purges Oracle Grid Infrastructure logs (all Automatic Diagnostic Repository homes under GIBASE/diag  and crsdata (cvu dirs)).

-database

Purges Oracle database logs (Default is all, else provide a list).

-dryrun

Estimates logs cleared by purge  command.

Table F-27 tfactl managelogs Show Options

Show Option Description

-older

Time period for change in log volume.

-gi

Space utilization under GIBASE.

-database

Space utilization for Oracle database logs (Default is all, else provide a list).

Example

$ tfactl managelogs -show usage -gi

Output from host : node3
------------------------------

.----------------------------------------------------------------------------------------.
|                                Grid Infrastructure Usage                               |
+----------------------------------------------------------------------------+-----------+
| Location                                                                   | Size      |
+----------------------------------------------------------------------------+-----------+
| /scratch/app/orabase/diag/clients/user_grid/host_1389480572_107/alert      | 8.00 KB   |
| /scratch/app/orabase/diag/clients/user_grid/host_1389480572_107/incident   | 4.00 KB   |
| /scratch/app/orabase/diag/clients/user_grid/host_1389480572_107/trace      | 1.55 MB   |
| /scratch/app/orabase/diag/clients/user_grid/host_1389480572_107/cdump      | 4.00 KB   |
| /scratch/app/orabase/diag/clients/user_oracle/host_1389480572_107/alert    | 8.00 KB   |
| /scratch/app/orabase/diag/clients/user_oracle/host_1389480572_107/incident | 4.00 KB   |
| /scratch/app/orabase/diag/clients/user_oracle/host_1389480572_107/trace    | 712.00 KB |
| /scratch/app/orabase/diag/clients/user_oracle/host_1389480572_107/cdump    | 4.00 KB   |
| /scratch/app/orabase/diag/tnslsnr/node3/listener/alert                     | 921.39 MB |
| /scratch/app/orabase/diag/tnslsnr/node3/listener/incident                  | 4.00 KB   |
| /scratch/app/orabase/diag/tnslsnr/node3/listener/trace                     | 519.20 MB |
| /scratch/app/orabase/diag/tnslsnr/node3/listener/cdump                     | 4.00 KB   |
| /scratch/app/orabase/diag/tnslsnr/node3/listener_scan2/alert               | 726.55 MB |
| /scratch/app/orabase/diag/tnslsnr/node3/listener_scan2/incident            | 4.00 KB   |
| /scratch/app/orabase/diag/tnslsnr/node3/listener_scan2/trace               | 339.90 MB |
| /scratch/app/orabase/diag/tnslsnr/node3/listener_scan2/cdump               | 4.00 KB   |
| /scratch/app/orabase/diag/diagtool/user_grid/adrci_1389480572_107/alert    | 8.00 KB   |
| /scratch/app/orabase/diag/diagtool/user_grid/adrci_1389480572_107/incident | 4.00 KB   |
| /scratch/app/orabase/diag/diagtool/user_grid/adrci_1389480572_107/trace    | 12.00 KB  |
| /scratch/app/orabase/diag/diagtool/user_grid/adrci_1389480572_107/cdump    | 4.00 KB   |
| /scratch/app/orabase/diag/diagtool/user_grid/adrci_1389480572_107/hm       | 4.00 KB   |
| /scratch/app/orabase/diag/crs/node3/crs/alert                              | 44.00 KB  |
| /scratch/app/orabase/diag/crs/node3/crs/incident                           | 4.00 KB   |
| /scratch/app/orabase/diag/crs/node3/crs/trace                              | 1.67 GB   |
| /scratch/app/orabase/diag/crs/node3/crs/cdump                              | 4.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_grid/host_1389480572_107/alert      | 8.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_grid/host_1389480572_107/incident   | 4.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_grid/host_1389480572_107/trace      | 8.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_grid/host_1389480572_107/cdump      | 4.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_root/host_1389480572_107/alert      | 20.00 KB  |
| /scratch/app/orabase/diag/asmtool/user_root/host_1389480572_107/incident   | 4.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_root/host_1389480572_107/trace      | 8.00 KB   |
| /scratch/app/orabase/diag/asmtool/user_root/host_1389480572_107/cdump      | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+
| Total                                                                      | 4.12 GB   |
'----------------------------------------------------------------------------+-----------'
$ tfactl managelogs -show variation  -older 2h -gi

Output from host : node1
------------------------------
2016-09-30 00:49:57: INFO Checking space variation for 2 hours


.----------------------------------------------------------------------------------------------------.
|                                    Grid Infrastructure Variation                                   |
+----------------------------------------------------------------------------+-----------+-----------+
| Directory                                                                  | Old Size  | New Size  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan2/trace               | 12.00 KB  | 12.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan2/incident            | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_root/host_1342558790_107/cdump      | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan3/cdump               | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/crs/node1/crs/alert                              | 328.00 KB | 404.00 KB |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_grid/host_1342558790_107/incident   | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan2/alert               | 16.00 KB  | 16.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener/cdump                     | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_root/host_1342558790_107/trace      | 8.00 KB   | 8.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/crs/node1/crs/incident                           | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan3/incident            | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_root/host_1342558790_107/incident   | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan1/alert               | 12.00 KB  | 12.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_grid/host_1342558790_107/trace      | 1.95 MB   | 2.42 MB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan3/alert               | 562.34 MB | 726.93 MB |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan1/incident            | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener/incident                  | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/crs/node1/crs/cdump                              | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener/trace                     | 307.22 MB | 394.32 MB |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_grid/host_1342558790_107/trace      | 12.00 KB  | 12.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_grid/host_1342558790_107/cdump      | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_grid/host_1342558790_107/incident   | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_oracle/host_1342558790_107/cdump    | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_grid/host_1342558790_107/cdump      | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_oracle/host_1342558790_107/incident | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan1/trace               | 8.00 KB   | 8.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan1/cdump               | 4.00 KB   | 4.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan3/trace               | 263.64 MB | 340.29 MB |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener/alert                     | 586.36 MB | 752.10 MB |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_oracle/host_1342558790_107/trace    | 1.17 MB   | 1.17 MB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_grid/host_1342558790_107/alert      | 16.00 KB  | 16.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/clients/user_oracle/host_1342558790_107/alert    | 8.00 KB   | 8.00 KB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/crs/node1/crs/trace                              | 1.63 GB   | 1.84 GB   |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_grid/host_1342558790_107/alert      | 12.00 KB  | 12.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/asmtool/user_root/host_1342558790_107/alert      | 12.00 KB  | 20.00 KB  |
+----------------------------------------------------------------------------+-----------+-----------+
| /scratch/app/orabase/diag/tnslsnr/node1/listener_scan2/cdump               | 4.00 KB   | 4.00 KB   |
'----------------------------------------------------------------------------+-----------+-----------'