TFA(Trace File Analyzer)的安装与使用(ORACLE版本12C)
TFA是Oracle从11.2版本开始推出的一种类似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可以根据指定的错误扫描后的结果收集诊断日志;
TFA工作方式
DBA发出diagcollect命令,启动TFA日志收集进程。
本地TFA发送收集请求至其他节点的TFA,在其他节点上开始日志收集工作。
本地TFA也同时开始进行日志收集工作。
所有涉及节点的TFA日志都归档至发起diagcollect命令的"master"节点。
DBA提取已归档的TFA日志信息,进行分析或提交SR进行处理
在安装12C的程序的最后一步执行root脚本的时候,会有如下提示
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
Oracle Trace File Analyzer (TFA - User Mode) is available at :
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/bin/tfactl
OR
Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script :
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/install/roottfa.sh
如果选择no,那就不会安装该工具,默认是no
有两种方法启动TFA
一种是直接到
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/bin/tfactl目录下执行命令操作
另一种是安装到系统
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/install/roottfa.sh,执行完毕会有如下提示
/u01/app/oracle/product/12.2.0/dbhome_1/suptools/tfa/release/tfa_home/install/roottfa.sh
Installing Oracle Trace File Analyzer (TFA).
Log File: /u01/app/oracle/product/12.2.0/dbhome_1/install/root_12cr2.yudean.com_2017-03-14_15-53-55.log
Finished installing Oracle Trace File Analyzer (TFA)
tfactl start/stop 启动和关闭tfactl
tfactl> access lsusers 查看当前哪些用户可以使用tfactl
tfactl> print status 查看当前TFA主机的状态
tfactl> print config 列出当前TFA的配置信息
tfactl> print directories 列出对哪些目录进行了统计
增加目录
tfactl directory add dir [ -public ]
[ -exclusions | -noexclusions | -collectall ]
[ -node all | n1,n2,... ]
删除目录
tfactl directory remove dir [ -node all | n1,n2,... ]
仅收集数据库相关日志
[root@12cr2 ~]# export LANG=en_US
[root@12cr2 ~]# echo $LANG
en_US
[root@12cr2 ~]# tfactl diagcollect -database PROD1
Collecting data for the last 12 hours for this component ...
Collecting data for all nodes
Collection Id : 2017032117030312cr2
Detailed Logging at : /u01/app/oracle/tfa/repository/collection_Tue_Mar_21_17_03_03_CST_2017_node_all/diagcollect_20170321170303_12cr2.log
2017/03/21 17:03:07 CST : Collection Name : tfa_Tue_Mar_21_17_03_03_CST_2017.zip
2017/03/21 17:03:07 CST : Collecting diagnostics from hosts : [12cr2]
2017/03/21 17:03:07 CST : Scanning of files for Collection in progress...
2017/03/21 17:03:07 CST : Collecting additional diagnostic information...
2017/03/21 17:03:12 CST : Getting list of files satisfying time range [03/21/2017 05:03:07 CST, 03/21/2017 17:03:12 CST]
2017/03/21 17:03:13 CST : Collecting ADR incident files...
2017/03/21 17:03:29 CST : Completed collection of additional diagnostic information...
2017/03/21 17:03:33 CST : Completed Local Collection
.---------------------------------.
| Collection Summary |
+-------+-----------+------+------+
| Host | Status | Size | Time |
+-------+-----------+------+------+
| 12cr2 | Completed | 63kB | 26s |
'-------+-----------+------+------'
Logs are being collected to: /u01/app/oracle/tfa/repository/collection_Tue_Mar_21_17_03_03_CST_2017_node_all
/u01/app/oracle/tfa/repository/collection_Tue_Mar_21_17_03_03_CST_2017_node_all/12cr2.tfa_Tue_Mar_21_17_03_03_CST_2017.zip
# $TFA_HOME/bin/tfactl diagcollect -all -from "Jan/21/2013 00:00:00" -to "Jan/21/2013 13:00:00"
此命令将收集指定时间段rdbms、ASM、grid、OS的各类型日志,如alert日志、trace文件、clusterware各组件的日志、listener日志、操作系统日志。执行过程中,对alert日志、listener日志等连续性的日志处理也比较智能,能够截取指定时段的日志,而不会将整个日志文件copy。如果部署有osw工具,还会自动收集osw的日志。
模板:tfactl diagcollect -all -from "Mon/dd/yyyy hh:mi:ss" -to "Mon/dd/yyyy hh:mi:ss"
tfactl set autodiagcollect=ON TFA开启自动收集
tfactl analyze -since 7d
这条命令将分析查找所有(包括DB/ASM/CRS/ACFS/OS/OSW/OSWSLABINFO)日志7天内ERROR级别的错误信息并提取。
root用户使用以下命令可以将oracle用户加入授权用户列表:
tfactl access add -user oracle
TFA(Trace File Analyzer)的安装与使用(ORACLE版本12C)的更多相关文章
- Oracle Database 12c Release 2安装过程实录
前言----------公司数据库用的是oracle,由于oracle数据库没有做监控,所有搭个环境用于测试zabbix通过orabbix插件监控oracle数据库,下面先搭建oracle数据库. 简 ...
- 安卓开发error opening trace file: No such file or directory (2)报错原因
error opening trace file: No such file or directory (2) 这个问题的出现是因为运行的测试机android系统版本和项目api不一致导致. 改成一样 ...
- android学习——error opening trace file: No such file or directory (2)
1.疑惑: 程序运行起来的时候日志总是显示下面这个错误,但是不影响程序的正常进行,我是用真机来测试的,android4.4.4(API17). 02-11 14:55:03.629 15525-155 ...
- error opening trace file: No such file or directory (2) ,can't load transform_config.xml
出现这个错误:error opening trace file: No such file or directory (2) ,can't load transform_config.xml 是因为没 ...
- TFS(Taobao File System)安装方法
文章目录: 一.TFS(Taobao File System)安装方法 二.TFS(Taobao File System)配置dataServer.分区.挂载数据盘 三.TFS(Taobao File ...
- E/Trace: error opening trace file: No such file or directory
E/Trace: error opening trace file: No such file or directory (2) 有这一个错误,想了一下,然后发现是 AdroidManifest.xm ...
- 【Android】error opening trace file: No such file or directory (2)
1.问题描述: 运行报错: 12-25 13:35:32.286: E/Trace(1202): error opening trace file: No such file or directory ...
- 转://oracle deadlock死锁trace file分析之一
---oracle versionSQL> select * from v$version where rownum=1;BANNER------------------------------ ...
- android——error opening trace file: No such file or directory (2)
1.疑惑: 程序运行起来的时候日志总是显示下面这个错误,但是不影响程序的正常进行,我是用真机来测试的,android4.4.4(API17). 02-11 14:55:03.629 15525-155 ...
随机推荐
- golang:reflect反射
因为之前一直以C++为主要开发语言,所以刚接触go语言中的reflect时感觉很懵逼,因此决定找资料彻底学习一下. 到底反射是什么? https://blog.golang.org/laws-of-r ...
- 11款CSS3动画工具的开发
本文展示了11个最好的和最令人惊异的CSS3动画工具,将为开发者是非常有帮助的.CSS3有设计师和开发人员之间的良好的声誉.它是在这里帮助他们创造惊人的结果. 有了这些动画工具,你可以创造一个轻松自由 ...
- [Android]Android数据的四种存储方式
存储方式 Android提供以下四种存储方式: SharePreference SQLite File ContentProvider Android系统中数据基本都是私有的,一般存放在“data/d ...
- 【Unity】序列化字典Dictionary的问题
问题:在C#脚本定义了public Dictionary字典,然而在编辑器检视面板Editor Inspector中看不到(即无法序列化字典).即不能在编辑器中拖拽给字典赋值. 目标:检视面板Insp ...
- android:targetSdkVersion引起的问题
项目在三星S3和三星Note II 上调用系统相机点击存储的时候崩溃了.查了半天没弄明白原因,后来发现就是因为在manifest里设置了android:targetSdkVersion = 14,导致 ...
- Caffe、TensorFlow、MXnet三个开源库对比+主流分类模型对比
库名称 开发语言 支持接口 安装难度(ubuntu) 文档风格 示例 支持模型 上手难易 Caffe c++/cuda c++/python/matlab *** * *** CNN ** MXNet ...
- 牛客网_Go语言相关练习_选择题(3)
题目来源于牛客网 一.选择题 Go语言自带垃圾回收机制. 如果是值传递的话子函数对map修改不会影响父函数中的map,如果是地址传递则会影响. go语言编译器会自动在以标识符.数字字面量.字母字面量. ...
- Go语言_range(范围)理解
一.Go语言中的range Go 语言中 range 关键字用于 for循环中迭代数组(array).切片(slice).链表(channel)或集合(map)的元素: 在数组和切片中它返回元素的索引 ...
- 5. RAMN备份与恢复
一. rman简介 RMAN(Recovery Manager)是一种用于备份(backup).还原(restore)和恢复(recover)数据库的 Oracle 工具.RMAN只能用于ORACLE ...
- php实现多域名共享session会话
php会话机制参考:我的随笔 缘起 网站,通常会有多个服务器,多个子域名,每个节点运行着不同模块.有时为了整体体验,用户用同一个用户名.密码浏览整站,不用重复登录.这时候就需要多服务器共享sessio ...