Oracle12cClusterHealthMonitor详解(四)

2015-01-23 22:14:32 · 作者: · 浏览: 10
-chmos] For collecting Cluster Health Monitor (OS) data [--acfs] Unix only. For collecting ACFS diagnostic information [--all] Default.For collecting all diagnostic information. [--core] UNIX only. Package core files with CRS data [--afterdate] UNIX only.Collects archives from the specified date. Specify in mm/dd/yyyy format [--aftertime] Supported with -adr option. Collects archives after thespecified time. Specify in YYYYMMDDHHMISS24 format [--beforetime] Supported with -adr option. Collects archives before thespecified date. Specify in YYYYMMDDHHMISS24 format [--crshome] Argument that specifies the CRS Home location [--incidenttime] Collects Cluster Health Monitor (OS) data from thespecified time. Specify inMM/DD/YYYYHH24:MM:SS format If not specified, ClusterHealth Monitor (OS) data generated in the past 24 hours are collected [--incidentduration] Collects Cluster Health Monitor (OS) data for theduration after the specified time. Specify in HH:MM format. If not specified, all ClusterHealth Monitor (OS) data after incidenttime are collected NOTE: 1. You can also do the following diagcollection.pl --collect--crs --crshome --clean cleans up thediagnosability information gathered bythis script --coreanalyze UNIX only. Extractsinformation from core files and stores it in a textfile [grid@rac1 ~]$

用grid用户执行命令:diagcollection.pl--collect --chmos

?

该命令会输出所有CHM 仓库中收集的数据。 如果数据很多,那么就需要很长时间,所以一般只查询特定时间内的数据。

?

[root@rac1 ~]# diagcollection.pl --collect--chmos

Production Copyright 2004, 2010,Oracle. All rights reserved

Cluster Ready Services (CRS) diagnosticcollection tool

ORACLE_BASE is /u01/gridbase

Collecting Cluster Health Monitor (OS) data

Version: 12.1.0.2.0

Collecting OS logs

Collecting sysconfig data



[root@rac1 ~]# ls -lrt

-rw-r--r-- 1 root root 9815498 Dec 12 16:28chmosData_rac1_20141212_1628.tar.gz

-rw-r--r-- 1 root root 267373 Dec 12 16:28osData_rac1_20141212_1628.tar.gz

注意:

如果是收集所有的数据,在完成之后,会对收集的数据打包,所以这时,就会需要tar命令,所以要注意当前目录是否有权限,否则就需要换对应的用户,我这里是root用户,配置了环境变量,一样使用。

--收集最后一小时的数据:

[root@rac1 ~]# oclumon dumpnodeview-allnodes -v -last "1:00:00"

?

该命令会分析所有节点最后一小时内的所有数据,但默认情况下,会把所有输出都显示在命令行,这样根本就不能分析,所以一般都是直接重定向输出到某个文件。

如:

[root@rac1 ~]# oclumon dumpnodeview-allnodes -v -last "1:00:00" > /tmp/zhixin.log

[root@rac1 ~]# cat /tmp/zhixin.log

--收集特定时间段:

?

[grid@rac1tmp]$ diagcollection.pl --collect --crshome $ORACLE_HOME --chmos--incidenttime "12/12/201414:01:01" --incidentduration "01:00"



Production Copyright 2004, 2010,Oracle. All rights reserved

Cluster Ready Services (CRS) diagnosticcollection tool

Warning: Script executed while not loggedin as as root

Some diagnostic data may not be collected

Collecting Cluster Health Monitor (OS) data

Version: 12.1.0.2.0

Collecting OS logs

/bin/tar: var/log/messages: Cannot open:Permission denied

/bin/tar: var/log/messages-20141208: Cannotopen: Permission denied

/bin/tar: Exiting with failure status dueto previous errors

gzip: osData_rac1_20141212_1643.tar.gzalready exists; do you wish to overwrite (y or n)? y

Collecting sysconfig data

[grid@rac1 tmp]$

注意:

(1)这里的时间格式,必须按这种来,具体参考命令的帮助手册。

(2) 在11.2.0.2 中,因为bug 10048487的存在,不能分析所有的CHM数据,只能