14.9 カスタム収集の実行

カスタム収集オプションを使用して、診断収集をデフォルトから変更します。

14.9.1 診断データ収集の期間の調整

Oracle Trace File Analyzerは、過去12時間以内に更新された重要なログの切捨ておよび収集を行います。

より短い期間のログのみが必要であることがわかっている場合は、この収集期間を短縮できます。収集期間を短縮することで、可能なかぎり収集を少なくし、迅速に実行できます。

収集の期間は、次の4つの方法で指定できます。

表14-7 収集期間の指定方法

コマンド 説明

tfactl diagcollect -last n h|d

過去n時間またはn日間を対象に収集します。

tfactl diagcollect -from “yyyy-mm-dd

特定の日付(オプションで時刻を指定)を対象に収集します。

有効な日付と時刻の形式:

"Mon/dd/yyyy hh:mm:ss"

"yyyy-mm-dd hh:mm:ss"

"yyyy-mm-ddThh:mm:ss"

"yyyy-mm-dd"

tfactl diagcollect –from "yyyy-mm-dd" -to "yyyy-mm-dd"

指定した日付(オプションで時刻を指定)の間を対象に収集します。

有効な日付と時刻の形式:

"Mon/dd/yyyy hh:mm:ss"

"yyyy-mm-dd hh:mm:ss"

"yyyy-mm-ddThh:mm:ss"

"yyyy-mm-dd"

tfactl diagcollect -for “yyyy-mm-dd

指定した日付を対象に収集します。

有効な日付フォーマット:

"Mon/dd/yyyy"

"yyyy-mm-dd"

14.9.2 特定のイベントの収集

デフォルトの診断収集を実行するか、最近のインシデントのリストからイベントを選択して、そのイベントのみの診断データを収集します。

実行する操作を選択します。

  • 特定の最近のイベントに対する診断収集
  • デフォルトの時間範囲の診断収集

