Linux下安装AHF

一、解压AHF

[root@HCPDB-19C ~]# unzip AHF-LINUX_v22.2.3.zip -d AHF 
#"-d" 为指定解压目录

二、创建AHF安装目录、数据目录

[root@HCPDB-19C ~]# mkdir /root/AHF/install
[root@HCPDB-19C ~]# mkdir /root/AHF/data

三、重配置perl(可先省略此步骤直接安装,如若不报错也可不需要配置)

#查找$ORACLE_HOME中的perl配置文件,重新copy其他路径并配置root属主,oinstall属组 
[root@HCPDB-19C ~]# mkdir /root/AHF/perl 
[root@HCPDB-19C ~]# cd /root/AHF/perl 
[root@HCPDB-19C ~]# cp -r $ORACLE_HOME/perl/* .

四、安装AHF

[root@HCPDB-19C ~]# ./ahf_setup -ahf_loc install/ -data_dir data/ -perlhome /root/AHF/perl/ #"-ahf_loc" 指定安装目录 
#"-data_dir" 指定数据目录 
#"-perlhome" 指定perl路径

五、查看AHF状态

[root@HCPDB-19C AHF]# tfactl status

.--------------------------------------------------------------------------------------------------.
| Host      | Status of TFA | PID   | Port  | Version    | Build ID             | Inventory Status |
+-----------+---------------+-------+-------+------------+----------------------+------------------+
| hcpdb-19c | RUNNING       | 15682 | 18396 | 22.2.3.0.0 | 22230020220901041408 | COMPLETE         |
'-----------+---------------+-------+-------+------------+----------------------+------------------'
[root@HCPDB-19C AHF]# ps -ef | grep AHF
root     15682     1  0 11:11 ?        00:01:12 /root/AHF/install/oracle.ahf/jre/bin/java -server -Xms32m -Xmx64m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/root/AHF/oracle.ahf/data/hcpdb-19c/diag/tfa oracle.rat.tfa.TFAMain /root/AHF/install/oracle.ahf/tfa
root     23990 20851  0 13:48 pts/1    00:00:00 grep --color=auto AHF
[root@HCPDB-19C AHF]# ps -ef | grep TFA
root     15682     1  0 11:11 ?        00:01:12 /root/AHF/install/oracle.ahf/jre/bin/java -server -Xms32m -Xmx64m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/root/AHF/oracle.ahf/data/hcpdb-19c/diag/tfa oracle.rat.tfa.TFAMain /root/AHF/install/oracle.ahf/tfa
root     23996 20851  0 13:49 pts/1    00:00:00 grep --color=auto TFA

[root@HCPDB-19C AHF]# ps -ef | grep osw
root     24013 20851  0 13:49 pts/1    00:00:00 grep --color=auto osw

六、收集日志信息

具体:可通过Oracle官方查询AHF使用命令

收集时间段选择命令:

  • [-last nh|d | -from time -to time | -for date]
1、指定-last参数以收集具有过去特定小时数的相关数据的文件 (h) 或天 (d)。默认情况下,使用带有此参数的命令还会修剪大文件并仅显示指定时间间隔内的文件。
您也可以使用-since,它具有与 相同的功能 -last。包含此选项是为了向后兼容。
2、指定-from和 -to参数(必须同时使用这两个参数)收集特定时间间隔内有相关数据的文件,并在此时间之前修剪文件较大的数据。
支持的时间格式:
"Mon/dd/yyyy hh:mm:ss"
"yyyy-mm-dd hh:mm:ss"
"yyyy-mm-ddThh:mm:ss"
"yyyy-mm-dd"
3、指定-for参数以收集具有指定日期相关数据的文件。收集的文件tfactl将具有时间戳,其中-for包含您指定的时间。此选项不进行数据修整。
支持的时间格式:
"Mon/dd/yyyy"
"yyyy-mm-dd"
4、笔记:
如果同时指定日期和时间,则必须用双引号 ("") 将这两个值括起来。如果仅指定日期或时间,则不必将单个值括在引号中。
#last方式
[root@HCPDB-19C AHF]# tfactl diagcollect -last 1h

Collecting data for all nodes

TFA is using system timezone for collection, All times shown in CST.

Collection Id : 20220913135434hcpdb-19c

