Exadata上的健康检查工具(exachk)

转载:https://blogs.oracle.com/ExadataCN/entry/exadata%E4%B8%8A%E7%9A%84%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5%E5%B7%A5%E5%85%B7_exachk

 

Exachk 是Exadata上的健康检查工具,它的作用是使Exadata机器发挥出最大的性能。

 

Oracle在Exadata机器上面有它的最佳实践和一些配置的建议值,我们定期使用exachk这个工具收集机器上的系统信息,并结合这些最佳实践和建议值,可以及时发现有哪些潜在的问题。然后把这些隐患消除,最终保障Exadata系统的稳定运行。

 

既然Oracle能够提供配置建议和最佳实践,那么这个工具就会定期地不断被更新优化。所以我们每次用到exachk的时候最好下载最新版本的。exachk 工具可以从下面文档中的附件得到,针对HP硬件的健康检查脚本是HealthCheck。

 

 

 

Oracle Exadata Database Machine exachk or HealthCheck (Doc ID 1070954.1)

 

 

 

Exachk 工具使用起来非常简单,它会自己读取系统文件的相关信息。检查的组件包括数据库服务器,storage存储服务器,InfiniBand 和 Ethernet网络。exachk 收集出来信息很全,省去大量人工收集的繁琐步骤。对于敏感信息也可以放心, 因为收集的全部信息都是针对Exadata的可用性和稳定性, 还有数据库架构的安全性等方面,并不会涉及数据库内容的任何业务数据。它会很智能的分析当前系统与Oracle最佳实践的差异,并将收集的信息进行排序,优先显示出目前最大的风险。而且在执行的过程中几乎对系统没有任何影响。 收集完成后,可以在整体上对系统的健康状况做一个评估,该报告包含软件、硬件、固件版本、配置等方面信息。

 

 

 

我们建议更改系统配置的前后去执行exachk, 或者升级打补丁等等。所以它应该列入到我们日常的数据库维护计划中。

 

 

 

当前最新Exachk的版本是12.1.0.2.5_20151023; 下载后解压可以得到三类文件, 分别是校验文件 (md5sums); 指令文件 (exachk.zip); 文档文件 (Documentation_and_Examples)。

 

 

 

这里简单介绍一下基本的操作和步骤:

 

 

 

1. 把指令文件exachk.zip上传到一个数据库服务器节点上

 

推荐路径 /opt/oracle.SupportTools/exachk

 

2. Unzip 解压exachk.zip

 

3. 推荐使用root用户去执行exachk (可以考虑使用VNC避免网络中断)

 

<从12.1.0.2.2版本起, Oracle推荐使用root去执行exachk>

 

执行exachk的时候,会有一些提示信息需要输入Yes or No,确认您是否从系统收集数据,并给你一些选项,同时需要输入密码 (exachk 是不会保存密码文件到操作系统),然后脚本开始工作,收集原始数据并在最后进行分析。原数据和分析结果会被存放在以日期为结构的目录中。详情请参考文档文件里的Exachk的使用手册。

 

 

 

Exachk 有个watchdog进程,负责监控exachk的执行状态,它会设定一个默认的“超时”值, 以防止exachk
hung住。在一个繁忙的系统中,如果在默认的时间内没有响应的话,检查将会被终止。通过设置一些环境变量,可以延长默认的“超时”值。(RAT_TIMEOUT 和 RAT_ROOT_TIMEOUT)

 

 

 

接下来我们看下执行exachk 的过程:

 

 

 

$ ./exachk

 

CRS stack is
running and CRS_HOME is not set. Do you want to set CRS_HOME to /u01/app/11.2.0/grid?[y/n][y]

 

Exachk可以自己通过查询系统文件,来判断grid
home,如果路径正确,你可以输入“Y”来设定CRS_HOME,如果不正确,需要输入“N”然后手动设置正确的路径。

 

 

 

Checking ssh user
equivalency settings on all nodes in cluster

 

Node randomdb02 is
configured for ssh user equivalency for oracle user

 

Exachk会验证 ssh等价性是否可用,如果没有配置ssh等价性,它会需要你输入密码,并临时配置等价性。

 

 

 

Searching for
running databases . . . . .

 

. .

 

List of running
databases registered in OCR

 

1. dbm

 

2. dss

 

3. All of above

 

4. None of above

 

Select databases
from list for checking best practices. For multiple databases, select 3 for All
or comma separated number like 1,2 etc [1-4][3].1

 

Exachk会提取OCR中已经注册的数据库列表,你可以选择一个你需要检查的数据库,如果检查多个多个数据库,可以使用逗号隔开。也可以选择ALL来检查全部的数据库。

 

 

 

Searching out
ORACLE_HOME for selected databases.

 

. . .

 

Checking Status of
Oracle Software Stack - Clusterware, ASM, RDBMS

 

. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .

 

------------------------------------------------------------------------------------------------

 

Oracle Stack Status

 

------------------------------------------------------------------------------------------------

 

Host Name CRS Installed ASM HOME RDBMS Installed CRS UP ASM UP RDBMS UP DB Instance Name

 

------------------------------------------------------------------------------------------------

 

randomdb01 Yes Yes Yes Yes Yes Yes dbm1

 

randomdb02 Yes Yes Yes Yes Yes Yes dbm2

 

------------------------------------------------------------------------------------------------

 

根据之前的输入与确认,exachk会将需要检查的数据库信息列出。

 

 

 

root user equivalence is not setup between randomdb01 and STORAGE
SERVER randomcel01.

 

1. Enter 1 if you will enter root password for each STORAGE SERVER
when prompted.

 

2. Enter 2 to exit and configure root user equivalence manually
and re-run exachk.

 

3. Enter 3 to skip checking best practices on STORAGE SERVER.

 

Please indicate your selection from one of the above
options[1-3][1]:-

 

这一步需要针对cell存储进行检查,根据提示,我们根据需求来选择。大多数情况我们会选择“1”,然后如果所有的cell存储的密码相同就输入“Y”,最后输入root密码。root密码只需要输入一次,就会被记录在内存中,并且被其他的Cell重复使用,直到exachk执行完成,内存才会释放密码。

 

 

 

101 of the included audit checks require root privileged data
collection on DATABASE SERVER. If sudo is not configured or the root password
is not available, audit checks which require root privileged data collection
can be skipped.

 

1. Enter 1 if you will enter root password for each on DATABASE
SERVER host when prompted

 

2. Enter 2 if you have sudo configured for oracle user to execute
root_exachk.sh script on DATABASE SERVER

 

3. Enter 3 to skip the root privileged collections on DATABASE
SERVER

 

4. Enter 4 to exit and work with the SA to configure sudo on
DATABASE SERVER or to arrange for root access and run the tool later.

 

Please indicate your selection from one of the above
options[1-4][1]:-

 

这一步需要针对数据库服务器进行检查,根据提示,我们根据需求来选择。

 

 

 

9 of the included audit checks require nm2user privileged data
collection on INFINIBAND SWITCH.

 

1. Enter 1 if you will enter nm2user password for each INFINIBAND
SWITCH when prompted

 

2. Enter 2 to exit and to arrange for nm2user access and run the
exachk later.

 

3. Enter 3 to skip checking best practices on INFINIBAND SWITCH

 

Please indicate your selection from one of the above
options[1-3][1]:-

 

这个页面显示的是针对InfiniBand是否检查及密码确认界面,方法同数据库服务器和Cell存储。

 

 

 

=============================================================

 

Node name - randomdb01

 

=============================================================

 

Collecting - ASM
Diskgroup Attributes

 

Collecting - ASM
initialization parameters

 

Collecting -
Database Parameters for dbm database

 

Collecting -
Database Undocumented Parameters for dbm database

 

Collecting -
Clusterware and RDBMS software version

 

<output truncated for brevity>

 

完成以上的操作后,exachk就开始进行数据的收集,分析并产生报告。至此,我们不需要再输入其他的信息。

 

它会实时的显示当前工作的进度,如目前检查到数据库服务器,存储服务器还是Infiniband交换机等。如果你需要立即终止exachk的执行,只需要按ctrl+c即可,exachk会自动执行它的清理程序并推出。

 

 

 

Detailed report
(html) -
/home/oracle/exachk_215/20120524/exachk_dbm_053012_102825/exachk_dbm_053012_102825.html

 

UPLOAD(if required) -
/home/oracle/exachk_215/20120524/exachk_dbm_053012_102825.zip

 

执行结束后会输出文件的参考信息。

 

 

 

生成的HTML报告内容:

 

 

 

“Cluster Summary”列出了当前环境概要;

 

 

 

这个“目录”列出了这次产生的报告中,包含主要分类的快捷方式。点击您关心的项目,就会直接链接到指定的页面。这个目录能列出多少分类选项,取决于命令行收集时,是否在某部分被限制,和是否有一些被kill掉 / skip 跳过的检查项目。

 

 

 

报告里面的内容在这里就不详细介绍了, 提供两篇参考文档;根据文档757552.1,我们可以查询当前Oracle最佳实践建议。同时也可以参考888828.1文档,来查询Exadata机器当前支持的版本信息。

 

 

 

Oracle Exadata Best
Practices (Doc ID 757552.1)

 

Database Machine
and Exadata Storage Server 11g Release 2 (11.2) Supported Versions (Doc ID
888828.1)

 

posted @ 2016-05-08 16:29  dbaquan  阅读(1444)  评论(0编辑  收藏  举报