Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3673098
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

分类: Oracle

2021-04-09 16:08:56


又宕机了,19.3单机库,想用一下tfa功能。

本机自带一个tfa,但是超过180天不能使用了。

下载一个新的ahf,解压后,需要root执行安装

  1. [root@host tmp]# ./ahf_setup


  2. AHF Installer for Platform Linux Architecture x86_64


  3. AHF Installation Log : /tmp/ahf_install_204000_19740_2021_04_09-14_12_52.log


  4. Starting Autonomous Health Framework (AHF) Installation


  5. AHF Version: 20.4.0 Build Date: 202012141017


  6. PERL : /bin/perl


  7. [ERROR] : AHF-00074: Perl Modules not found : Data::Dumper



居然报错了,提示dumper模块不存在,安装一下相关模块。

[root@host tmp]#  yum install perl-Data-Dumper

  1. Loaded plugins: fastestmirror
  2. Determining fastest mirrors
  3. Centos7 | 3.6 kB 00:00:00
  4. Resolving Dependencies
  5. --> Running transaction check
  6. ---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
  7. --> Finished Dependency Resolution


  8. Dependencies Resolved


  9. ============================
  10.  Package Arch Version Repository Size
  11. ============================
  12. Installing:
  13.  perl-Data-Dumper x86_64 2.145-3.el7 Centos7 47 k


  14. Transaction Summary
  15. =======================
  16. Install 1 Package


  17. Total download size: 47 k
  18. Installed size: 97 k
  19. Is this ok [y/d/N]: y
  20. Downloading packages:
  21. perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00:00
  22. Running transaction check
  23. Running transaction test
  24. Transaction test succeeded
  25. Running transaction
  26.   Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/1
  27.   Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 1/1

  28. Installed:
  29.   perl-Data-Dumper.x86_64 0:2.145-3.el7


模块安装完毕,继续安装ahf

[root@host tmp]# ./ahf_setup 

  1. AHF Installer for Platform Linux Architecture x86_64


  2. AHF Installation Log : /tmp/ahf_install_204000_21467_2021_04_09-14_16_57.log


  3. Starting Autonomous Health Framework (AHF) Installation


  4. AHF Version: 20.4.0 Build Date: 202012141017


  5. Default AHF Location : /opt/oracle.ahf


  6. Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : ##默认回车 /opt目录空间要充足


  7. AHF Location : /opt/oracle.ahf


  8. AHF Data Directory stores diagnostic collections and metadata.
  9. AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.


  10. Please Enter AHF Data Directory : /opt/oracle.ahf ##数据就放在这个目录下吧


  11. AHF Data Directory : /opt/oracle.ahf/data


  12. Do you want to add AHF Notification Email IDs ? [Y]|N : n ##不接收通知


  13. Extracting AHF to /opt/oracle.ahf


  14. Configuring TFA Services


  15. Discovering Nodes and Oracle Resources


  16. Successfully generated certificates.


  17. Starting TFA Services
  18. Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.
  19. Created symlink from /etc/systemd/system/graphical.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.


  20. .---------------------------------------------------------------------------------------------.
  21. | Host | Status of TFA | PID | Port | Version | Build ID |
  22. +-------------------------+---------------+-------+-------+------------+----------------------+
  23. | host | RUNNING | 22954 | 13546 | 20.4.0.0.0 | 20400020201214101756 |
  24. '-------------------------+---------------+-------+-------+------------+----------------------'


  25. Running TFA Inventory...


  26. Adding default users to TFA Access list...


  27. .---------------------------------------------------------------------.
  28. | Summary of AHF Configuration |
  29. +-----------------+---------------------------------------------------+
  30. | Parameter | Value |
  31. +-----------------+---------------------------------------------------+
  32. | AHF Location | /opt/oracle.ahf |
  33. | TFA Location | /opt/oracle.ahf/tfa |
  34. | Orachk Location | /opt/oracle.ahf/orachk |
  35. | Data Directory | /opt/oracle.ahf/data |
  36. | Repository | /opt/oracle.ahf/data/repository |
  37. | Diag Directory | /opt/oracle.ahf/data/host/diag |
  38. '-----------------+---------------------------------------------------'


  39. Starting orachk scheduler from AHF ...


  40. AHF binaries are available in /opt/oracle.ahf/bin


  41. AHF is successfully installed ## 安装成功啦


  42. Moving /tmp/ahf_install_204000_21467_2021_04_09-14_16_57.log to /opt/oracle.ahf/data/host/diag/ahf/

