Using TFA(Trace File Analyzer) Collector (Part 2)

Using TFA(Trace File Analyzer) Collector

TFA(Trace File Analyzer) Collector - 
Tool for Enhanced Diagnostic Gathering (Doc ID 1513912.2)
Note: The installation for TFA is on my previous Post:
Install TFA
Make it Automatic for Star/Stop ...
1.) Collecting Information:

Options:
-all Collect all logs (If no time is given for collection then files for 
the last 4 hours
will be collected) This is the default option.
-oda Collect ODA/OS logs
-odastorage Collect ODA Storage logs and Data
-crs Collect CRS logs
-dbwlm Collect DBWLM logs
-acfs Collect ACFS logs
-asm Collect ASM logs
-database Collect database logs from databases specified
-install Collect Oracle Installation related files
-cfgtools Collect CFGTOOLS logs
-os Collect OS files such as /var/log/messages
-ashhtml Collect Generate ASH HTML Report (requires –database)
-ashtext Collect Generate ASH TEXT Report (requires –database)
-zdlra Collect Zero Data Loss Recovery Appliance specific logs and data.

-- Trim and Zip all files updated in the last 1 hour as well as chmos/osw data
-- from across the cluster and collect at the initiating node

[root@lnx01 ~]# tfactl diagcollect -all -since 1h

Collecting data for all components using above parameters...
Collecting data for all nodes

Collection Id : 20160429075309lnx01

Repository Location in lnx01 : /oracle/tfa/repository

Collection monitor will wait up to 30 seconds for collections to start
2016/04/29 07:53:13 EDT : Collection Name : tfa_Fri_Apr_29_07_53_09_EDT_2016.zip
2016/04/29 07:53:13 EDT : Scanning of files for Collection in progress...
2016/04/29 07:53:13 EDT : Collecting extra files...
2016/04/29 07:53:18 EDT : Getting list of files satisfying time range [04/29/2016 06:53:13 EDT, 04/29/2016 07:53:18 EDT]
2016/04/29 07:53:18 EDT : Starting Thread to identify stored files to collect
2016/04/29 07:53:18 EDT : Getting List of Files to Collect
2016/04/29 07:53:18 EDT : Trimming file : lnx01/tnslsnr/lnx01/listener/trace/listener.log with original file size : 3.4MB
2016/04/29 07:53:18 EDT : Finished Getting List of Files to Collect
2016/04/29 07:53:18 EDT : Collecting ADR incident files...
2016/04/29 07:53:18 EDT : Waiting for collection of extra files
2016/04/29 07:53:18 EDT : Completed collection of extra files...
2016/04/29 07:53:23 EDT : Completed Zipping of all files
2016/04/29 07:53:23 EDT : Cleaning up temporary files
2016/04/29 07:53:23 EDT : Finished Cleaning up temporary files
2016/04/29 07:53:23 EDT : Finalizing the Collection Zip File
2016/04/29 07:53:23 EDT : Finished Finalizing the Collection Zip File
2016/04/29 07:53:23 EDT : Total Number of Files checked : 1072
2016/04/29 07:53:23 EDT : Total Size of all Files Checked : 33MB
2016/04/29 07:53:23 EDT : Number of files containing required range : 27
2016/04/29 07:53:23 EDT : Total Size of Files containing required range : 12MB
2016/04/29 07:53:23 EDT : Number of files trimmed : 1
2016/04/29 07:53:23 EDT : Total Size of data prior to zip : 9.6MB
2016/04/29 07:53:23 EDT : Saved 3.3MB by trimming files
2016/04/29 07:53:23 EDT : Zip file size : 387kB
2016/04/29 07:53:23 EDT : Total time taken : 10s
2016/04/29 07:53:23 EDT : Completed collection of zip files.

Logs are being collected to: /oracle/tfa/repository/collection_Fri_Apr_29_07_53_09_EDT_2016_node_all
/oracle/tfa/repository/collection_Fri_Apr_29_07_53_09_EDT_2016_node_all/lnx01.tfa_Fri_Apr_29_07_53_09_EDT_2016.zip

-- Trim and Zip all files from database CDB in the last 1 hour and
-- collect at the initiating node

[root@lnx01 ~]# ps -ef | grep smon
oracle    1809     1  0 03:44 ?        00:00:00 ora_smon_db11
oracle    1862     1  0 03:44 ?        00:00:00 ora_smon_db12c
oracle    1993     1  0 03:44 ?        00:00:00 asm_smon_+ASM
oracle    2324     1  0 03:46 ?        00:00:00 ora_smon_CDB

[root@lnx01 ~]# tfactl diagcollect -database CDB -since 1h -z foo
Collecting data for all nodes

Collection Id : 20160429075802lnx01

