又宕机了,19.3单机库,想用一下tfa功能。
本机自带一个tfa,但是超过180天不能使用了。
下载一个新的ahf,解压后,需要root执行安装。
-
[root@host tmp]# ./ahf_setup
-
-
-
AHF Installer for Platform Linux Architecture x86_64
-
-
-
AHF Installation Log : /tmp/ahf_install_204000_19740_2021_04_09-14_12_52.log
-
-
-
Starting Autonomous Health Framework (AHF) Installation
-
-
-
AHF Version: 20.4.0 Build Date: 202012141017
-
-
-
PERL : /bin/perl
-
-
- [ERROR] : AHF-00074: Perl Modules not found : Data::Dumper
居然报错了,提示dumper模块不存在,安装一下相关模块。
[root@host tmp]# yum install perl-Data-Dumper
-
Loaded plugins: fastestmirror
-
Determining fastest mirrors
-
Centos7 | 3.6 kB 00:00:00
-
Resolving Dependencies
-
--> Running transaction check
-
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
-
--> Finished Dependency Resolution
-
-
-
Dependencies Resolved
-
-
-
============================
-
Package Arch Version Repository Size
-
============================
-
Installing:
-
perl-Data-Dumper x86_64 2.145-3.el7 Centos7 47 k
-
-
-
Transaction Summary
-
=======================
-
Install 1 Package
-
-
-
Total download size: 47 k
-
Installed size: 97 k
-
Is this ok [y/d/N]: y
-
Downloading packages:
-
perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00:00
-
Running transaction check
-
Running transaction test
-
Transaction test succeeded
-
Running transaction
-
Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/1
-
Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 1/1
-
-
Installed:
-
perl-Data-Dumper.x86_64 0:2.145-3.el7
-
模块安装完毕,继续安装ahf
[root@host tmp]# ./ahf_setup
-
AHF Installer for Platform Linux Architecture x86_64
-
-
-
AHF Installation Log : /tmp/ahf_install_204000_21467_2021_04_09-14_16_57.log
-
-
-
Starting Autonomous Health Framework (AHF) Installation
-
-
-
AHF Version: 20.4.0 Build Date: 202012141017
-
-
-
Default AHF Location : /opt/oracle.ahf
-
-
-
Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : ##默认回车 /opt目录空间要充足
-
-
-
AHF Location : /opt/oracle.ahf
-
-
-
AHF Data Directory stores diagnostic collections and metadata.
-
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.
-
-
-
Please Enter AHF Data Directory : /opt/oracle.ahf ##数据就放在这个目录下吧
-
-
-
AHF Data Directory : /opt/oracle.ahf/data
-
-
-
Do you want to add AHF Notification Email IDs ? [Y]|N : n ##不接收通知
-
-
-
Extracting AHF to /opt/oracle.ahf
-
-
-
Configuring TFA Services
-
-
-
Discovering Nodes and Oracle Resources
-
-
-
Successfully generated certificates.
-
-
-
Starting TFA Services
-
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.
-
-
-
.---------------------------------------------------------------------------------------------.
-
| Host | Status of TFA | PID | Port | Version | Build ID |
-
+-------------------------+---------------+-------+-------+------------+----------------------+
-
| host | RUNNING | 22954 | 13546 | 20.4.0.0.0 | 20400020201214101756 |
-
'-------------------------+---------------+-------+-------+------------+----------------------'
-
-
-
Running TFA Inventory...
-
-
-
Adding default users to TFA Access list...
-
-
-
.---------------------------------------------------------------------.
-
| Summary of AHF Configuration |
-
+-----------------+---------------------------------------------------+
-
| Parameter | Value |
-
+-----------------+---------------------------------------------------+
-
| AHF Location | /opt/oracle.ahf |
-
| TFA Location | /opt/oracle.ahf/tfa |
-
| Orachk Location | /opt/oracle.ahf/orachk |
-
| Data Directory | /opt/oracle.ahf/data |
-
| Repository | /opt/oracle.ahf/data/repository |
-
| Diag Directory | /opt/oracle.ahf/data/host/diag |
-
'-----------------+---------------------------------------------------'
-
-
-
Starting orachk scheduler from AHF ...
-
-
-
AHF binaries are available in /opt/oracle.ahf/bin
-
-
-
AHF is successfully installed ## 安装成功啦
-
-
- 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
开始用用
-
[oracle@shdb01 ~]$ tfactl diagcollect –srdc -help
-
-
Invalid Option for diagcollect: –srdc
-
-
Collect logs from across nodes in cluster
-
-
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]
-
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
-
-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><m|h|d> Files from last 'n' [m]inutes, '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
-
-cores Collect Core files when it would normally not 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:
- /opt/oracle.ahf/tfa/bin/tfactl diagcollect [component_name1] [component_name2] ... [component_nameN] -help
参考:
- 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