运维联盟俱乐部

 找回密码
 立即注册
查看: 2532|回复: 0

[故障处理] TFA手动收集诊断日志

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-6-4 19:07:19 | 显示全部楼层 |阅读模式
    以下命令式在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
    [grid@nxydb2 /oracle/app/11.2.0/grid/bin]$ ./tfactl diagcollect -from "Jul/17/2020 17:50:00" -to "Jul/17/2020 20:30:00"
    1. Collecting data for all nodes
    2. Scanning files from Jul/17/2020 17:50:00 to Jul/17/2020 20:30:00

    3. Collection Id : 20200722095646nxydb2

    4. Repository Location in nxydb2 : /oracle/app/grid/tfa/repository

    5. Collection monitor will wait up to 60 seconds for collections to start
    6. 2020/07/22 09:56:52 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    7. 2020/07/22 09:56:52 CST : Collection Name : tfa_Wed_Jul_22_09_56_46_CST_2020.zip
    8. 2020/07/22 09:56:52 CST : Sending diagcollect request to host : nxydb1
    9. 2020/07/22 09:56:52 CST : Scanning of files for Collection in progress...
    10. 2020/07/22 09:56:52 CST : Collecting extra files...
    11. 2020/07/22 09:56:57 CST : Getting list of files satisfying time range [07/17/2020 17:50:00 CST, 07/17/2020 20:30:00 CST]
    12. 2020/07/22 09:56:57 CST : Starting Thread to identify stored files to collect
    13. 2020/07/22 09:56:57 CST : Getting List of Files to Collect
    14. 2020/07/22 09:56:57 CST : Trimming file : nxydb2/asm/+asm/+ASM2/trace/+ASM2_rbal_15138904.trc with original file size : 698kB
    15. 2020/07/22 09:56:57 CST : Trimming file : nxydb2/tnslsnr/nxydb2/listener/trace/listener.log with original file size : 1.1GB
    16. 2020/07/22 09:56:57 CST : Trimming file : nxydb2/rdbms/nxydb/nxydb2/trace/alert_nxydb2.log with original file size : 10MB
    17. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/rdbms/nxydb/nxydb2/trace/nxydb2_dbrm_4850082.trc with original file size : 18MB
    18. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/rdbms/nxydb/nxydb2/trace/nxydb2_mmon_18350214.trc with original file size : 9.3MB
    19. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/cv/log/cvutrace.log.0 with original file size : 1.2MB
    20. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/crsd/oraagent_oracle/oraagent_oracle.log with original file size : 3.1MB
    21. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/crsd/orarootagent_root/orarootagent_root.log with original file size : 9.6MB
    22. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/ohasd/oraagent_grid/oraagent_grid.l01 with original file size : 10MB
    23. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/ohasd/oraagent_grid/oraagent_grid.log with original file size : 8.8MB
    24. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/ohasd/oracssdagent_root/oracssdagent_root.log with original file size : 1.2MB
    25. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/ohasd/oracssdmonitor_root/oracssdmonitor_root.log with original file size : 1.1MB
    26. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/agent/ohasd/orarootagent_root/orarootagent_root.l01 with original file size : 10MB
    27. 2020/07/22 09:56:58 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/alertnxydb2.log with original file size : 1.7MB
    28. 2020/07/22 09:56:59 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/client/olsnodes.log with original file size : 1.2MB
    29. 2020/07/22 09:56:59 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/cssd/ocssd.l01 with original file size : 52MB
    30. 2020/07/22 09:56:59 CST : Trimming file : nxydb2/oracle/app/11.2.0/grid/log/nxydb2/ohasd/ohasd.log with original file size : 7.5MB
    31. 2020/07/22 09:57:04 CST : Finished Getting List of Files to Collect
    32. 2020/07/22 09:57:04 CST : Collecting ADR incident files...
    33. 2020/07/22 09:57:04 CST : Waiting for collection of extra files
    34. 2020/07/22 10:01:03 CST : Completed collection of extra files...
    35. 2020/07/22 10:01:05 CST : Completed Zipping of all files
    36. 2020/07/22 10:01:05 CST : Cleaning up temporary files
    37. 2020/07/22 10:01:06 CST : Finished Cleaning up temporary files
    38. 2020/07/22 10:01:06 CST : Finalizing the Collection Zip File
    39. 2020/07/22 10:01:06 CST : Finished Finalizing the Collection Zip File
    40. 2020/07/22 10:01:06 CST : Total Number of Files checked : 1845
    41. 2020/07/22 10:01:06 CST : Total Size of all Files Checked : 3.5GB
    42. 2020/07/22 10:01:06 CST : Number of files containing required range : 37
    43. 2020/07/22 10:01:06 CST : Total Size of Files containing required range : 1.2GB
    44. 2020/07/22 10:01:06 CST : Number of files trimmed : 17
    45. 2020/07/22 10:01:06 CST : Total Size of data prior to zip : 62MB
    46. 2020/07/22 10:01:06 CST : Saved 1.2GB by trimming files
    47. 2020/07/22 10:01:06 CST : Zip file size : 7.5MB
    48. 2020/07/22 10:01:06 CST : Total time taken : 254s
    49. 2020/07/22 10:01:06 CST : Remote Collection in Progress...
    50. 2020/07/22 10:01:06 CST : nxydb1:Completed Collection
    51. 2020/07/22 10:01:06 CST : Completed collection of zip files.

    52. Logs are being collected to: /oracle/app/grid/tfa/repository/collection_Wed_Jul_22_09_56_46_CST_2020_node_all
    53. /oracle/app/grid/tfa/repository/collection_Wed_Jul_22_09_56_46_CST_2020_node_all/nxydb1.tfa_Wed_Jul_22_09_56_46_CST_2020.zip
    54. /oracle/app/grid/tfa/repository/collection_Wed_Jul_22_09_56_46_CST_2020_node_all/nxydb2.tfa_Wed_Jul_22_09_56_46_CST_2020.zip
    复制代码
    If TFA is installed (:)) simply run the following command:
    $GI_HOME/tfa/bin/tfactl diagcollect -from "MMM/dd/yyyy hh:mm:ss" -to "MMM/dd/yyyy hh:mm:ss"

    Format example: "Jul/1/2014 21:00:00"
    Specify the "from time" to be 4 hours before and the "to time" to be 4 hours after the time of error.
      
    If TFA is not installed (:():
    Datatbase logs & trace files:
    cd $(orabase)/diag/rdbms
    tar cf - $(find . -name '*.trc' -exec egrep '<date_time_search_string>' {} \; grep -v bucket) | gzip >  /tmp/database_trace_files.tar.gz

    ASM logs & trace files:
    cd $(orabase)/diag/asm/+asm/
    tar cf - $(find . -name '*.trc' -exec egrep '<date_time_search_string>' {} \; grep -v bucket) | gzip >  /tmp/asm_trace_files.tar.gz

    OS logs:
    /var/adm/messages* or /var/log/messages* or 'errpt -a' or Windows System Event Viewer log (saved as .TXT file)

    1. [grid@zy1 ~]$ tfactl diagcollect -from "Feb/24/2023 12:00:00" -to "feb/28/2023 11:06:00"

    2. Collecting data for all nodes

    3. TFA is using system timezone for collection, All times shown in CST.
    4. Scanning files from Feb/24/2023 12:00:00 to feb/28/2023 11:06:00
    5. WARNING: End time entered is after the current system time.

    6. Collection Id : 20230228004839zy1

    7. Detailed Logging at : /u01/app/grid/oracle.ahf/data/repository/collection_Tue_Feb_28_00_48_41_CST_2023_node_all/diagcollect_20230228004839_zy1.log
    8. 2023/02/28 00:48:50 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
    9. 2023/02/28 00:48:50 CST : Collection Name : tfa_Tue_Feb_28_00_48_41_CST_2023.zip
    10. 2023/02/28 00:48:52 CST : Collecting diagnostics from hosts : [zy2, zy1]
    11. 2023/02/28 00:48:56 CST : Scanning of files for Collection in progress...
    12. 2023/02/28 00:48:56 CST : Collecting Additional Diagnostic Information...
    13. 2023/02/28 00:49:01 CST : Getting list of files satisfying time range [02/24/2023 12:00:00 CST, 02/28/2023 00:48:55 CST]
    14. 2023/02/28 00:49:17 CST : Collecting ADR incident files...
    15. 2023/02/28 00:49:30 CST : Executing Collection for ASM with timeout of 1800 seconds...
    16. 2023/02/28 00:49:43 CST : Executing Collection for AFD with timeout of 1860 seconds...
    17. 2023/02/28 00:49:46 CST : Executing Collection for CRS with timeout of 1920 seconds...
    18. 2023/02/28 00:50:22 CST : Executing Collection for ACFS with timeout of 1980 seconds...
    19. 2023/02/28 00:50:23 CST : Executing Collection for OS with timeout of 2040 seconds...
    20. 2023/02/28 00:50:25 CST : Executing Collection for SOSREPORT with timeout of 2100 seconds...
    21. 2023/02/28 00:50:26 CST : Executing Collection for QOS with timeout of 2160 seconds...
    22. 2023/02/28 00:50:26 CST : Executing Collection for DATAGUARD with timeout of 2220 seconds...
    23. 2023/02/28 00:50:26 CST : Executing Collection for SYSLENS with timeout of 2280 seconds...
    24. 2023/02/28 00:50:29 CST : Completed Collection of Additional Diagnostic Information...
    25. 2023/02/28 00:50:32 CST : Completed Local Collection
    26. 2023/02/28 00:50:32 CST : Not Redacting this Collection ...
    27. 2023/02/28 00:50:32 CST : Remote Collection in Progress...

    28. .----------------------------------------.
    29. |           Collection Summary           |
    30. +------+-------------------+------+------+
    31. | Host | Status            | Size | Time |
    32. +------+-------------------+------+------+
    33. | zy2  | Failed Collection |      |      |
    34. | zy1  | Completed         | 42MB |  97s |
    35. '------+-------------------+------+------'

    36. Logs are being collected to: /u01/app/grid/oracle.ahf/data/repository/collection_Tue_Feb_28_00_48_41_CST_2023_node_all
    37. /u01/app/grid/oracle.ahf/data/repository/collection_Tue_Feb_28_00_48_41_CST_2023_node_all/zy1.tfa_Tue_Feb_28_00_48_41_CST_2023.zip
    复制代码



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 12:14 , Processed in 0.046774 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表