暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片

“神器”:Oracle日志采集分析工具——TFA

一森咖记 2019-08-16
6373

【此为"一森咖记"公众号——第31篇文章】

【前言】

 

大家都知道,ORACLE库异常情况下,大家在分析异常时刻的日志或向ORACLE官网提交SR相关日志时,如何快速、准确的搜集日志是一件很头痛的事。可以说oracle日志信息收集是一个需要技巧的“高消耗”体力活。有什么方法可以简化这个过程,让大家时间和精力用在刀刃上?

 

本人最近向Oracle提交SR,因为是两节点的RAC环境,提交异常日志信息特别繁琐,遂想起OSWatcher工具,查看文章OSWatcher (Includes: [Video]) (文档 ID 301137.1)一文时看到更为强大的TFA工具,因此有了此文。本文将讲述省心省力的一个搜集/分析工具TFA。


本文较长,耐心看,值得看。

【正文】

大家都经历过这样的至暗时刻,在库有异常时,分析日志是一个必经的过程;ORACLE单库的alert日志、trc文件可供分析,日志数量不多、搜集方便,分析过程尚不复杂;但分析对象如果是RAC架构,如数据库发生了一次hang住的异常,可能需要收集rdbms、ASM、grid、OS,osw等等的日志信息,这项工作就是一个噩梦。即使在常见的两节点RAC环境中,也需花费不少的时间和经历来收集日志信息,且后续还可能持续补充日志收集。

 

还有就是如果搜集日志信息时系统环境差异性/不熟悉、筛选故障时间点的特定日志、带搜集日志节点较多、环境存在文件管控等情况下,均可能影响收集日志信息的效率和准确度,进从而影响对问题分析定位的进度和增加排故时间。

 

一个很现实的问题:如何减少日志收集所消耗的时间并提高准确度,将更多的精力和时间用于真正的问题分析中去?

 

提交过Oracle SR的童鞋都知道,Oracle官方给了一种日志搜集的工具OSWatcher ,官方介绍如下(OSWatcher (Includes: [Video]) (文档 ID 301137.1))


OSWatcher Quick Overview

OSWatcher (oswbb) is a downloadable utility to capture performance metrics from the operating system. OSWatcher use is under Oracle's standard licensing terms and does not require additional licenses for use. When you install and run oswbb as part of a performance diagnostic data collection best practice, you can aid in a quicker resolution of your SR with support and development. oswbb is comprised of two separate components:

1. oswbb: a unix shell script data collector which collects and stores the data

2. oswbba: a java utility which will analyze the data automatically and provide advice and produce graphs and an html document

Both components are contained in a single downloadable tar file.


小结

OSWatcher (oswbb) 首先是在oracle标准license许可下的一个日志搜集工具,不像adg需要交纳额外的费用,oswbb作用是更佳的搜集诊断信息给oracle SR,以便得到更快速的服务支持。


oswbb包含两部分:

  1. 搜集和存储数据的 unix shell 脚本;

  2. 自动分析java工具,可提供建议和以图形和页面形式展示信息。

 

OSWatcher(oswbb)有两种安装方式,一种是standalone,一种是以TFA集成方式安装;官网介绍如下:

standalone. Installing the standalone version will always give you the very latest version, but the user will have to manually install and run OSWatcher

installing as part of the TFA Database Support Tools Bundle. TFA will install and run OSWatcher automatically. It will also update OSWatcher on a regular basis. It may or may not contain the latest version.

 

考虑到standalone模式大家都很熟悉,本文主要讲述TFA方式(该工具内嵌OSWatcher)


首先,还是介绍下TRA是个什么嘛?

 

在GI(RAC)排故时,最繁琐的是及时、准确的收集各个节点上和问题相关的日志和诊断数据。RAC里的trace日志文件是轮循使用的,如果不及时收集日志就会被覆盖。以往,对于GI Cluster的日志收集经常使用diagcollection.pl脚本,但该脚本的弊端是会把所有的RAC日志从头至尾都收集一遍,不会识别日志里内容。使用diagcollection.pl收集的日志量非常大,且diagcollection.pl的脚本必须要在各个节点上分别使用root用户分别运行。


一句话:diagcollection.pl折腾,不方便。

 

TFA基本上克服了上边的这些问题,TFA通过在每一个节点上运行一个Java的虚拟环境,来判断什么时候需要启动来收集,压缩日志,并且来判断哪些日志是解决问题必要,TFA是运行在GI和RDBMS之外的产品,只是一个日志收集工具,不会对系统产生变更,对OS的负载压力是轻量级,甚至和当前使用的版本和平台都没有关系。


