oracle中tfa日志收集工具怎么用-創(chuàng)新互聯(lián)

小編給大家分享一下oracle中tfa日志收集工具怎么用,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

我們提供的服務(wù)有:成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、安陽(yáng)ssl等。為上千多家企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的安陽(yáng)網(wǎng)站制作公司



TFA工具理論上提供所有數(shù)據(jù)庫(kù)版本的支持,同時(shí)提供對(duì)RAC和非RAC數(shù)據(jù)庫(kù)的支持。但是,從當(dāng)前所見(jiàn)的文檔中,未見(jiàn)提及10.2.0.4之前的版本。

TFA工具最早在11.2.0.4版本中隨grid軟件默認(rèn)安裝,默認(rèn)安裝路徑為grid的home目錄。11.2.0.4之前版本的安裝包中并未包含TFA工具,需要手工安裝。從11.2.0.4.5開(kāi)始,GI PSU中都包含有TFA的版本更新。在安裝GI PSU的過(guò)程中TFA將自動(dòng)進(jìn)行安裝。

tfa命令模式:



1.TFA的目的:
TFA是個(gè)11.2版本上推出的用來(lái)收集Grid Infrastructure/RAC環(huán)境下的診斷日志的工具,它可以用非常簡(jiǎn)單的命令協(xié)助用戶收集RAC里的日志,以便進(jìn)一步進(jìn)行診斷;TFA是類似diagcollection的一個(gè)oracle 集群日志收集器,而且TFA比diagcollection集中和自動(dòng)化的診斷信息收集能力更強(qiáng)大。TFA有以下幾個(gè)特點(diǎn):

1.    TFA可以在一臺(tái)機(jī)器上執(zhí)行一條簡(jiǎn)單的命令把所有節(jié)點(diǎn)的日志進(jìn)行打包,封裝;
2.    TFA可以在收集的過(guò)程中對(duì)日志進(jìn)行”trim”操作,減少數(shù)據(jù)的收集量;
3.    TFA可以收集用來(lái)診斷用的“一段時(shí)間內(nèi)”的數(shù)據(jù);
4.    TFA可以把所有節(jié)點(diǎn)的日志收集并封裝好放在某一個(gè)節(jié)點(diǎn)上以便傳輸閱讀;
5.    TFA可以指定Cluster中的某一部分組件進(jìn)行日志收集,如:ASM ,RDBMS,Clusterware
6.    TFA可以根據(jù)條件配置對(duì)告警日志進(jìn)行實(shí)時(shí)掃描(DB Alert Logs, ASM Alert Logs, Clusterware Alert Logs, etc);
7.    TFA可以根據(jù)實(shí)時(shí)掃描的結(jié)果自動(dòng)的收集診斷日志;
8.    TFA可以根據(jù)指定的錯(cuò)誤進(jìn)行對(duì)告警日志的掃描;
9.    TFA可以根據(jù)指定的錯(cuò)誤掃描后的結(jié)果收集診斷日志;


2.    TFA的安裝要求:
平臺(tái):

目前TFA支持以下幾種平臺(tái):    
Intel Linux(Enterprise Linux, RedHat Linux, SUSE Linux)
Linux Itanium
Oracle Solaris SPARC
Oracle Solaris x86-64
AIX (requires bash shell version 3.2 or higher installed)
HPUX Itanium
HPUX PA-RISC


3.支持的數(shù)據(jù)庫(kù)版本:
TFA目前的設(shè)計(jì)是脫離RDBMS和CRS進(jìn)行設(shè)計(jì)的,所以設(shè)計(jì)的初衷是針對(duì)所有的版本而設(shè)計(jì)的,不受RDBMS或者CRS的版本限制;
下載 TFA Collector:
該版本的TFA和相關(guān)TFA用戶指南可以通過(guò)點(diǎn)擊下面的相關(guān)下載鏈接。

TFA 收集器:
https://mosemp.us.oracle.com/epmos/main/downloadattachmentprocessorattachid=1513912.2:TFA_NOJRE&clickstream=no

TFA 用戶手冊(cè):
https://mosemp.us.oracle.com/epmos/main/downloadattachmentprocessorattachid=1513912.2:TFA_USER_GUIDE&clickstream=no


