tfactl diagcollect

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

Note:

To collect generic diagnostic collections, run the tfactl diagcollect command as the db, grid, root, or any user listed in tfactl access lsusers. For SRDCs, only promoted users or those with platinum access are authorized to run the tfactl diagcollect command.

AHF 25.3

Starting in AHF 25.3, a minimum collection or analysis period of 15 minutes is required for collecting diagnostics or insights. If the specified collection time is less than 15 minutes, TFACTL returns an error message prompting the user to extend the collection period.

AHF 23.8

Starting in AHF 23.8, you will be able to upload to pre-authenticated (PAR) URL. Uploading AHF Insights reports helps Oracle Cloud Operations to identify, investigate, track, and resolve system health issues and divergences in best practice configurations quickly and effectively.

Oracle Exadata Database Service on Dedicated Infrastructure (ExaDB-D) and Oracle Base Database Service

To upload AHF Insights report to PAR location, run:

tfactl diagcollect -insights -last 1h -par <par_url>
tfactl insight -last 1h -par <par_url>

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

Syntax

tfactl diagcollect [ [-insights] [component_name1] [component_name2] ... [component_nameN] | [-srdc <srdc_profile>] | [-defips]]
[-sr <SR#>]
[-node n1,n2,..>]
[-cellnode cel1,cel2,..> [-nomaxcells] | -nocell]
[-sundiagcompute ]
[-sundiagcell]
[-tag <tagname>]
[-z <filename>]
[-last <n><m|h|d>| -from <time> -to <time> | -for <time>]
[-nocopy]
[-notrim]
[-dryrun]
[-nodbforegroundfiles]
[-silent]
[-cores]
[-collectalldirs] [-collectdir <dir1,dir2..>]
[-collectfiles <file1,..,fileN,dir1,..,dirN> [-onlycollectfiles]]
[-par <par_url>]
[-onlyinsights]
[-request_from <requestor>]
[-singlearchive]
[-examples]

Components:

-ips|-database|-asm|-crsclient|-dbclient|-dbwlm|-tns|-rhp|-fpp|-procinfo|-cvu|-afd|-crs|-cha|-wls|-emagenti|-emagent|-oms|-omsi|-ocm|-emplugins|-em|-acfs|-install|-cfgtools|-os|-ashhtml|-ashtext|-awrhtml|-awrtext|-sosreport|-ahf|-syslens|-hami|-avs|-goldengate|-asr|-sundiagcompute|-sundiagcell|-zdlra|-exaswitch

For detailed help on each component, use `tfactl diagcollect [*component_name1*] [*component_name2*] ... [*component_nameN*] -help`

Parameters

Prefix each option with a minus sign (-).

OptionDescription
[ [-insights] [ component_name1 ] [ component_name2 ] ... [ component_nameN ] | [-srdc srdc_profile ] | [-defips]]]

Specify the list of components for which you want to obtain collections, or specify the SRDC name, or specify to include Incident Packaging Service (IPS) Packages for Oracle Automatic Storage Management (Oracle ASM), Oracle Clusterware, and Oracle Databases in the default collection.

-insights: Specify to include the AHF Insights Report in the diagnostic collection.

[-defips]: Specify to Include in the default collection the IPS Packages for ASM, CRS, and Databases.