Repository Location in lnx01 : /oracle/tfa/repository

Collection monitor will wait up to 30 seconds for collections to start
2016/04/29 07:58:05 EDT : Collection Name : tfa_foo.zip
2016/04/29 07:58:05 EDT : Scanning of files for Collection in progress...
2016/04/29 07:58:05 EDT : Collecting extra files...
2016/04/29 07:58:10 EDT : Getting list of files satisfying time range [04/29/2016 06:58:05 EDT, 04/29/2016 07:58:10 EDT]
2016/04/29 07:58:10 EDT : Starting Thread to identify stored files to collect
2016/04/29 07:58:10 EDT : Getting List of Files to Collect
2016/04/29 07:58:10 EDT : Finished Getting List of Files to Collect
2016/04/29 07:58:11 EDT : Collecting ADR incident files...
2016/04/29 07:58:11 EDT : Waiting for collection of extra files
2016/04/29 07:58:12 EDT : Completed collection of extra files...
2016/04/29 07:58:16 EDT : Completed Zipping of all files
2016/04/29 07:58:16 EDT : Cleaning up temporary files
2016/04/29 07:58:16 EDT : Finished Cleaning up temporary files
2016/04/29 07:58:16 EDT : Finalizing the Collection Zip File
2016/04/29 07:58:16 EDT : Finished Finalizing the Collection Zip File
2016/04/29 07:58:16 EDT : Total Number of Files checked : 1072
2016/04/29 07:58:16 EDT : Total Size of all Files Checked : 33MB
2016/04/29 07:58:16 EDT : Number of files containing required range : 3
2016/04/29 07:58:16 EDT : Total Size of Files containing required range : 15kB
2016/04/29 07:58:16 EDT : Number of files trimmed : 0
2016/04/29 07:58:16 EDT : Total Size of data prior to zip : 153kB
2016/04/29 07:58:16 EDT : Saved 0kB by trimming files
2016/04/29 07:58:16 EDT : Zip file size : 28kB
2016/04/29 07:58:16 EDT : Total time taken : 11s
2016/04/29 07:58:16 EDT : Completed collection of zip files.

Logs are being collected to: /oracle/tfa/repository/collection_Fri_Apr_29_07_58_02_EDT_2016_node_all
/oracle/tfa/repository/collection_Fri_Apr_29_07_58_02_EDT_2016_node_all/lnx01.tfa_foo.zip

-- Trim and Zip all ASM logs from lnx01 updated between from and to time and
-- collect at the initiating node

[root@lnx01 ~]# hostname
lnx01

tfactl diagcollect -asm -node lnx01 -from Apr/29/2016 -to "Apr/29/2016 08:00:00"
Collecting data for lnx01 node(s)
Scanning files from Apr/29/2016 00:00:00 to Apr/29/2016 08:00:00

Collection Id : 20160429080435lnx01

Repository Location in lnx01 : /oracle/tfa/repository

Collection monitor will wait up to 30 seconds for collections to start
2016/04/29 08:04:37 EDT : Collection Name : tfa_Fri_Apr_29_08_04_35_EDT_2016.zip
2016/04/29 08:04:37 EDT : Scanning of files for Collection in progress...
2016/04/29 08:04:37 EDT : Collecting extra files...
2016/04/29 08:04:41 EDT : Completed collection of extra files...
2016/04/29 08:04:42 EDT : Getting list of files satisfying time range [04/29/2016 00:00:00 EDT, 04/29/2016 08:00:00 EDT]
2016/04/29 08:04:42 EDT : Starting Thread to identify stored files to collect
2016/04/29 08:04:42 EDT : Getting List of Files to Collect
2016/04/29 08:04:42 EDT : Finished Getting List of Files to Collect
2016/04/29 08:04:42 EDT : Collecting ADR incident files...
2016/04/29 08:04:42 EDT : Completed Zipping of all files
2016/04/29 08:04:42 EDT : Cleaning up temporary files
2016/04/29 08:04:42 EDT : Finished Cleaning up temporary files
2016/04/29 08:04:42 EDT : Finalizing the Collection Zip File
2016/04/29 08:04:42 EDT : Finished Finalizing the Collection Zip File
2016/04/29 08:04:42 EDT : Total Number of Files checked : 1072
2016/04/29 08:04:42 EDT : Total Size of all Files Checked : 33MB
2016/04/29 08:04:42 EDT : Number of files containing required range : 1
2016/04/29 08:04:42 EDT : Total Size of Files containing required range : 351kB
2016/04/29 08:04:42 EDT : Number of files trimmed : 0
2016/04/29 08:04:42 EDT : Total Size of data prior to zip : 487kB
2016/04/29 08:04:42 EDT : Saved 0kB by trimming files
2016/04/29 08:04:42 EDT : Zip file size : 52kB
2016/04/29 08:04:42 EDT : Total time taken : 5s
2016/04/29 08:04:42 EDT : Completed collection of zip files.