4.    TFA快速安裝指南:
安裝:
注意:在安裝之前請(qǐng)確保您的環(huán)境上已經(jīng)安裝了JRE1.6或者是更高版本的JRE,如果沒(méi)有,請(qǐng)先安裝JRE1.6
1).    請(qǐng)使用root用戶登錄系統(tǒng)
2).    在所有的節(jié)點(diǎn)上為TFA準(zhǔn)備一個(gè)安裝的位置,注意這個(gè)位置不要放在Cluster file system中;
3).    在節(jié)點(diǎn)1上執(zhí)行installTFALite.sh來(lái)啟動(dòng)安裝過(guò)程:
---------------------------------
[root@rac1 tmp]# ./installTFALite.sh
Starting TFA installation
---------------------------------

備注: 最新版本的TFA已經(jīng)把installTFALite.sh修改成了installTFALite,安裝的時(shí)候可以直接執(zhí)行installTFALite,并且可以指定TFA BASE和JAVA_HOME

4).    當(dāng)系統(tǒng)提示安裝位置,輸入在第2步中選擇的位置的TFA安裝,:
---------------------------------
Enter a location for installing TFA [/opt/oracle/tfa]:/opt/oracle/tfa
Checking for available space in /opt/oracle/tfa/
---------------------------------

5).    請(qǐng)輸入之前安裝了JRE1.6的JAVA_HOME,注意這個(gè)位置需要在所有的節(jié)點(diǎn)上都相同:
---------------------------------
Enter a Java Home that contains Java 1.6 or later : /usr/java/jre1.7.0_11
Running Auto Setup for TFA as user root...
---------------------------------

6.    按照以下說(shuō)明完成安裝:
------------------------------------------------------------------
Would you like to do a [L]ocal only or [C]lusterwide installation [L|l|C|c] [C] :
The following installation requires temporary use of SSH.
If SSH is not configured already then we will remove SSH
when complete.
  Do you wish to Continue [Y|y|N|n] [N] Y
Installing TFA at /opt/oracle/tfa in all hosts
Discovering Nodes and Oracle resources
Checking whether CRS is up and running

Getting list of nodes in cluster

Checking ssh user equivalency settings on all nodes in cluster

Node rac2 is configured for ssh user equivalency for root user

Searching for running databases . . . . .

.
List of running databases registered in OCR
1. ORCL
. .

Checking Status of Oracle Software Stack - Clusterware, ASM, RDBMS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

TFA Will be Installed on the Following Nodes
++++++++++++++++++++++++++++++++++++++++++++

Install Nodes
=============
rac1
rac2
Do you wish to make changes to the Node List [Y/y/N/n] [N]

TFA will scan the following Directories
++++++++++++++++++++++++++++++++++++++++++++

.----------------------------------------------------------------.
|                             rac2                               |
+-----------------------------------------------------+----------+
| Trace Directory                                     | Resource |
+-----------------------------------------------------+----------+
| /u01/app/11.2.0/grid/cfgtoollogs                    | INSTALL  |
| /u01/app/11.2.0/grid/crs/log                        | CRS      |
| /u01/app/11.2.0/grid/css/log                        | CRS      |
| /u01/app/11.2.0/grid/cv/log                         | CRS      |
| /u01/app/11.2.0/grid/evm/admin/log                  | CRS      |
| /u01/app/11.2.0/grid/evm/admin/logger               | CRS      |
| /u01/app/11.2.0/grid/evm/log                        | CRS      |
| /u01/app/11.2.0/grid/install                        | INSTALL  |
| /u01/app/11.2.0/grid/log/                           | CRS      |
| /u01/app/11.2.0/grid/network/log                    | CRS      |
| /u01/app/11.2.0/grid/oc4j/j2ee/home/log             | CRSOC4J  |
| /u01/app/11.2.0/grid/opmn/logs                      | CRS      |
| /u01/app/11.2.0/grid/racg/log                       | CRS      |
| /u01/app/11.2.0/grid/rdbms/log                      | ASM      |
| /u01/app/11.2.0/grid/scheduler/log                  | CRS      |
| /u01/app/11.2.0/grid/srvm/log                       | CRS      |
| /u01/app/oraInventory/ContentsXML                   | INSTALL  |
| /u01/app/oraInventory/logs                          | INSTALL  |
| /u01/app/oracle/cfgtoollogs                         | CFGTOOLS |
| /u01/app/oracle/diag/asm/+asm/+ASM2/trace           | ASM      |
| /u01/app/oracle/diag/rdbms/orcl/ORCL2/trace         | RDBMS    |
| /u01/app/oracle/diag/tnslsnr                        | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac2/listener/trace    | TNS      |
| /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs | INSTALL  |
| /u01/app/oracle/product/11.2.0/dbhome_1/install     | INSTALL  |
'-----------------------------------------------------+----------'