简言之

TFA(Trace File Analyzer Collector)是从11.2版本上推出oracle官方解决方案,12c(包含)以上版本默认安装;作用为收集Grid Infrastructure/RAC环境下的诊断日志,尤其是可以用非常简单的命令快捷、方便的协助用户收集RAC里的日志,以便进一步进行诊断。


TFA有以下几个优点

1. TFA可在RAC环境下的一个节点执行命令对所有节点的日志进行打包,封装;

2. TFA可在收集的过程中对日志进行”trim”操作,减少数据的收集量;

3. TFA可收集特定时间内的诊断信息;

4. TFA可指定Cluster中的某一部分组件搜集日志,如:ASM RDBMSClusterware

5. TFA可根据条件配置对告警日志进行实时扫描(DB Alert Logs, ASM Alert Logs, Clusterware Alert Logs, etc);

6. TFA可根据实时扫描的结果自动的收集诊断日志;TFA可根据指定的错误进行对告警日志的扫描;

7. TFA可根据指定的错误扫描后的结果收集诊断日志


TFA搜集日志过程:

1. DBA发出diagcollect命令,启动TFA日志收集进程;

2. 本地TFA发送收集请求至其他节点的TFA,在其他节点上开始日志收集工作;

3. 本地TFA也同时开始进行日志收集工作;

4. 所有涉及节点的TFA日志都归档至发起diagcollect命令的"master"节点;

5. DBA提取已归档的TFA日志信息,进行分析或提交SR进行处理

 

娃,这么好的东西,如何安装?怎么使用? 

TFA支持以下平台:

1. Linux (OEL, RedHat, SUSE, Itanium & zLinux)

2. Oracle Solaris (SPARC & x86-64)

3. AIX

4. HPUX (Itanium & PA-RISC)

5. Microsoft Windows (64bit)


所有平台都至少需bash shell 3.2 以上版本及JRE 1.5以上版本支持。

 

划重点:

TFA工具理论上提供所有数据库版本的支持,提供对RAC和非RAC数据库的支持。从当前所见的文档中,未见提及10.2.0.4之前的版本。TFA工具最早在11.2.0.4版本中随grid软件默认安装,默认安装路径为gridhome目录。11.2.0.4之前版本的安装包中并未包含TFA工具,需要手工安装。12C自带了TFA日志分析工具

 

本文环境为:两节点RAC,操作系统为RedHat7.3

 

官网文章提供TFA最新下载地址:

TFA Collector - TFA with Database Support Tools Bundle (文档 ID 1513912.1)


安装注意事项:

1. Java Runtime Edition of version 1.8 or higher.

2. 下载后的TFA-LINUX_v19.2.1放于/OPT目录下;

3. 以 Daemon Mode方式,使用root账号安装