Logs are being collected to: /oracle/tfa/repository/collection_Fri_Apr_29_08_04_35_EDT_2016_node_lnx01
/oracle/tfa/repository/collection_Fri_Apr_29_08_04_35_EDT_2016_node_lnx01/lnx01.tfa_Fri_Apr_29_08_04_35_EDT_2016.zip

2.) Configure

tfactl set

The set command allows us to adjust the way TFAMain is running. This command makes the
changes that you can see when doing a tfactl print config. By default changes are made locally
so if the change is required on all nodes you must supply the ‘-c’ flag.

[root@lnx01 ~]# tfactl set -h

Usage: /oracle/tfa/bin/tfactl set [
            autodiagcollect=<ON | OFF> | trimfiles=<ON | OFF> |
            tracelevel=<COLLECT|SCAN|INVENTORY|OTHER>:<1|2|3|4> |
            reposizeMB=<n> | repositorydir=<dir> [-force] |
            logsize=<n> [-local] | logcount=<n> [-local] |
            maxcorefilesize=<n> [-local] | maxcorecollectionsize=<n> [-local]
            autopurge=<ON | OFF> | rtscan=<ON|OFF> | minagetopurge=<n>
        ] [-c]

   Turn ON/OFF or Modify various TFA features

  rtscan              allow Alert Log Scanning
  autodiagcollect     allow for automatic diagnostic collection when an event
                      is observed (default ON)
  autopurge           allow automatic purging of collections when less space
                      is observed in repository (default ON)
  minagetopurge       the minimum age of a collection in hours before it is
                      considered for purging
  trimfiles           allow trimming of files during diagcollection (default ON)
  tracelevel          control the trace level of log files in /oracle/tfa/lnx01/tfa_home/log
                      (default 1 for all facilities)
  repositorydir=<dir> set the diagcollection repository to <dir>
  reposizeMB=<n>      set the maximum size of diagcollection repository to <n>MB
  logsize=<n>         set the maximum size of each TFA log to <n>MB (default 50 MB)
  logcount=<n>        set the maximum number of TFA logs to <n> (default 10)
  maxcorefilesize=<n> set the maximum size of Core File to <n>MB (default 20 MB )
  maxcorecollectionsize=<n> set the maximum collection size of Core Files to <n>MB (default 200 MB )

  minSpaceForRTScan=<n>     Minimun space required to run RT Scanning(default 500)
  -force              skip inital checks while changing repository (Not Recommended)
  -c                  set the value on all nodes (Does not apply to repository
                      settings)

Examples:
  /oracle/tfa/bin/tfactl set autodiagcollect=ON
  /oracle/tfa/bin/tfactl set autopurge=ON
  /oracle/tfa/bin/tfactl set minagetopurge=15
  /oracle/tfa/bin/tfactl set tracelevel=INVENTORY:3
  /oracle/tfa/bin/tfactl set reposizeMB=20480
  /oracle/tfa/bin/tfactl set logsize=100
  
 3.) Tool Status
 
 [root@lnx01 ~]# tfactl toolstatus
.------------------------------------.
|       External Support Tools       |
+-------+--------------+-------------+
| Host  | Tool         | Status      |
+-------+--------------+-------------+
| lnx01 | alertsummary | DEPLOYED    |
| lnx01 | exachk       | DEPLOYED    |
| lnx01 | ls           | DEPLOYED    |
| lnx01 | pstack       | DEPLOYED    |
| lnx01 | orachk       | DEPLOYED    |
| lnx01 | sqlt         | DEPLOYED    |
| lnx01 | grep         | DEPLOYED    |
| lnx01 | summary      | DEPLOYED    |
| lnx01 | prw          | NOT RUNNING |
| lnx01 | vi           | DEPLOYED    |
| lnx01 | tail         | DEPLOYED    |
| lnx01 | param        | DEPLOYED    |
| lnx01 | dbglevel     | DEPLOYED    |
| lnx01 | darda        | DEPLOYED    |
| lnx01 | history      | DEPLOYED    |
| lnx01 | oratop       | DEPLOYED    |
| lnx01 | oswbb        | RUNNING     |
| lnx01 | changes      | DEPLOYED    |
| lnx01 | events       | DEPLOYED    |
| lnx01 | ps           | DEPLOYED    |
| lnx01 | srdc         | DEPLOYED    |
'-------+--------------+-------------'

Make it Automatic for Star/Stop ...
Advertisements

One thought on “Using TFA(Trace File Analyzer) Collector (Part 2)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s