4.5.3 Running On-Demand Custom Collections

Use the custom collection options to collect diagnostic data from specific nodes, components, and directories.

By default, Oracle Trace File Analyzer:

  • Collects from all nodes in the cluster

  • Collects from all Oracle database and Oracle Grid Infrastructure components

  • Compresses the collections into the repository directory in a zip file with the following format:

    repository/collection_date_time/node_all/node.tfa_date_time.zip
  • Copies back all zip files from remote notes to the initiating node

  • Trims the files around the relevant time

  • Includes any relevant core files it finds

Also, Oracle Trace File Analyzer Collector collects files from any other directories you want.

Topics:

4.5.3.1 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

4.5.3.2 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 CRS 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-3 Component Options

    Component Option Description

    -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 DBWLM logs.

    -tns

    Collects TNS logs.

    -rhp

    Collects RHP logs.

    -procinfo

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

    -afd

    Collects AFD logs.

    -crs

    Collects CRS logs.

    -wls

    Collects WLS logs.

    -emagent

    Collects EMAGENT logs.

    -oms

    Collects OMS logs.

    -ocm

    Collects OCM logs.

    -emplugins

    Collects EMPLUGINS logs.

    -em

    Collects EM logs.

    -acfs

    Collects ACFS logs and data.

    -install

    Collects Oracle Installation related files.

    -cfgtools

    Collects CFGTOOLS logs.

    -os

    Collects operating system files such as /var/log/messages.

    -ashhtml

    Collects Generate ASH HTML Report.

    -ashtext

    Collects Generate ASH TEXT Report.

    -awrhtml

    Collects AWRHTML logs.

4.5.3.3 Collecting from Specific Directories

To collect from specific directories:

  1. To include all files, no matter the type or time last updated, from other directories in the collection:
    tfactl diagcollect –collectdir dir1,dir2,...dirn

    For example:

    To trim and collect all CRS files updated in the last 12 hours 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 collect from all directories:
    tfactl diagcollect -collectalldirs

    Oracle Trace File Analyzer collects from all files in the directory irrespective of time or time range.

    For example:

    To collect all standard trace and diagnostic files updated in the past day, plus all files from any collectall directories, no matter when they were updated:
    $ tfactl diagcollect -since 1d -collectalldirs

Related Topics

4.5.3.4 Changing the Collection Name

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.

    For example:
    $ tfactl diagcollect -since 1h -tag MyTagName
    Collecting data for all nodes
    ....
    ....
    
    Logs are being collected to: /scratch/app/crsusr/tfa/repository/MyTagName
    /scratch/app/crsusr/tfa/repository/MyTagName/rws1290666.tfa_Mon_Aug_22_05_26_17_PDT_2016.zip
    /scratch/app/crsusr/tfa/repository/MyTagName/rws1290665.tfa_Mon_Aug_22_05_26_17_PDT_2016.zip
    
  2. To rename the zip  file:
    –z zip name
    For example:
    $ tfactl diagcollect -since 1h -z MyCollectionName.zip
    Collecting data for all nodes
    ....
    ....
    Logs are being collected to: /scratch/app/crsusr/tfa/repository/collection_Mon_Aug_22_05_13_41_PDT_2016_node_all
    /scratch/app/crsusr/tfa/repository/collection_Mon_Aug_22_05_13_41_PDT_2016_node_all/myserver65.tfa_MyCollectionName.zip
    /scratch/app/crsusr/tfa/repository/collection_Mon_Aug_22_05_13_41_PDT_2016_node_all/myserver66.tfa_MyCollectionName.zip
    

Related Topics

4.5.3.5 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

4.5.3.6 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

4.5.3.7 Preventing Collecting Core Files

  1. To prevent core files being included:
    –nocores
    For example:
    $ tfactl diagcollect -last 1d -nocores

4.5.3.8 Collecting Incident Packaging Service Packages

Oracle Trace File Analyzer is capable of calling the Incident Packaging Service (IPS), which collects files from the Automatic Diagnostic Repository (ADR).
  1. To run Incident Packaging Service:
    $ tfactl ips
  2. To collect with Incident Packaging Service:
    $ tfactl diagcollect -ips
  3. To show all Incident Packaging Service incidents:
    $ tfactl ips show incidents
  4. To show all Incident Packaging Service problems:
    $ tfactl ips show problems
  5. To show all Incident Packaging Service problems:
    $ tfactl ips show package
  6. To see available diagcollect  Incident Packaging Service options:
    $ tfactl diagcollect -ips -h
  7. To run Incident Packaging Service collection interactively:
    $ tfactl diagcollect -ips

    When you run interactively, you are prompted to select the Automatic Diagnostic Repository area to collect from.

  8. To run Incident Packaging Service collection in silent mode:
    $ tfactl diagcollect -ips -adrbasepath path -adrhomepath path
  9. Use the standard diagcollect  options to limit the scope of Incident Packaging Service collection.
    For example, to collect Incident Packaging Service packages for the given ADR basepath/homepath  in the last hour in the local node:
    $ tfactl diagcollect -ips -adrbasepath /scratch/app/oragrid -adrhomepath diag/crs/hostname/crs -since 1h -node local
  10. To collect Automatic Diagnostic Repository details about a specific incident ID:
    $ tfactl diagcollect -ips -incident incident id -node local
  11. To collect Automatic Diagnostic Repository details about a specific problem ID:
    $ tfactl diagcollect -ips -problem problem id -node local

    To change the contents of the Incident Packaging Service package, you can initiate collection, pause it, manipulate the package, and then resume collection.

  12. To collect Automatic Diagnostic Repository details about a specific incident id on the local node and pause for Incident Packaging Service package manipulation:
    $ tfactl diagcollect -ips -incident incident id -manageips -node local
  13. To print all paused Oracle Trace File Analyzer Incident Packaging Service collections:
    $ tfactl print suspendedips
  14. To resume a suspended Oracle Trace File Analyzer Incident Packaging Service collection:
    $ tfactl diagcollect -resumeips collection id