16.4 Managing Collections

Manage directories configured in Oracle Trace File Analyzer and diagnostic collections.

16.4.1 Including Directories

Add directories to the Oracle Trace File Analyzer configuration to include the directories in diagnostic collections.

Oracle Trace File Analyzer then stores diagnostic collection metadata about the:

  • Directory

  • Subdirectories

  • Files in the directory and all sub directories

All Oracle Trace File Analyzer users can add directories they have read access to.

To manage directories:

  1. To view the current directories configured in Oracle Trace File Analyzer
    tfactl print directories [ -node all | local | n1,n2,... ] 
    [ -comp component_name1,component_name2,.. ] 
    [ -policy  exclusions | noexclusions ] 
    [ -permission public | private ]
  2. To add directories:
    tfactl directory add dir 
    [ -public ] 
    [ -exclusions | -noexclusions | -collectall ] 
    [ -node all | n1,n2,... ]
  3. To remove a directory from being collected:
    tfactl directory remove dir [ -node all | n1,n2,... ]

16.4.2 Managing the Size of Collections

Use the Oracle Trace File Analyzer configuration options trimfiles, maxcorefilesize, maxcorecollectionsize, and diagcollect -cores to include core files.

To manage the size of collections:

  1. To trim files during diagnostic collection:
    tfactl set trimfiles=ON|OFF
    • When set to ON (default), Oracle Trace File Analyzer trims files to include data around the time of the event

    • When set to OFF, any file that was written to at the time of the event is collected in its entirety

  2. To set the maximum size of core file to n MB (default 20 MB):
    tfactl set maxcorefilesize=n

    Oracle Trace File Analyzer skips core files that are greater than maxcorefilesize.

  3. To set the maximum collection size of core files to n MB (default 200 MB):
    tfactl set maxcorecollectionsize=n

    Oracle Trace File Analyzer skips collecting core files after maxcorecollectionsize is reached.

  4. To collect core files with diagnostic collections:
    tfactl diagcollect -cores

16.4.3 Temporarily Restrict Automatic Diagnostic Collections for Specific Events

Use the tfactl blackout command to suppress automatic diagnostic collections.

If you set blackout for a target, then Oracle Trace File Analyzer stops automatic diagnostic collections if it finds events in the alert logs for that target while scanning.

You can also restrict automatic diagnostic collection at a granular level, for example, only for ORA-00600 or even only ORA-00600 with specific arguments.

tfactl blackout add -targettype database -target mydb -event "ORA-00600"

Event "ORA-00600" is blacked out until Wed Feb 20 00:20:34 PST 2019 on targettype : database, target : mydb

You can also blackout a resource that does not exist yet. For example, if you want to create a database and you do not want to care about the status until the provisioning is completed, then do as follows:
  1. Blackout the database you are about to create
  2. Create the database
  3. Remove the blackout