.----------------------------------------------------------------.
|                             rac1                               |
+-----------------------------------------------------+----------+
| Trace Directory                                     | Resource |
+-----------------------------------------------------+----------+
| /u01/app/11.2.0/grid/cfgtoollogs                    | INSTALL  |
| /u01/app/11.2.0/grid/crs/log                        | CRS      |
| /u01/app/11.2.0/grid/css/log                        | CRS      |
| /u01/app/11.2.0/grid/cv/log                         | CRS      |
| /u01/app/11.2.0/grid/evm/admin/log                  | CRS      |
| /u01/app/11.2.0/grid/evm/admin/logger               | CRS      |
| /u01/app/11.2.0/grid/evm/log                        | CRS      |
| /u01/app/11.2.0/grid/install                        | INSTALL  |
| /u01/app/11.2.0/grid/log/                           | CRS      |
| /u01/app/11.2.0/grid/network/log                    | CRS      |
| /u01/app/11.2.0/grid/oc4j/j2ee/home/log             | CRSOC4J  |
| /u01/app/11.2.0/grid/opmn/logs                      | CRS      |
| /u01/app/11.2.0/grid/racg/log                       | CRS      |
| /u01/app/11.2.0/grid/rdbms/log                      | ASM      |
| /u01/app/11.2.0/grid/scheduler/log                  | CRS      |
| /u01/app/11.2.0/grid/srvm/log                       | CRS      |
| /u01/app/oraInventory/ContentsXML                   | INSTALL  |
| /u01/app/oraInventory/logs                          | INSTALL  |
| /u01/app/oracle/cfgtoollogs                         | CFGTOOLS |
| /u01/app/oracle/diag/asm/+asm/+ASM1/trace           | ASM      |
| /u01/app/oracle/diag/rdbms/orcl/ORCL1/trace         | RDBMS    |
| /u01/app/oracle/diag/tnslsnr                        | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac1/listener/trace    | TNS      |
| /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs | INSTALL  |
| /u01/app/oracle/product/11.2.0/dbhome_1/install     | INSTALL  |
'-----------------------------------------------------+----------'

Do you wish to change the Trace Directory List [Y/y/N/n] [N]
Installing TFA on rac1
Installing TFA on rac2
TFA is running
Successfully added host: rac2
.--------------------------------.
| Host   | Status of TFA | PID   |
+--------+---------------+-------+
| rac1 | RUNNING         | 11685 |
| rac2 | RUNNING         |  5081 |
'--------+---------------+-------'
Setting TFA cookie in all nodes
Successfully set cookie=77411b8fff446d2954d5c080225052ac
TFA Cookie: 77411b8fff446d2954d5c080225052ac
Summary of TFA Installation
.-----------------------------------------------------------.
|                           rac1                            |
+---------------------+-------------------------------------+
| Parameter           | Value                               |
+---------------------+-------------------------------------+
| Install location    | /opt/oracle/tfa/tfa_home            |
| Repository location | /opt/oracle/tfa/tfa_home/repository |
| Repository usage    | 0 MB out of 10240 MB                |
'---------------------+-------------------------------------'

.-----------------------------------------------------------.
|                           rac2                            |
+---------------------+-------------------------------------+
| Parameter           | Value                               |
+---------------------+-------------------------------------+
| Install location    | /opt/oracle/tfa/tfa_home            |
| Repository location | /opt/oracle/tfa/tfa_home/repository |
| Repository usage    | 0 MB out of 10240 MB                |
'---------------------+-------------------------------------'

TFA is successfully installed..
------------------------------------------------------------------


5.TFA啟動(dòng)和停止:

