TFA工具使用

TFA是在11.2版本上推出的用来收集Grid Infrastructure/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@rac1 ~]# /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 |

+------+---------------+-------+------+------------+----------------------+------------------+

| rac1 | RUNNING       |  9967 | 5000 | 19.2.0.0.0 | 19200020190426041420 | COMPLETE         |

| rac2 | RUNNING       | 35510 | 5000 | 18.3.3.0.0 | 18330020190315044534 | COMPLETE         |

'------+---------------+-------+------+------------+----------------------+------------------'

 

执行收集任务

[root@rac1 ~]# /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 : 20191202133005rac1

 

Detailed Logging at : /oracle/app/grid/tfa/repository/collection_Mon_Dec_02_13_30_06_CST_2019_node_all/diagcollect_20191202133005_rac1.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 : [rac1, rac2]

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 |

+------+-----------+-------+------+

| rac2 | Completed | 30MB  | 203s |

| rac1 | 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/rac1.tfa_cisdb.zip

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

https://blog.csdn.net/qq_21127313/article/details/79697008

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值