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 (-).
| Option | Description |
|---|---|
[ [-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.
|
[-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: |
[-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:
|
-sundiagcompute | Specify to run sundiag on Compute nodes. |
-sundiagcell | Specify to run sundiag on storage cells. |
-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 n h | d | -from time -to time | -for time ] |
|
-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. |
-dryrun | Creates 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. |
-silent | Specify this parameter to run diagnostic collection as a background process |
-cores | Specify this parameter to collect core files when it would normally have not 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. |
[-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
|
[-acrlevel system , database , userdata ] | Use this parameter to specify the ACR level(s) for redaction. ACR supports the following three levels:
|
-sanitize |
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 |
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. |
-examples | Specify this parameter to view diagcollect usage examples. |
-singlearchive | Specify this parameter to merge remote zip files into a single zip file on the initiating node. |
-nodbforegroundfiles | Specify 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.