[root@host tmp]# cd /opt/oracle.ahf/tfa  
[root@host tfa]# ls
bin  DISCLAIMER.txt  ext  input  install  internal  public.jks  README.txt  resources  tfa.install.properties  tfa.jks  transfers
[root@host tfa]# cd bin
[root@host bin]# ./tfactl diagcollect -srdc DBSHUTDOWN

开始用用



  1. [oracle@shdb01 ~]$ tfactl diagcollect –srdc -help

  2. Invalid Option for diagcollect: –srdc

  3. Collect logs from across nodes in cluster

  4. Usage : /opt/oracle.ahf/tfa/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><m|h|d>| -from <time> -to <time> | -for <time>] [-nocopy] [-notrim] [-silent] [-cores][-collectalldirs][-collectdir <dir1,dir2..>][-examples]
  5.     components:-ips|-database|-asm|-crsclient|-dbclient|-dbwlm|-tns|-rhp|-procinfo|-cvu|-afd|-crs|-cha|-wls|-emagenti|-emagent|-oms|-omsi|-ocm|-emplugins|-em|-acfs|-install|-cfgtools|-os|-ashhtml|-ashtext|-awrhtml|-awrtext|-sosreport|-qos|-rdbms|-asm|-crsclient|-dbclient|-dbwlm|-tns|-rhp|-procinfo|-cvu|-afd|-crs|-cha|-wls|-emagenti|-emagent|-oms|-omsi|-ocm|-emplugins|-em|-acfs|-install|-cfgtools|-os|-ips|-ashhtml|-ashtext|-awrhtml|-awrtext|-sosreport|-qos
  6.     -srdc Service Request Data Collection (SRDC).
  7.     -defips Include in the default collection the IPS Packages for:
  8.                     ASM, CRS and Databases
  9.     -sr Enter SR number to which the collection will be uploaded
  10.     -node Specify comma separated list of host names for collection
  11.     -tag <tagname> The files will be collected into tagname directory inside
  12.                     repository
  13.     -z <zipname> The collection zip file will be given this name within the
  14.                     TFA collection repository
  15.     -last <n><m|h|d> Files from last 'n' [m]inutes, 'n' [d]ays or 'n' [h]ours
  16.     -since Same as -last. Kept for backward compatibility.
  17.     -from "Mon/dd/yyyy hh:mm:ss" From <time>
  18.                     or "yyyy-mm-dd hh:mm:ss"
  19.                     or "yyyy-mm-ddThh:mm:ss"
  20.                     or "yyyy-mm-dd"
  21.     -to "Mon/dd/yyyy hh:mm:ss" To <time>
  22.                     or "yyyy-mm-dd hh:mm:ss"
  23.                     or "yyyy-mm-ddThh:mm:ss"
  24.                     or "yyyy-mm-dd"
  25.     -for "Mon/dd/yyyy" For <date>.
  26.                     or "yyyy-mm-dd"
  27.     -nocopy Does not copy back the zip files to initiating node from all nodes
  28.     -notrim Does not trim the files collected
  29.     -silent This option is used to submit the diagcollection as a background
  30.                     process
  31.     -cores Collect Core files when it would normally not have been
  32.                     collected
  33.     -collectalldirs Collect all files from a directory marked "Collect All"
  34.                     flag to true
  35.     -collectdir Specify comma separated list of directories and collection will
  36.                     include all files from these irrespective of type and time constraints
  37.                     in addition to components specified
  38.     -examples Show diagcollect usage examples
  39. For detailed help on each component use:
  40.   /opt/oracle.ahf/tfa/bin/tfactl diagcollect [component_name1] [component_name2] ... [component_nameN] -help


参考:

  1. https://docs.oracle.com/en/engineered-systems/health-diagnostics/autonomous-health-framework/ahfug/collecting-diagnostics-and-using-one-command-srdc.html#GUID-F8381A7A-E2F7-442C-AED0-3FEEF4129125

阅读(2065) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~