Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3693349
  • 博文数量: 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

2020-02-15 10:44:48

ahf:就是工具合集,大名是自治健康框架Autonomous Health Framework 

需要从官方下载一个包,安装后,它自己后台运行,搜集日志方便很多了。

下载到本地后(360多兆),解压
[root@dbserver01 a]# unzip -q AHF-LINUX_v19.3.2.zip 
[root@dbserver01 a]# ll
total 722704
-rw-r--r-- 1 oracle oinstall 366721686 Feb 12 15:22 AHF-LINUX_v19.3.2.zip
-rwxr-xr-x 1 root   root     373317903 Dec 20 01:42 ahf_setup
-rw-r--r-- 1 root   root           832 Dec 20 02:00 README.txt
用root执行安装,对,直接装
[root@dbserver01 a]# ./ahf_setup 
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_38663_2020_02_12-15_23_12.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 193200 Build Date: 201911251327
TFA is already installed at : /u01/app/11.2.0.4/grid/tfa/dbserver01/tfa_home
Installed TFA Version : 121284 Build ID : 20170203230512
Default AHF Location : /opt/oracle.ahf
Do you want to change AHF Location (/opt/oracle.ahf) ? Y|[N] : 直接回车
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.
Choose Data Directory from below options : 
1. /opt/oracle.ahf [Free Space : 4751 MB]
2. /u01/app/grid [Free Space : 59331 MB]
3. Enter a different Location
Choose Option [1 - 3] : 2   我选2将数据放到grid目录下,因为/opt通常比较小 
AHF Data Directory : /u01/app/grid/oracle.ahf/data
Shutting down TFA : /u01/app/11.2.0.4/grid/tfa/dbserver01/tfa_home
Copying TFA Data Files from /u01/app/11.2.0.4/grid/tfa/dbserver01/tfa_home
Uninstalling TFA : /u01/app/11.2.0.4/grid/tfa/dbserver01/tfa_home
Do you want to add AHF Notification Email IDs ? [Y]|N : N  不收通知邮件
AHF will also be installed/upgraded on these Cluster Nodes :
1. dbserver02
The AHF Location and AHF Data Directory must exist on the above nodes
AHF Location : /opt/oracle.ahf
AHF Data Directory : /u01/app/grid/oracle.ahf/data
Do you want to install/upgrade AHF on Cluster Nodes ? [Y]|N : N
Not performing install/upgrade on Cluster Nodes
Extracting AHF to /opt/oracle.ahf
Configuring TFA Services
Copying TFA Data Files to AHF
File /u01/app/grid/oracle.ahf/data/dbserver01/tfa/internal/smtp.properties.patch not found
File /u01/app/grid/oracle.ahf/data/dbserver01/tfa/internal/timezones_mapping.patch not found
Discovering Nodes and Oracle Resources
Starting TFA Services
.-------------------------------------------------------------------------------.
| Host       | Status of TFA | PID   | Port | Version    | Build ID             |
+------------+---------------+-------+------+------------+----------------------+
| dbserver01 | RUNNING       | 42213 | 5000 | 19.3.2.0.0 | 19320020191125132721 |
| dbserver02 | RUNNING       | 13462 | 5000 | 19.3.2.0.0 | 19320020191125132721 |
'------------+---------------+-------+------+------------+----------------------'
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  | /u01/app/grid/oracle.ahf/data                 |
| Repository      | /u01/app/grid/oracle.ahf/data/repository      |
| Diag Directory  | /u01/app/grid/oracle.ahf/data/dbserver01/diag |
'-----------------+-----------------------------------------------'
Starting orachk daemon from AHF ...
AHF binaries are available in /opt/oracle.ahf/bin
AHF is successfully installed
Moving /tmp/ahf_install_38663_2020_02_12-15_23_12.log to /u01/app/grid/oracle.ahf/data/dbserver01/diag/ahf/
[root@dbserver01 a]# 

安装完毕了。
它会自动检测到RAC集群的不同节点,建议只选择本地安装


抓一次信息试试:
[root@dbserver02 ~]# cd /opt/oracle.ahf/
[root@dbserver02 oracle.ahf]# cd tfa
[root@dbserver02 tfa]# ls
bin  DISCLAIMER.txt  ext  input  install  internal  public.jks  README.txt  resources  tfa.install.properties  tfa.jks  transfers
[root@dbserver02 tfa]# cd bin
[root@dbserver02 bin]# ./tfactl diagcollect -from "Feb/12/2020 14:50:00" -to "Feb/12/2020 17:05:00"
Collecting data for all nodes
Scanning files from Feb/12/2020 14:50:00 to Feb/12/2020 17:05:00
WARNING: End time entered is after the current system time.


Collection Id : 20200212152634dbserver02


Detailed Logging at : /u01/app/grid/oracle.ahf/data/repository/collection_Wed_Feb_12_15_26_35_CST_2020_node_all/diagcollect_20200212152634_dbserver02.log
2020/02/12 15:26:39 CST : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2020/02/12 15:26:39 CST : Collection Name : tfa_Wed_Feb_12_15_26_35_CST_2020.zip
2020/02/12 15:26:39 CST : Collecting diagnostics from hosts : [dbserver01, dbserver02]
2020/02/12 15:26:39 CST : Scanning of files for Collection in progress...
2020/02/12 15:26:39 CST : Collecting additional diagnostic information...
2020/02/12 15:26:44 CST : Getting list of files satisfying time range [02/12/2020 14:50:00 CST, 02/12/2020 15:26:39 CST]
2020/02/12 15:26:46 CST : Collecting ADR incident files...
2020/02/12 15:27:56 CST : Completed collection of additional diagnostic information...
2020/02/12 15:28:01 CST : Completed Local Collection
2020/02/12 15:28:01 CST : Remote Collection in Progress...
.---------------------------------------.
|           Collection Summary          |
+------------+-----------+-------+------+
| Host       | Status    | Size  | Time |
+------------+-----------+-------+------+
| dbserver01 | Completed | 3.2MB |  85s |
| dbserver02 | Completed | 2.7MB |  82s |
'------------+-----------+-------+------'


Logs are being collected to: /u01/app/grid/oracle.ahf/data/repository/collection_Wed_Feb_12_15_26_35_CST_2020_node_all
/u01/app/grid/oracle.ahf/data/repository/collection_Wed_Feb_12_15_26_35_CST_2020_node_all/dbserver02.tfa_Wed_Feb_12_15_26_35_CST_2020.zip
/u01/app/grid/oracle.ahf/data/repository/collection_Wed_Feb_12_15_26_35_CST_2020_node_all/dbserver01.tfa_Wed_Feb_12_15_26_35_CST_2020.zip
[root@dbserver02 bin]# 
抓完了,生成两个zip包,因为RAC节点有两个,它会自动取。

然后就可以将这两个zip上传到MOS了。


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