特定のイベントを収集する場合

  1. デフォルトの診断収集を実行する場合:
    tfactl diagcollect
    次に例を示します。
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 10
    
    By default TFA will collect diagnostics for the last 12 hours. This can result in large collections
    For more targeted collections enter the time of the incident, otherwise hit <RETURN> to collect for the last 12 hours
    [YYYY-MM-DD HH24:MI:SS,<RETURN>=Collect for last 12 hours] :
    
    Collecting data for the last 12 hours for all components...
    Collecting data for all nodes
    
    Collection Id : 20190312163846node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all/diagcollect_20190312163846_node1.log
    2019/03/12 16:38:50 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:38:50 PDT : Collection Name : tfa_Tue_Mar_12_16_38_47_PDT_2019.zip
    2019/03/12 16:38:50 PDT : Collecting diagnostics from hosts : [node1]
    2019/03/12 16:38:50 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:38:50 PDT : Collecting additional diagnostic information...
    2019/03/12 16:38:55 PDT : Getting list of files satisfying time range [03/12/2019 04:38:50 PDT, 03/12/2019 16:38:55 PDT]
    2019/03/12 16:39:02 PDT : Collecting ADR incident files...
    2019/03/12 16:39:06 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:39:07 PDT : Completed Local Collection
    .------------------------------------.
    |         Collection Summary         |
    +----------+-----------+------+------+
    | Host     | Status    | Size | Time |
    +----------+-----------+------+------+
    | node1 | Completed | 21MB |  17s |  |    
    '----------+-----------+------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all
    /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_38_47_PDT_2019_node_all/node1.tfa_Tue_Mar_12_16_38_47_PDT_2019.zip
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 1
    User root does not have permissions to run SRDC 'ora4030' for database 'orcl'.
  2. SRDCがない特定のイベントの診断収集を実行する場合:
    tfactl diagcollect
    次に例を示します。
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 9
    Collecting data for all nodes
    Scanning files from mar/11/2019 18:02:19 to mar/11/2019 23:02:19
    
    Collection Id : 20190312162708node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all/diagcollect_20190312162708_node1.log
    2019/03/12 16:27:12 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:27:12 PDT : Collection Name : tfa_Tue_Mar_12_16_27_09_PDT_2019.zip
    2019/03/12 16:27:12 PDT : Collecting diagnostics from hosts : [node1]
    2019/03/12 16:27:12 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:27:12 PDT : Collecting additional diagnostic information...
    2019/03/12 16:27:17 PDT : Getting list of files satisfying time range [03/11/2019 18:02:19 PDT, 03/11/2019 23:02:19 PDT]
    2019/03/12 16:27:23 PDT : Collecting ADR incident files...
    2019/03/12 16:27:28 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:27:33 PDT : Completed Local Collection
    .------------------------------------.
    |         Collection Summary         |
    +----------+-----------+------+------+
    | Host     | Status    | Size | Time |
    +----------+-----------+------+------+
    | node1 | Completed | 10MB |  21s |
    '----------+-----------+------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all
    /scratch/app/product/19c/tfa/repository/collection_Tue_Mar_12_16_27_09_PDT_2019_node_all/node1.tfa_Tue_Mar_12_16_27_09_PDT_2019.zip
  3. SRDCのある特定のイベントの診断収集を実行する場合:

    注意:

    SRDCを選択する場合、収集を実行しているユーザーは、イベントで選択したデータベースのdbaグループに属している必要があります。
    tfactl diagcollect
    次に例を示します。
    $ tfactl diagcollect
    Choose the event you want to perform a diagnostic collection for:
    1. Mar/12/2019 16:08:20 [ db.orcl.orcl ]  ORA-04030: out of process memory when trying to allocate
    2. Mar/12/2019 16:08:18 [ db.orcl.orcl ]  ORA-04031: unable to allocate 8 bytes of shared memory
    3. Mar/12/2019 16:08:16 [ db.orcl.orcl ]  ORA-00494: enqueue held for too long more than seconds by osid
    4. Mar/12/2019 16:08:14 [ db.orcl.orcl ]  ORA-29709: Communication failure with Cluster Synchronization
    5. Mar/12/2019 16:08:04 [ db.orcl.orcl ]  ORA-29702: error occurred in Cluster Group Service operation
    6. Mar/12/2019 16:07:59 [ db.orcl.orcl ]  ORA-32701: Possible hangs up to hang ID= detected
    7. Mar/12/2019 16:07:51 [ db.orcl.orcl ]  ORA-07445: exception encountered: core dump [] [] [] [] [] []
    8. Mar/12/2019 16:07:49 [ db.orcl.orcl ]  ORA-00700: soft internal error, arguments: [700], [], [],[]
    9. Mar/11/2019 22:02:19 [ db.oradb.oradb ]  DIA0 Critical Database Process Blocked: Hang ID 1 blocks 5 sessions
    10. Default diagnostic collection, for no specific event
    
    Please choose the event : 1-10 [] 1
    Scripts to be run by this srdc: srdc_db_sid_memorysizes_10glower.sql srdc_db_sid_memorysizes_11gplus.sql ipspack 
    Components included in this srdc: OS DATABASE CHMOS
    Collecting data for local node(s)
    Scanning files from Mar/12/2019 14:08:20 to Mar/12/2019 18:08:20
    WARNING: End time entered is after the current system time.
    
    Collection Id : 20190312163524node1
    
    Detailed Logging at : /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local/diagcollect_20190312163524_node1.log
    2019/03/12 16:35:30 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    2019/03/12 16:35:30 PDT : Collection Name : tfa_srdc_ora4030_Tue_Mar_12_16_35_25_PDT_2019.zip
    2019/03/12 16:35:30 PDT : Scanning of files for Collection in progress...
    2019/03/12 16:35:30 PDT : Collecting additional diagnostic information...
    2019/03/12 16:35:35 PDT : Getting list of files satisfying time range [03/12/2019 14:08:20 PDT, 03/12/2019 16:35:30 PDT]
    2019/03/12 16:35:49 PDT : Collecting ADR incident files...
    2019/03/12 16:35:52 PDT : Completed collection of additional diagnostic information...
    2019/03/12 16:35:54 PDT : Completed Local Collection
    .-------------------------------------.
    |          Collection Summary         |
    +----------+-----------+-------+------+
    | Host     | Status    | Size  | Time |
    +----------+-----------+-------+------+
    | node1 | Completed | 2.9MB |  24s |
    '----------+-----------+-------+------'
    
    Logs are being collected to: /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local
    /scratch/app/product/19c/tfa/repository/srdc_ora4030_collection_Tue_Mar_12_16_35_25_PDT_2019_node_local/node1.tfa_srdc_ora4030_Tue_Mar_12_16_35_25_PDT_2019.zip

14.9.3 大きなファイルの診断収集からの除外

大きすぎるファイルが収集を遅延させたり、停止させるのを防ぎます。

診断収集コマンドに対してtfactl set maxfilecollectionsizeを実行し、指定されたサイズより大きいファイルの最後の200 KBのみを考慮します。

  1. 最大ファイル・サイズを設定する場合:
    tfactl set maxfilecollectionsize=size_in_MB
  2. 診断データを収集する場合:
    tfactl diagcollect