TFA運(yùn)行在Linux和Unix平臺(tái)上的init,所以,這將是在服務(wù)器啟動(dòng)時(shí)自動(dòng)啟動(dòng)。
默認(rèn)的情況我們把這個(gè)腳本命名為init.tfa;
所在位置取決于不同平臺(tái),如:
Linux and Solaris: /etc/init.d/init.tfa
Aix: /etc/init.tfa
HP-UX: /sbin/init.d/init.tfa
以下命令式在Linux平臺(tái)下作為例子:
啟動(dòng):
# /etc/init.d/init.tfa start
停止:
# /etc/init.d/init.tfa stop
重啟:
# /etc/init.d/init.tfa restart


6.手動(dòng)收集診斷信息:

我們通過(guò)調(diào)用tfactl的命令和診斷動(dòng)詞diagnostic來(lái)控制TFA收集我們期望的診斷信息。Tfactl 提供給用戶多種可選擇的模式進(jìn)行收集,如 ,收集一個(gè)時(shí)間段內(nèi)的日志信息來(lái)減少我們收集日志的量;
具體操作的命令您可以通過(guò)以下方式看到:
--------------------------------------------------------------
#$TFA_HOME/bin/tfactl diagcollect -h
Usage: /u01/app/tfa/tfa_home/bin/tfactl diagcollect [-all | -database | -asm | -crs | -os | -install | -node | -tag ]
        [-since <n><h|d>| -from <time> -to <time> | -for <time>]
        [-copy | -nocopy] [-symlink][-notrim]

Options:
  -all       Collect logs of all types
  -crs        Collect only CRS logs
  -asm        Collect only ASM logs
  -database  Collect only database logs from databases specified
  -os         Collect only OS files
  -install    Collect only INSTALL files
  -node       Specify comma separated list of host names for collection.
  -copy       Copy back the zip files to master node from all nodes
  -nocopy    Does not copy back the zip files to master node from all nodes
  -notrim     Does not trim the files collected
  -symlink    This option should be used with -for.
              Creates symlinks for files which are updated during the input time.
  -since <n><h|d>   Files from past 'n' [d]ays or 'n' [h]ours
  -from <time>        From time
  -to <time>         To time
  -for <time>        Specify a incident time.
  -z <file>           Output file name
  -tag <description>  Enter a tag for the zip(s) created

--------------------------------------------------------------

在下面的例子中,我們使用了 -all,使用TFA收集診斷所有類型的日志,從午夜1月21日至1月21日13:00 進(jìn)行收集。該命令將啟動(dòng)指定的診斷在后臺(tái)收集所有群集節(jié)點(diǎn)上,壓縮成zip文件放置在每個(gè)節(jié)點(diǎn)的TFA_HOME中:

--------------------------------------------------------------

# $TFA_HOME/bin/tfactl diagcollect -all -from "Jan/21/2013" -to "Jan/21/2013 13:00:00"

time: Jan/21/2013
Valid pattern
Month : 1
time: Jan/21/2013 13:00:00
Valid pattern
Month : 1
rac1:startdiagcollection: -database -asm -crs -os -install -from Jan/21/2013 -to Jan/21/2013 13:00:00 -z Mon_Jan_21_11_52_20_EST_2013 -node all -copy
Logs are collected to:
/opt/oracle/tfa/tfa_home/repository/rac1.Mon_Jan_21_11_52_20_EST_2013.zip
/opt/oracle/tfa/tfa_home/repository/rac2.Mon_Jan_21_11_52_20_EST_2013.zip
--------------------------------------------------------------


7.診斷問(wèn)題or上傳診斷信息給Oracle Support工程師:

無(wú)論我們用哪種方法對(duì)診斷信息進(jìn)行收集,日志信息都會(huì)被打包好放置在$TFA_HOME/repository的目錄下,以便您上傳該文件給Oracle的support工程師

以上是“oracle中tfa日志收集工具怎么用”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道!

分享標(biāo)題:oracle中tfa日志收集工具怎么用-創(chuàng)新互聯(lián)
網(wǎng)頁(yè)URL:http://muchs.cn/article16/diedgg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、軟件開(kāi)發(fā)、ChatGPT、定制網(wǎng)站商城網(wǎng)站、品牌網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司