轉 Oracle Cluster Health Monitor(CHM)簡介

來源:互聯網
上載者:User

標籤:root使用者   mosh   ora   windows   ocs   read   操作   modify   http   

Cluster Health Monitor(以下簡稱CHM)是一個Oracle提供的工具,用來自動收集作業系統的資源(CPU、記憶體、SWAP、進程、I/O以及網路等)的使用方式。CHM會每秒收集一次資料。這些系統資源資料對於診斷叢集系統的節點重啟、Hang、執行個體驅逐(Eviction)、效能問題等是非常有協助的。另外,使用者可以使用CHM來及早發現一些系統負載高、記憶體異常等問題,從而避免產生更嚴重的問題。

  CHM預設安裝在以下版本

   11.2.0.2 及更高版本的 Oracle Grid Infrastructure for Linux (不包括Linux Itanium) 、Solaris (Sparc 64 和 x86-64)
   11.2.0.3 及更高版本 Oracle Grid Infrastructure for AIX 、 Windows (不包括Windows Itanium)。

 

  CHM服務介紹(以下進程都可以使用ps -ef|grep 命令來查看):

   1、System Monitor Service(osysmond):這個服務在所有節點都會運行,osysmond會將每個節點的資源使用方式發送給cluster logger service,後者將會把所有節點的信             息都接收並儲存到CHM的資料庫。

   2、Cluster Logger Service(ologgerd):在一個叢集中的,ologgerd 會有一個主機點(master),還有一個備節點(standby)。當ologgerd在當前的節點遇到問題無法啟動後,它會在備用節點啟用。

 

  我們可以使用命令來查看CHM運行狀態

 

  1. crsctl stat res -t -init

 

  CHM Repository:用於存放收集到資料,在預設情況下,會存在於Grid Infrastructure home 下 ,需要1 GB 的磁碟空間,每個節點大約每天會佔用0.5GB的空間。 您可以使用OCLUMON來調整它的存放路徑以及允許的空間大小(最多隻能儲存3天的資料。

 

  簡單命令操作

  1、查看目前的目錄設定

 

  1.  oclumon manage -get reppath

 

  2、查看當前收集大小(注意單位為秒)

 

  1. oclumon manage -get repsize

 

  3、修改路徑    

 

  1. oclumon manage -repo reploc  /soft/chm/

 

  4、修改大小

 

  1.  oclumon manage -repos resize 60000
 

 

 

  擷取CHM資料的方法

  1、使用Grid_home/bin/diagcollection.pl

 

  • 首先,確定cluster logger service的主節點
    1. oclumon manage -get master

 

  • 用root身份在主節點執行下面的命令 
<Grid_home>/bin/diagcollection.pl -collect -chmos -incidenttime inc_time -incidentduration duration
 incidenttime是指從什麼時間開始獲得資料,格式為MM/DD/YYYY24HH:MM:SS, incidentduration指的是獲得開始時間後多長時間的資料。
  例如:
diagcollection.pl -collect -crshome /u01/app/11.2.0/grid -chmoshome  /u01/app/11.2.0/grid -chmos -incidenttime 06/15/201412:30:00 -incidentduration 00:05
   運行這個命令之後,CHM的資料會產生在檔案chmosData_rac2_20140615_1237.tar.gz。

 2、使用oclumon來獲得CHM資料

 

  1. oclumon dumpnodeview [[-allnodes] | [-n node1 node2] [-last "duration"] | [-s "time_stamp" -e "time_stamp"] [-v] [-warning]] [-h]
  2. #(-s表示開始時間,-e表示結束時間)

 

  例如:

  1. oclumon dumpnodeview -allnodes -v -s "2012-06-15 07:40:00" -e "2012-06-15 07:57:00" > /tmp/chm1.txt
  2. oclumon dumpnodeview -n node1 node2 -last "12:00:00" >/tmp/chm1.txt
  3. oclumon dumpnodeview -allnodes -last "00:15:00" >/tmp/chm1.txt
 

關閉以及開啟CHM(使用grid在每個節點執行)

這個關閉類似Linux的service stop,重啟後還會自動開啟,關閉後系統IO會有所下降

 

  1. #關閉
  2. crsctl stop res ora.crf -init
  3. #啟動
  4. crsctl start res ora.crf -init
  禁用與啟用CHM(類似chkconfig)使用root使用者

 

 

  1. #禁用
  2. crsctl modify resource ora.crf -attr "AUTO_START=never" -init
  3. #啟用
  4. crsctl modify resource ora.crf -attr "AUTO_START=always" -init

 

 

 

 

 

參考Oracle官方文檔
  http://docs.Oracle.com/cd/E11882_01/rac.112/e16794/troubleshoot.htm#CWADD92242
  Oracle? Clusterware Administration and Deployment Guide
  11g Release 2 (11.2)
  Part Number E16794-17


My Oracle Support文檔
  Cluster Health Monitor (CHM) FAQ (Doc ID 1328466.1)


CHM及UI
http://www.oracle.com/technetwork/database/clustering/downloads/ipd-download-homepage-087212.html

 

 

 http://blog.csdn.net/mhmds/article/details/72843249

 

 

 

轉 Oracle Cluster Health Monitor(CHM)簡介

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.