14.9.4 特定のノードからの収集

特定のノードから収集するには:

  1. 特定のノードから収集するには、次のようにします。
    tfactl diagcollect –node list of nodes
    次に例を示します。
    $ tfactl diagcollect -last 1d -node myserver65

関連項目

14.9.5 特定のコンポーネントからの収集

特定のコンポーネントから収集するには:

  1. 特定のコンポーネントから収集するには、次のようにします。
    tfactl diagcollect component

    次に例を示します。

    データベースhrdbおよびfdbから過去1日間のすべてのファイルを切捨ておよび収集するには、次のようにします。
    $ tfactl –diagcollect -database hrdb,fdb -last 1d
    node1およびnode2から過去6時間に更新されたすべてのOracle Clusterwareファイル、オペレーティング・システム・ログおよびCHMOS/OSWデータを切捨ておよび収集するには、次のようにします。
    $ tfactl diagcollect -crs -os -node node1,node2 -last 6h
    指定の開始時間と終了時間の間に更新された、node1のすべてのOracle ASMログを切捨ておよび収集するには、次のようにします。
    $ tfactl diagcollect -asm -node node1 -from "2016-08-15" -to "2016-08-17"
    使用可能なコンポーネント・オプションは次のとおりです。

    表14-8 コンポーネント・オプション

    コンポーネント・オプション 説明

    -cha

    Oracle Cluster Health Advisorログを収集します。

    -ips

    インシデント・パッケージング・サービスのログを収集します。

    -database database_names

    カンマ区切りリストで指定したデータベースからデータベース・ログを収集します。

    -asm

    Oracle ASMログを収集します。

    -crsclient

    GIBASE/diag/clients下のクライアント・ログを収集します。

    -dbclient

    DB ORABASE/diag/clients下のクライアント・ログを収集します。

    -dbwlm

    データベース・ワークロード管理(DBWLM)ログを収集します。

    -tns

    TNSログを収集します。

    -rhp

    高速ホーム・プロビジョニング(RHP)ログを収集します。

    -procinfo

    すべてのプロセスについて/procからGathers stackおよびfdを収集します。

    -afd

    AFDログを収集します。

    -crs

    Oracle Clusterwareログを収集します。

    -wls

    Oracle WebLogic Server (WLS)ログを収集します。

    -emagent

    Oracle Enterprise Manager Agent (EMAGENT)ログを収集します。

    -oms

    Oracle Management Service (OMS)ログを収集します。

    -ocm

    Oracle Configuration Manager (OCM)ログを収集します。

    -emplugins

    Oracle Enterprise Managerプラグイン(EMPLUGINS)ログを収集します。

    -em

    Oracle Enterprise Manager (EM)ログを収集します。

    -acfs

    Oracle Automatic Storage Managementクラスタ・ファイル・システム(Oracle ACFS)ログとデータを収集します。

    -install

    Oracleインストール関連のファイルを収集します。

    -cfgtools

    構成ツールのログを収集します。

    -os

    /var/log/messagesなどのオペレーティング・システム・ファイルを収集します。

    -ashhtml

    アクティブ・セッション履歴(ASH)のHTMLレポートの生成を収集します。

    -ashtext

    アクティブ・セッション履歴(ASH)のテキスト・レポートの生成を収集します。

    -awrhtml

    自動ワークロード・リポジトリ(AWR)のHTMLログを収集します。

    -awrtext

    自動ワークロード・リポジトリ(AWR)のテキスト・レポートを収集します。

関連項目

14.9.6 特定のディレクトリからの収集

Oracle Trace File Analyzerは、すべてのOracle診断を検出し、タイプと最終更新時間に基づいて関連ファイルを収集します。

他のファイルを収集する場合は、追加のディレクトリを指定できます。Oracle Trace File Analyzerは関連する時間範囲(デフォルトでは12時間)内に更新されたファイルのみを収集します。

最終更新時間に関係なく、すべてのファイルの収集を構成できます。-collectallオプションを使用して、ディレクトリごとに構成します。

