TFA工具介绍

TFA是11.2版本上推出的用来收集RAC环境下的诊断日志的工具,它可以用非常简单的命令协助用户收集RAC里的日志,以便进一步进行诊断;TFA是类似diagcollection的一个oracle 集群日志收集器,而且TFA比diagcollection集中和自动化的诊断信息收集能力更强大。TFA有以下几个特点:
1)TFA可以在一台机器上执行一条简单的命令把所有节点的日志进行打包,封装;
2)TFA可以在收集的过程中对日志进行”trim”操作,减少数据的收集量;
3)TFA可以收集用来诊断用的“一段时间内”的数据;
4)TFA可以把所有节点的日志收集并封装好放在某一个节点上以便传输阅读;
5)TFA可以指定Cluster中的某一部分组件进行日志收集,如:ASM ,RDBMS,Clusterware
6)TFA可以根据条件配置对告警日志进行实时扫描(DB Alert Logs, ASM Alert Logs, Clusterware Alert Logs, etc);
7)TFA可以根据实时扫描的结果自动的收集诊断日志;
8)TFA可以根据指定的错误进行对告警日志的扫描;
9)TFA可以根据指定的错误扫描后的结果收集诊断日志;

检查服务是否启动

以下命令式在Linux平台下作为例子:
启动:

/oracle/app/19c/grid/bin/tfactl start
# /etc/init.d/init.tfa start
停止:

/oracle/app/19c/grid/bin/tfactl stop
# /etc/init.d/init.tfa stop
重启:

/oracle/app/19c/grid/bin/tfactl restart
# /etc/init.d/init.tfa restart

 

tfa默认使用5000端口:

netstat -tunlp|grep 5000

tcp6       0      0 192.168.52.151:5000     :::*        LISTEN      35510/java    

ps -ef|grep 35510

查看状态:

[root@ogg01 ~]# /oracle/app/19c/grid/bin/tfactl print status

WARNING – TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

 

.——————————————————————————————–.

| Host | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |

+——+—————+——-+——+————+———————-+——————+

| ogg01 | RUNNING       |  9967 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |

| ogg02 | RUNNING       | 35510 | 5000 | 18.3.3.0.0 | 18330020190315044534 | COMPLETE         |

'——+—————+——-+——+————+———————-+——————'

 

执行收集任务

[root@ogg01 ~]# /oracle/app/19c/grid/bin/tfactl diagcollect -all -since 1h -z cisdb

WARNING – TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

The -all switch is being deprecated as collection of all components is the default behavior. TFA will continue to collect all components.

Collecting data for all nodes

 

Collection Id : 20191202133005ogg01

 

Detailed Logging at : /oracle/app/grid/tfa/repository/collection_Mon_Dec_02_13_30_06_CST_2019_node_all/diagcollect_20191202133005_ogg01.log

2019/12/02 13:30:09 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom

2019/12/02 13:30:09 CST : Collection Name : tfa_cisdb.zip

2019/12/02 13:30:09 CST : Collecting diagnostics from hosts : [ogg01, ogg02]

2019/12/02 13:30:09 CST : Scanning of files for Collection in progress…

2019/12/02 13:30:09 CST : Collecting additional diagnostic information…

2019/12/02 13:30:24 CST : Getting list of files satisfying time range [12/02/2019 12:30:09 CST, 12/02/2019 13:30:24 CST]

2019/12/02 13:30:53 CST : Collecting ADR incident files…

2019/12/02 13:33:33 CST : Completed collection of additional diagnostic information…

2019/12/02 13:33:38 CST : Completed Local Collection

2019/12/02 13:33:38 CST : Remote Collection in Progress…

.———————————.

|        Collection Summary       |

+——+———–+——-+——+

| Host | Status    | Size  | Time |

+——+———–+——-+——+

| ogg02 | Completed | 30MB  | 203s |

| ogg01 | Completed | 9.4MB | 209s |

'——+———–+——-+——'

 

Logs are being collected to: /oracle/app/grid/tfa/repository/collection_Mon_Dec_02_13_30_06_CST_2019_node_all

/oracle/app/grid/tfa/repository/collection_Mon_Dec_02_13_30_06_CST_2019_node_all/ogg01.tfa_cisdb.zip

/oracle/app/grid/tfa/repository/collection_Mon_Dec_02_13_30_06_CST_2019_node_all/ogg02.tfa_cisdb.zip

 

Published by

风君子

独自遨游何稽首 揭天掀地慰生平