安装过程很简单,本文在RAC1节点使用root账号进行安装,过程如下

    [root@ethanDB-rac1 ~]# cd opt/
    [root@ethanDB-rac1 opt]#
    [root@ethanDB-rac1 opt]# ll
    total 518220
    -rwxr-xr-x 1 root root 265898937 Apr 26 02:44 installTFA-LINUX
    drwxr-xr-x 3 root root 20 Mar 7 15:14 oracle
    -rw-r--r-- 1 root root 264751391 Aug 8 11:27 TFA-LINUX_v19.2.1.zip
    [root@ethanDB-rac1 opt]#
    [root@ethanDB-rac1 opt]# ./installTFA-LINUX

    TFA Installation Log will be written to File : tmp/tfa_install_130164_2019_08_08-15_40_39.log

    Starting TFA installation

    TFA Version: 192100 Build Date: 201904251105

    TFA HOME : oracle/app/12.2.1/tfa/ethanDB-rac1/tfa_home

    Installed Build Version: 183200 Build Date: 201810300012

    TFA is already installed. Upgrading TFA

    TFA Upgrade Log : oracle/app/12.2.1/tfa/ethanDB-rac1/tfapatch.log

    TFA will be upgraded on :
    ethanDB-rac1
    ethanDB-rac2

    Do you want to continue with TFA Upgrade ? [Y|N] [Y]: y


    Checking for ssh equivalency in ethanDB-rac2
    Node ethanDB-rac2 is not configured for ssh user equivalency

    SSH is not configured on these nodes :
    ethanDB-rac2

    Do you want to configure SSH on these nodes ? [Y|N] [Y]: y

    Configuring SSH on ethanDB-rac2... ##配置节点2的互信

    Generating keys on ethanDB-rac1...

    Copying keys to ethanDB-rac2...

    /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    root@ethanDB-rac2's password:
    Permission denied, please try again.
    root@ethanDB-rac2's password:
    Permission denied, please try again.
    root@ethanDB-rac2's password:

    Using SSH to upgrade TFA on remote nodes :

    Upgrading TFA on ethanDB-rac2 :

    TFA_HOME: /oracle/app/12.2.1/tfa/ethanDB-rac2/tfa_home
    Stopping TFA Support Tools...
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    Shutting down TFA
    Removed symlink etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    . . . . .
    . . .
    Successfully shutdown TFA..
    Copying files from ethanDB-rac1 to ethanDB-rac2...

    Current version of Berkeley DB in ethanDB-rac2 is 5 or higher, so no DbPreUpgrade required
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    Running commands to fix init.tfa and tfactl in ethanDB-rac2...
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    Updating init.tfa in ethanDB-rac2...
    Removing old version serializale files in ethanDB-rac2...
    Starting TFA in ethanDB-rac2...
    Starting TFA..
    Created symlink from etc/systemd/system/multi-user.target.wants/oracle-tfa.service to etc/systemd/system/oracle-tfa.service.
    Created symlink from etc/systemd/system/graphical.target.wants/oracle-tfa.service to etc/systemd/system/oracle-tfa.service.
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    TFA Started and listening for commands
    Removing /oracle/app/12.2.1/tfa/ethanDB-rac2/tfa_home/jlib/commons-io-2.5.jar
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

    Enabling Access for Non-root Users on ethanDB-rac2...
    Setting DDU purging mode to profile on ethanDB-rac2


    Upgrading TFA on ethanDB-rac1 :

    Stopping TFA Support Tools...
    WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.

    Shutting down TFA for Patching...

    Shutting down TFA
    Removed symlink etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
    Removed symlink etc/systemd/system/graphical.target.wants/oracle-tfa.service.
    . . . . .
    . . .
    Successfully shutdown TFA..

    No Berkeley DB upgrade required

    Copying TFA Certificates...


    Starting TFA in ethanDB-rac1...

    Starting TFA..
    Created symlink from etc/systemd/system/multi-user.target.wants/oracle-tfa.service to etc/systemd/system/oracle-tfa.service.
    Created symlink from etc/systemd/system/graphical.target.wants/oracle-tfa.service to etc/systemd/system/oracle-tfa.service.
    Waiting up to 100 seconds for TFA to be started..
    . . . . .
    Successfully started TFA Process..
    . . . . .
    TFA Started and listening for commands

    Enabling Access for Non-root Users on ethanDB-rac1...

    root@ethanDB-rac2's password:
    Removed SSH configuration on ethanDB-rac2...

    .-------------------------------------------------------------------.
    | Host | TFA Version | TFA Build ID | Upgrade Status |
    +-------------+-------------+----------------------+----------------+
    | ethanDB-rac1 | 19.2.1.0.0 | 19210020190425110550 | UPGRADED |
    | ethanDB-rac2 | 19.2.1.0.0 | 19210020190425110550 | UPGRADED |
    '-------------+-------------+----------------------+----------------'

    以上,TFA安装成功,并升级到了最新版本19.2.1.0.0。



    重点来了,TFA如何使用呐?

    本文环境:12.2版本RAC和19.2.1.0.0版本TFA为例:

     

    启动和关闭TFA

      [root@ethanDB-rac1 ~]#tfactl start 
      [root@ethanDB-rac1 ~]# tfactl stop

      查看当前哪些用户可以使用tfactl

        [root@ethanDB-rac1 ~]# tfactl access lsusers
        .---------------------------------.
        | TFA Users in ethanDB-rac1 |
        +-----------+-----------+---------+
        | User Name | User Type | Status |
        +-----------+-----------+---------+
        | grid | USER | Allowed |
        '-----------+-----------+---------'

        .---------------------------------.
        | TFA Users in |
        +-----------+-----------+---------+
        | User Name | User Type | Status |
        +-----------+-----------+---------+
        | grid | USER | Allowed |
        '-----------+-----------+---------'

        查看当前TFA观察节点状态

          [root@ethanDB-rac1 ~]# tfactl print status

          .----------------------------------------------------------------------------------------------------.
          | Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
          +-------------+---------------+--------+------+------------+----------------------+------------------+
          | ethanDB-rac1 | RUNNING | 352785 | 5000 | 19.2.1.0.0 | 19210020190425110550 | COMPLETE |
          | ethanDB-rac2 | RUNNING | 372746 | 5000 | 19.2.1.0.0 | 19210020190425110550 | COMPLETE |
          '-------------+---------------+--------+------+------------+----------------------+------------------'


          列出当前TFA的配置信息

            [root@ethanDB-rac1 ~]# tfactl print config
            .------------------------------------------------------------------------------------.
            | ethanDB-rac2 |
            +-----------------------------------------------------------------------+------------+
            | Configuration Parameter | Value |
            +-----------------------------------------------------------------------+------------+
            | TFA Version | 19.2.1.0.0 |
            | Java Version | 1.8 |
            | Public IP Network | true |
            | Automatic Diagnostic Collection | true |
            | Alert Log Scan | true |
            | Disk Usage Monitor | true |
            | Managelogs Auto Purge | false
            ...


            介绍那么多,开始介绍如何搜集日志信息


            收集日志信息

            如果您使用了中文字符集也就是LANG=zh_CN.UTF-8的话接下来就会出现BUG:Illegal parameter passed to diagcollection -z

            划重点:

                使用前,先确定下字符集en_US.UTF-8

            [root@ethanDB-rac1 ~]# export.UTF-8

            [root@ethanDB-rac1 ~]# echo $LANG

            en_US.UTF-8


            使用 tfactl -help命令查看有哪些命令

              [root@ethanDB-rac1 ~]# tfactl -help

              Usage : oracle/app/12.2.1/bin/tfactl <command> [options]
              commands:diagcollect|collection|analyze|ips|run|start|stop|enable|disable|status|print|access|purge|directory|host|receiver|set|toolstatus|uninstall|diagnosetfa|syncnodes|setupmos|upload|availability|rest|events|search|changes|isa|blackout|rediscover
              For detailed help on each command use:
              oracle/app/12.2.1/bin/tfactl <command> -help

              [root@ethanDB-rac1 ~]# tfactl diagcollect -h

              Collect logs from across nodes in cluster

              Usage : oracle/app/12.2.1/bin/tfactl diagcollect [ [component_name1] [component_name2] ... [component_nameN] | [-srdc <srdc_profile>] | [-defips]] [-sr <SR#>] [-node <all|local|n1,n2,..>] [-tag <tagname>] [-z <filename>] [-last <n><h|d>| -from <time> -to <time> | -for <time>] [-nocopy] [-notrim] [-silent] [-nocores][-collectalldirs][-collectdir <dir1,dir2..>][-examples]
              components:-ips|-database|-asm|-crsclient|-dbclient|-dbwlm|-tns|-rhp|-procinfo|-afd|-crs|-cha|-wls|-emagent|-oms|-ocm|-emplugins|-em|-acfs|-install|-cfgtools|-os|-ashhtml|-ashtext|-awrhtml|-awrtext
              -srdc Service Request Data Collection (SRDC).
              -defips Include in the default collection the IPS Packages for:
              ASM, CRS and Databases
              -sr Enter SR number to which the collection will be uploaded
              -node Specify comma separated list of host names for collection
              -tag <tagname> The files will be collected into tagname directory inside
              repository
              -z <zipname> The collection zip file will be given this name within the
              TFA collection repository
              -last <n><h|d> Files from last 'n' [d]ays or 'n' [h]ours
              -since Same as -last. Kept for backward compatibility.
              -from "Mon/dd/yyyy hh:mm:ss" From <time>
              or "yyyy-mm-dd hh:mm:ss"
              or "yyyy-mm-ddThh:mm:ss"
              or "yyyy-mm-dd"
              -to "Mon/dd/yyyy hh:mm:ss" To <time>
              or "yyyy-mm-dd hh:mm:ss"
              or "yyyy-mm-ddThh:mm:ss"
              or "yyyy-mm-dd"
              -for "Mon/dd/yyyy" For <date>.
              or "yyyy-mm-dd"
              -nocopy Does not copy back the zip files to initiating node from all nodes
              -notrim Does not trim the files collected
              -silent This option is used to submit the diagcollection as a background
              process
              -nocores Do not collect Core files when it would normally have been
              collected
              -collectalldirs Collect all files from a directory marked "Collect All"
              flag to true
              -collectdir Specify comma separated list of directories and collection will
              include all files from these irrespective of type and time constraints
              in addition to components specified
              -examples Show diagcollect usage examples
              For detailed help on each component use:
              oracle/app/12.2.1/bin/tfactl diagcollect [component_name1] [component_name2] ... [component_nameN] -help


              几种常用方法:

               

              1. 收集2个小时之前的由TFA管理的所有的日志

              [root@ethanDB-rac1 ~]# tfactl diagcollect –all –since 2h

               

              2. 收集1个小时的所有节点上数据库相关的日志,并压缩放在本地,以test为后缀

              [root@ethanDB-rac1 ~]# tfactl diagcollect -database orcl -since 1h -z test

               

              3. 收集1个小时的节点host1上的日志

              [root@ethanDB-rac1 ~]# tfactl diagcollect -node host1 -since 1h

               

              4. 收集所有节点上在"Aug/15/2019"发生的日志

              [root@ethanDB-rac1 ~]# tfactl diagcollect -for "Aug/15/2019"

               

              5. 指定时间区域,对节点1上的ASM的日志进行收集

              [root@ethanDB-rac1 ~]# tfactl diagcollect -asm -node ethanDB-rac1 -from "Aug/15/2019 13:00:00" -to "Aug/15/2019 14:00:00"


              6. 指定时间段,对所有节点搜集信息

                [root@ethanDB-rac1 ~]# tfactl diagcollect -all -from "Aug/15/2019 13:00:00" -to "Aug/15/2019 14:00:00"
                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
                Scanning files from Aug/15/2019 13:00:00 to Aug/15/2019 14:00:00

                Collection Id : 20190815191015ethanDB-rac1


                注意:

                此命令将收集指定时间段rdbms、ASM、grid、OS的各类型日志,如alert日志、trace文件、clusterware各组件的日志、listener日志、操作系统日志。执行过程中,对alert日志、listener日志等连续性的日志处理也比较智能,能够截取指定时段的日志,而不会将整个日志文件copy。如果部署有osw工具,还会自动收集osw的日志。

                 

                如果需要指定日志收集范围,比如仅收集数据库的相关日志,可以使用tfactl diagcollect -database命令。更多的使用方法可以参考tfactl diagcollect -help输出。 

                 

                TFA自动收集的功能

                可以对一些预定错误进行自动收集。预定的错误及收集规则可以参阅《Trace File Analyzer Collector User Guide》的Appendix B. Scan Events部分。该功能默认为关闭状态,可以使用以下命令手工启用:

                [root@ethanDB-rac1 ~]# tfactl set autodiagcollect=ON


                TFA也能够承担一定的日志分析功能,能够实现一条命令自动对DB&ASM&CRS的alert日志、操作系统命令及部分osw日志进行分析。

                 

                分析查找所有日志7天内ERROR级别的错误信息并提取

                [root@ethanDB-rac1 ~]# tfactl analyze -since 7d


                注意

                TFA工具默认仅对root用户和grid用户授予使用权限,如果使用oracle用户执行tfactl diagcollect命令将收到报错。建议同样授予oracle用户使用TFA的权限,方便日常使用。root用户使用以下命令可以将oracle用户加入授权用户列表:

                 [root@ethanDB-rac1 ~]# tfactl access add -user oracle


                如果存在对收集日志的空间管理需求,可以使用tfactl set命令进行设置里不赘述。


                TFA还有啥新功能

                TFA版本从12.1.2.3.0之后封装了很多现有的Oracle问题分析的工具,包括ORAchk ,EXAchk,OSWatcher,Procwatcher,ORATOP,SQLT,DARDA,alertsummary等等,这些工具我们都可以通过TFACL的接口进行调用。使用TFA的toolstatus命令查看这些封装的工具以及状态:

                  [root@ethanDB-rac1 ~]# tfactl  toolstatus
                  .------------------------------------------------------------------.
                  | TOOLS STATUS - HOST : ethanDB-rac1 |
                  +----------------------+--------------+--------------+-------------+
                  | Tool Type | Tool | Version | Status |
                  +----------------------+--------------+--------------+-------------+
                  | Development Tools | orachk | 12.2.0.1.3 | DEPLOYED |
                  | | oratop | 14.1.2 | DEPLOYED |
                  +----------------------+--------------+--------------+-------------+
                  | Support Tools Bundle | darda | 2.10.0.R6036 | DEPLOYED |
                  | | oswbb | 8.1.2 | RUNNING |
                  | | prw | 12.1.13.11.4 | NOT RUNNING |
                  +----------------------+--------------+--------------+-------------+
                  | TFA Utilities | alertsummary | 12.2.1.1.0 | DEPLOYED |
                  | | calog | 12.2.0.1.0 | DEPLOYED |
                  | | dbcheck | 18.3.0.0.0 | DEPLOYED |
                  | | dbglevel | 12.2.1.1.0 | DEPLOYED |
                  | | grep | 12.2.1.1.0 | DEPLOYED |
                  | | history | 12.2.1.1.0 | DEPLOYED |
                  | | lcm | 18.4.0.0.0 | DEPLOYED |
                  | | ls | 12.2.1.1.0 | DEPLOYED |
                  | | managelogs | 12.2.1.1.0 | DEPLOYED |
                  | | menu | 12.2.1.1.0 | DEPLOYED |
                  | | param | 12.2.1.1.0 | DEPLOYED |
                  | | ps | 12.2.1.1.0 | DEPLOYED |
                  | | pstack | 12.2.1.1.0 | DEPLOYED |
                  | | summary | 12.2.1.1.0 | DEPLOYED |
                  | | tail | 12.2.1.1.0 | DEPLOYED |
                  | | triage | 12.2.1.1.0 | DEPLOYED |
                  | | vi | 12.2.1.1.0 | DEPLOYED |
                  '----------------------+--------------+--------------+-------------'

                  Note :-
                  DEPLOYED : Installed and Available - To be configured or run interactively.
                  NOT RUNNING : Configured and Available - Currently turned off interactively.
                  RUNNING : Configured and Available.

                   

                  平时维护


                  前面说了,虽然TFA是运行在GIRDBMS之外的产品,只是一个日志收集工具,不会对系统产生变更,对OS的负载压力是轻量级甚至和当前使用的版本和平台都没有关系。但有时在检查数据库的时候看到cpu负载比较高,原因为tfa check时占用过多cpu,因非核心系统,决定关闭掉。

                  root执行。

                  --检查状态

                  #tfactl status

                  --自启动关闭

                  #tfactl disable

                  --关闭tfa

                  #tfactl stop


                  【总结】

                  1. TFA是运行在GIRDBMS之外的产品,只是一个日志收集工具,不会对系统产生变更,对OS的负载压力是轻量级甚至和当前使用的版本和平台都没有关系因此,建议数据库配置TFA,以便快速定位和分析问题。

                  2. TFA(Trace File Analyzer Collector)11.2版本上推出oracle官方解决方案12c(包含)以上版本默认安装;

                  3. TFA作用为收集Grid Infrastructure/RAC环境下的诊断日志,尤其是可以用非常简单的命令协助用户收集RAC里的日志,以便进一步进行诊断



                  官网参考

                  OSWatcher (Includes: [Video]) (文档 ID 301137.1)

                  https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=339196158041795&id=301137.1&_adf.ctrl-state=cw7sf2kcw_26

                  官网参考

                  TFA Collector - TFA with Database Support Tools Bundle (文档 ID 1513912.1)

                  https://support.oracle.com/epmos/faces/DocContentDisplay?_afrLoop=324296707082878&parent=OSwatcher&sourceId=download&id=1513912.1&_afrWindowMode=0&_adf.ctrl-state=15cs9va4d8_102#quickstart


                  参考

                  https://www.cnblogs.com/kawashibara/p/9300520.html

                  参考

                  https://blog.csdn.net/moscot_wu/article/details/64127126


                  作者:ethan_yang

                  公众号:一森咖记

                  格言:认清大势,亦有一份小坚持


                  欢迎关注个人微信公众号;

                  长按以下二维码或公众号搜索“一森咖记”



                  往期精彩文章

                  =====================================

                  1. 干货:RHEL7.2生产环境下双节点12c RAC搭建实操

                  2. 干货:RHEL7.1环境下双节点Oracle RAC搭建实操

                  3. LINUX环境:MySQL和Oracle开机自启动,咋搞?

                  4. What:ASM自动脱落了

                  5. 实操:12C RAC环境下的ADG同步库搭建

                  6. Oracle Rac:关闭透明大页的原因及方法

                  7. Oracle ADG同步技术,DBA必备的一种“后悔药”

                  8. Logminer:oracle人为误操作之恢复神器


                  最后修改时间:2020-04-02 12:40:17
                  文章转载自一森咖记,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

                  评论