特定のディレクトリから収集するには:

  1. 過去12時間に更新されたすべてのファイルが含まれるようにするには、次のようにします。
    tfactl diagcollect –collectdir dir1,dir2,...dirn

    次に例を示します。

    過去12時間に更新されたすべてのOracle Clusterwareファイルに加えて、開始ノードの/tmp_dir1および/tmp_dir2のすべてのファイルを切捨ておよび収集するには、次のようにします。
    $ tfactl diagcollect –crs –collectdir /tmp_dir1,/tmpdir_2
  2. Oracle Trace File Analyzerを構成してすべてのディレクトリからファイルを収集するには、まず-collectallオプションを指定して構成します。
    $ tfactl add dir -collectall

    または

    tfactl modify dir -collectall
    -collectalldirsオプションを使用して、診断収集を開始します。
    $ tfactl diagcollect -collectalldirs

    注意:

    -collectalldirsオプションが正常に使用されていない場合は、ファイル・タイプ、名前、および時間範囲の制限が適用されます。

関連項目

14.9.7 収集名の変更

Oracle Trace File Analyzerは収集を圧縮し、次の命名形式を使用して、zipファイルをリポジトリ・ディレクトリに格納します。

repository/collection_date_time/node_all/node.tfa_date_time.zip

zipファイルの名前の変更には、次のオプションのみを使用する必要があります。ファイル名を手動で変更すると、Oracleサポートの様々なセルフサービス・ツールで収集を使用できなくなります。

収集名を変更するには:

  1. 独自の名前を使用して収集を整理するには、次のようにします。
    –tag tagname

    ファイルはリポジトリ内のtagnameディレクトリに収集されます。

  2. zipファイルの名前を変更するには、次のようにします。
    –z zip name

関連項目

14.9.8 zipファイルのコピーおよびファイルの切捨ての禁止

デフォルトでは、Oracle Trace File Analyzer Collectorは次のように動作します。

  • リモート・ノードから開始ノードにすべてのzipファイルをコピーします。

  • 関連する時間の前後でファイルを切り捨てます。

zipファイルのコピーおよびファイルの切捨てを禁止するには:

  1. zipファイルが開始ノードにコピーされないようにするには、次のようにします。
    –nocopy
    次に例を示します。
    $ tfactl diagcollect -last 1d -nocopy
  2. ファイルが切り捨てられないようにするには、次のようにします。
    –notrim
    次に例を示します。
    $ tfactl diagcollect -last 1d -notrim

関連項目

14.9.9 サイレント収集の実行

  1. サイレント収集を開始するには、次のようにします。
    –silent

    diagcollectコマンドはバックグラウンド・プロセスとして送信されます。

    次に例を示します。
    $ tfactl diagcollect -last 1d -silent

関連項目

14.9.10 コア・ファイルの収集の禁止

  1. コア・ファイルが含まれないようにするには、次のようにします。
    –nocores
    次に例を示します。
    $ tfactl diagcollect -last 1d -nocores

関連項目

14.9.11 インシデント・パッケージング・サービス(IPS)パッケージの収集

Oracleデータベースによって、インシデント・パッケージング・サービス・パッケージの問題の詳細が、後で診断するためにADRに格納されます。

構文

Oracle Trace File Analyzerは、IPSを実行し、これらのパッケージを問い合せて収集します。

tfactl ips option

表14-9 tfactl ipsコマンドのパラメータ

コマンド 説明

tfactl ips

IPSを実行します。

tfactl ips show incidents

すべてのIPSインシデントを表示します。

tfactl ips show problems

すべてのIPSの問題を表示します。

tfactl ips show package

すべてのIPSパッケージを表示します。

tfactl diagcollect -ips -h

使用可能なすべてのdiagcollect IPSオプションを表示します。

tfactl diagcollect -ips

プロンプトに続けて、IPS収集を実行します。すべての標準のdiagcollectオプションを使用して、IPS収集の範囲を制限できます。

tfactl diagcollect -ips -adrbasepath adr_base -adrhomepath adr_home

サイレント・モードでIPS収集を実行します。

tfactl diagcollect -ips -incident incident_id

特定のインシデントIDに関するADRの詳細を収集します。

tfactl diagcollect -ips -problem problem_id

特定の問題IDに関するADRの詳細を収集します。

IPSパッケージの内容を変更できます。次のオプションを使用します。

  1. 収集を開始します。

  2. -manageipsオプションを使用して、収集を一時停止します。

    次に例を示します。

    $ tfactl diagcollect -ips -incident incident_id -manageips -node local
  3. print suspendedipsオプションを使用して、一時停止した収集を見つけます。

    次に例を示します。

    $ tfactl print suspendedips
  4. パッケージを操作します。

  5. -resumeipsオプションを使用して、収集を再開します。

    次に例を示します。

    $ tfactl diagcollect -resumeips collection_id

関連項目