Detailed Logging at : /root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_54_39_CST_2022_node_all/diagcollect_20220913135434_hcpdb-19c.log
2022/09/13 13:54:46 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2022/09/13 13:54:46 CST : Collection Name : tfa_Tue_Sep_13_13_54_37_CST_2022.zip
2022/09/13 13:54:46 CST : Collecting diagnostics from hosts : [hcpdb-19c]
2022/09/13 13:54:47 CST : Scanning of files for Collection in progress...
2022/09/13 13:54:47 CST : Collecting Additional Diagnostic Information...
2022/09/13 13:54:57 CST : Getting list of files satisfying time range [09/13/2022 12:54:46 CST, 09/13/2022 13:54:57 CST]
2022/09/13 13:55:00 CST : Collecting ADR incident files...
2022/09/13 13:55:02 CST : Executing Collection for ASM with timeout of 1800 seconds...
2022/09/13 13:55:02 CST : Executing Collection for AFD with timeout of 1860 seconds...
2022/09/13 13:55:03 CST : Executing Collection for CRS with timeout of 1920 seconds...
2022/09/13 13:55:04 CST : Executing Collection for ACFS with timeout of 1980 seconds...
2022/09/13 13:55:04 CST : Executing Collection for OS with timeout of 2040 seconds...
2022/09/13 13:55:08 CST : Executing Collection for SOSREPORT with timeout of 2100 seconds...
2022/09/13 13:55:09 CST : Executing Collection for QOS with timeout of 2160 seconds...
2022/09/13 13:55:10 CST : Executing Collection for DATAGUARD with timeout of 2220 seconds...
2022/09/13 13:55:10 CST : Executing Collection for SYSLENS with timeout of 2280 seconds...
2022/09/13 13:55:13 CST : Completed Collection of Additional Diagnostic Information...
2022/09/13 13:55:15 CST : Completed Local Collection
2022/09/13 13:55:16 CST : Not Redacting this Collection ...

.--------------------------------------.
|          Collection Summary          |
+-----------+-----------+-------+------+
| Host      | Status    | Size  | Time |
+-----------+-----------+-------+------+
| hcpdb-19c | Completed | 431kB |  29s |
'-----------+-----------+-------+------'

Logs are being collected to: /root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_54_39_CST_2022_node_all
/root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_54_39_CST_2022_node_all/hcpdb-19c.tfa_Tue_Sep_13_13_54_37_CST_2022.zip

#for方式
[root@HCPDB-19C AHF]# tfactl diagcollect -for "2022-09-13"

Collecting data for all nodes

TFA is using system timezone for collection, All times shown in CST.
Scanning files for sep/13/2022

Collection Id : 20220913135602hcpdb-19c

Detailed Logging at : /root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_56_06_CST_2022_node_all/diagcollect_20220913135602_hcpdb-19c.log
2022/09/13 13:56:12 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2022/09/13 13:56:12 CST : Collection Name : tfa_Tue_Sep_13_13_56_04_CST_2022.zip
2022/09/13 13:56:12 CST : Collecting diagnostics from hosts : [hcpdb-19c]
2022/09/13 13:56:13 CST : Scanning of files for Collection in progress...
2022/09/13 13:56:13 CST : Collecting Additional Diagnostic Information...
2022/09/13 13:56:18 CST : Getting list of files satisfying time range [09/13/2022 00:00:00 CST, 09/13/2022 13:56:13 CST]
2022/09/13 13:56:21 CST : Collecting ADR incident files...
2022/09/13 13:56:25 CST : Executing Collection for ASM with timeout of 1800 seconds...
2022/09/13 13:56:26 CST : Executing Collection for AFD with timeout of 1860 seconds...
2022/09/13 13:56:27 CST : Executing Collection for CRS with timeout of 1920 seconds...
2022/09/13 13:56:28 CST : Executing Collection for ACFS with timeout of 1980 seconds...
2022/09/13 13:56:28 CST : Executing Collection for OS with timeout of 2040 seconds...
2022/09/13 13:56:32 CST : Executing Collection for SOSREPORT with timeout of 2100 seconds...
2022/09/13 13:56:33 CST : Executing Collection for QOS with timeout of 2160 seconds...
2022/09/13 13:56:34 CST : Executing Collection for DATAGUARD with timeout of 2220 seconds...
2022/09/13 13:56:35 CST : Executing Collection for SYSLENS with timeout of 2280 seconds...
2022/09/13 13:56:37 CST : Completed Collection of Additional Diagnostic Information...
2022/09/13 13:56:42 CST : Completed Local Collection
2022/09/13 13:56:42 CST : Not Redacting this Collection ...

.--------------------------------------.
|          Collection Summary          |
+-----------+-----------+-------+------+
| Host      | Status    | Size  | Time |
+-----------+-----------+-------+------+
| hcpdb-19c | Completed | 743kB |  30s |
'-----------+-----------+-------+------'

Logs are being collected to: /root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_56_06_CST_2022_node_all
/root/AHF/oracle.ahf/data/repository/collection_Tue_Sep_13_13_56_06_CST_2022_node_all/hcpdb-19c.tfa_Tue_Sep_13_13_56_04_CST_2022.zip

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Alone_lll

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值