tfactl diagcollect

Use the tfactl diagcollect command to perform on-demand diagnostic collection. You can configure a number of different parameters to determine how large or detailed a collection you want. You can specify a specific time of an incident or a time range for data to be collected, and determine if whole files that have relevant data should be collected or just a time interval of data from those files.

Note:

If you specify no parameters, then the tfactl diagcollect command collects files from all nodes for all components where the file has been updated in the last four hours, and also trims excessive files. If an incident occurred prior to this period, then you can use the parameters documented in this section to target the correct data collection period.

Syntax

tfactl diagcollect [-all | -database all | database_1,database_2,... | -asm | -crs | -os | -install]
[-node all | local | node_1,node_2,...][-tag description] [-z file_name]
[-since numberh | d | -from "mmm/dd/yyyy hh:mm:ss" -to "mmm/dd/yyyy hh:mm:ss"
| -for "mmm/dd/yyyy hh:mm:ss" [-nocopy] [-nomonitor]]

Parameters

Table J-15 tfactl diagcollect Command Parameters

Parameter Description
-all | -database all
 | database_1,database_2,...
 | -asm | -crs | -os |
 -install

You can choose one or more individual components from which to collect trace and log files or choose -all to collect all files in the inventory. If you do not specify a time interval, then TFACTL collects files from the last four hours.

-node all | local |
 node_1,node_2,...

You can 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 TFA repository.

-z file_name

Use this parameter to specify an output file name.

-since 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 -since 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 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 TFA repository on the executing node.

-nomonitor

Specify this parameter to prevent the terminal on which you run the command from displaying the progress of the command.

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
    
  • 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 –since 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 -since 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 -since 6h
    
  • The following command trims and zips all Oracle ASM logs from node1 updated between July 4, 2014 and July 5, 2015 at 21:00, and collects it on the initiating node:

    # tfactl diagcollect -asm -node node1 -from Jul/4/2014 -to "Jul/5/2014 21:00:00"
    
  • The following command trims and zips all log files updated on July 2, 2014 and collects it on the initiating node:

    # tfactl diagcollect -for Jul/2/2014
    
  • The following command trims and zips all log files updated from 09:00 on July 2, 2014, to 09:00 on July 3, 2014, which is 12 hours before and after the time specified in the command, and collects it on the initiating node:

    # tfactl diagcollect -for "Jul/2/2014 21:00:00"