[-sr SR# ]Specify the Service Request number to which Oracle Trace File Analyzer automatically uploads all collections.
-node all|local| n1,n2,...

Collects diagnostics from the nodes specified.

Specify a comma-delimited list of nodes. If you do not specify, then the commands collects diagnostics for all the nodes by default.

For example: tfactl diagcollect -node node1

[-cellnode cel1 , cel2 ,..> [-nomaxcells] | -nocell]

Collects diagnostics from the cells specified.

Specify a comma-delimited list of cells. If you do not specify, then the commands collects diagnostics for all the cells by default.

For example: tfactl diagcollect -cellnode all

-nomaxcells: Specify to override the limit of cells for collection.

-nocell: Specify not to include collections on storage cells

-sundiagcomputeSpecify to run sundiag on Compute nodes.
-sundiagcellSpecify to run sundiag on storage cells.
-tag descriptionUse this parameter to create a subdirectory for the resulting collection in the Oracle Trace File Analyzer repository.
-z file_nameUse this parameter to specify an output file name.
[-last n h | d | -from time -to time | -for time ]
  • 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 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.

    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.

-nocopySpecify 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.
-notrimSpecify this parameter to stop trimming the files collected.
-dryrunCreates a text file that contains a list of all the files that would have been collected and which scripts would be run for the specific diagcollect command without actually doing the collection.
-silentSpecify this parameter to run diagnostic collection as a background process
-coresSpecify this parameter to collect core files when it would normally have not been collected.
-collectalldirsSpecify this parameter to collect all files from a directory that has Collect All flag marked true.
-collectdir dir1 , dir2 ,... dirnSpecify 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.
[-collectfiles file1 ,.., fileN , dir1 ,.., dirN [-onlycollectfiles]]

Specify a comma-delimited list of files and directories and the collection will include the files and directories in addition to the components specified.

If -onlycollectfiles is also used, then no other components will be collected.

Note:

Collection time filters such as -from, -to, -last, and -for are not applicable to files or directories specified with these arguments. All such files and directories are collected.

[-acrlevel system , database , userdata ]

Use this parameter to specify the ACR level(s) for redaction.

ACR supports the following three levels:

  • system: For entity types such as hostname, IP, port, and user name.
  • database: For entity types such as dbname, tbsname, svcname, and sqlstmt.
  • userdata: For block dumps and redo log dumps.
-sanitize

Note:

Starting with Oracle Autonomous Health Framework 24.1, the Oracle Trace File Analyzer masking feature is deprecated, and can be desupported in a future release.

For more information, see Deprecated Oracle Trace File Analyzer Masking in Release 24.1

Sanitize sensitive values in the collection using Adaptive Classification and Redaction (ACR).

This option will significantly increase the elapsed and actual processor time required to complete the collection.

-mask

Note:

Starting with Oracle Autonomous Health Framework 24.1, the Oracle Trace File Analyzer masking feature is deprecated, and can be desupported in a future release.

For more information, see Deprecated Oracle Trace File Analyzer Masking in Release 24.1

Mask sensitive values in the collection using Adaptive Classification and Redaction (ACR).

This option will significantly increase the elapsed and actual processor time required to complete the collection.

-examplesSpecify this parameter to view diagcollect usage examples.
-singlearchiveSpecify this parameter to merge remote zip files into a single zip file on the initiating node.
-nodbforegroundfilesSpecify this parameter to filter out all foreground database logs, regardless of their size.

Example tfactl diagcollect -onlycollectfiles -collectfiles

tfactl diagcollect -onlycollectfiles -collectfiles
/tmp/tfa/tracedir,/tmp/tfa/tracedir/trace1.log,/tmp/tfa/tracedir2/trace2_dir2.log
-node local -since 1h
Collecting data for local node(s).

TFA is using system timezone for collection, All times shown in UTC.

Collection Id : 20210721225241

Detailed Logging at :
/opt/oracle.ahf/data/repository/collection_Wed_Jul_21_22_52_46_UTC_2021_node_local/diagcollect_20210721225241_.log
2021/07/21 22:52:51 UTC : NOTE : Any file or directory name containing the
string .com will be renamed to replace .com with dotcom
2021/07/21 22:52:51 UTC : Collection Name : tfa_Wed_Jul_21_22_52_44_UTC_2021.zip
2021/07/21 22:52:51 UTC : Getting list of files satisfying time range
[07/21/2021 21:52:51 UTC, 07/21/2021 22:52:51 UTC]
2021/07/21 22:52:51 UTC : Collecting additional diagnostic information...
2021/07/21 22:52:53 UTC : Collecting ADR incident files...
2021/07/21 22:53:15 UTC : Completed collection of additional diagnostic
information...
2021/07/21 22:53:18 UTC : Completed Local Collection
2021/07/21 22:53:18 UTC : Redacting the collection...
2021/07/21 22:55:06 UTC : Redacted masked Host name :owlo000037-vm1
2021/07/21 22:55:06 UTC : Successfully redacted the collection
.-------------------------------------------.
|             Collection Summary            |
+----------------+-----------+-------+------+
| Host           | Status    | Size  | Time |
+----------------+-----------+-------+------+
|  | Completed | 1.6MB |  27s |
'----------------+-----------+-------+------'

Logs are being collected to:
/opt/oracle.ahf/data/repository/collection_Wed_Jul_21_22_52_46_UTC_2021_node_local
/opt/oracle.ahf/data/repository/collection_Wed_Jul_21_22_52_46_UTC_2021_node_local/owlo000037-vm1.tfa_Wed_Jul_21_22_52_44_UTC_2021.zip

For more information, see https://support.oracle.com/rs?type=doc&id=1513912.2.