Monitoring the Cluster in Real Time with CHM (Cluster Health Monitor)
2012-08-13 17:22
555 查看
http://levipereira.wordpress.com/2011/07/19/monitoring-the-cluster-in-real-time-with-chm-cluster-health-monitor/
WhyClusterHealthMonitor?
OracleClusterware&Oracledatabaseperformance/noderebootduetolackofCPU/MemoryresourcescauseCustomerstoaskhowtomonitortheirOS.Somecustomershaverudimentaryscriptsthatutilizevmstat,mpstatbuttheyareoftennodecollectedatregularintervals.Insomecases,wehaveseencustomerscollectthisonceperhourwhichdoesnotmakeitveryusefulwhenthenodeishung/evitedviarebootinthemiddleofthehour.OSwatcherdidawonderfuljobofmakingthedatacollectionuniform
withuniformcollectionintervals.ClusterHealthMonitorextendsOSwatcherbyensuringitisalwaysscheduledandcollectsdatapointswhileprovidingaclientGUItoviewcurrentload.
Withthisnewtoolweneedtobuyanewdisplaytomonitortheactivitiesoftheclusterinrealtime.
Whydothis?Becauseit’scoolyouhavefullcontrolofyourenvironmentinrealtime.
InthispostI’llshowyouhowtoinstallandconfiguretheIPDClusterMonitor.
2ServersHost(linuxOEL5)alreadywithOracleClusterware/RACinstalled.
1DesktopClient(mylaptop)tomonitortheCluster(usingGUIMode).
Let’sstart.
WhatplatformscanIruntheClusterHealthMonitor?Updated19/07/2011
The
ClusterHealthMonitorisNOTavailableforItaniumplatform(Linux,Windows,andHPItanium)onallversion.
11.2.0.1andearlier:LinuxandWindowsonly(downloadfromOTN)
11.2.0.2:Solaris(Sparcandx86-64)andLinux
11.2.0.3(tobereleased):AIX,Solaris(Sparcandx86-64),Linux,andWindows
TheClusterHealthMonitorisintegratedpartof11.2.0.2OracleGridInfrastructureforLinux(notonLinuxItanium)andSolaris(Sparc64andx86-64only),soinstalling11.2.0.2OracleGridInfrastructureonthoseplatformswillautomatically
installtheClusterHealthMonitor.AIXwillhavetheClusterHealthMonitorstartingfrom11.2.0.3.TheClusterHealthMonitorisalsoenabledforWindows(exceptWindowsItanium)in11.2.0.3.
Installation
ForOTNversionofClusterHealthMonitor,thecompletestepstoinstallthetoolisexplainedinthereadmefileshippedwiththeproductFor11.2.0.2orlaterversion,theclusterhealthmonitorisinstalledautomaticallywhenGridInfrastructure(akaCRS)isinstalled.TheresourcenameforClusterHealthMonitorisora.crfthatismanagedbyohasd.
WherecanIgetlatestcopyofClusterHealthMonitor?
TheClusterHealthMonitorisintegratedpartof11.2.0.2OracleGridInfrastructureforLinux(notonLinuxItanium)andSolaris(Sparc64andx86-64only),soinstalling11.2.0.2OracleGridInfrastructureonthoseplatformswillautomatically
installtheClusterHealthMonitor.AIXwillhavetheClusterHealthMonitorstartingfrom11.2.0.3.TheClusterHealthMonitorisalsoenabledforWindows(exceptWindowsItanium)in11.2.0.3.
Priorto11.2.0.2onLinuxandpriorto11.2.0.3WindowsexcludingItaniumplatform,theClusterHealthMonitorcanbedownloadedfromOTN.
Important:GUI
Mode(AvailableonlywithOTNversion)toversion11.2.0.1.GUIModeisnotavaliableto11.2.0.2
Onlinemodecanbeusedtodetectproblemsliveontheproblemenvironment.ThedatacanbeviewedusingClusterHealthMonitorutility.TheGUIisnotinstalledonthenodesoftheserverbutcanbeinstalledonanyotherclient.
IfyouareusingOracleClusterware11.2.0.2untiltoday(09/08/2011)theGUIModeisnotavaliable.
Ifyouareusing11.2.0.1orpreviousyoumustinstallCHMonServersandClient.
I’llshowyouhowtoperformafullinstallationofCHMonserversandclient.
InstallingCHMonServersLinux
OnLinux,thetoolrequiresLinuxkernelversiongreaterthanorequalto2.6.9andarchitectureisx86.Theinstallwillworkonx86_64aswellifthekernelisconfiguredtorun32-bitbinaries.
1.InLinux,createuser‘:’(e.g.crfuser:oinstall)onallthenodeswheretoolisbeinginstalled.Makesureusername’shomeisthesameonallnodes.Typically,onmostsystems,youwillissue:
Onallnodes:
1 | useradd -d /opt/crfuser-s/bin/sh-goinstallcrfuser |
2 | passwd crfuser |
3 | Changing password for user crfuser. |
4 | New UNIXpassword: |
5 | BAD PASSWORD:itisbasedonadictionaryword |
6 | Retype newUNIXpassword: |
7 | passwd : allauthenticationtokensupdatedsuccessfully. |
2.InLinux,setuppasswordlesssshfortheusercreatedinstep1.Testthatthe”cansshtoallnodes(includingthelocalnode)usinghostname(withoutdomain)withoutpasswordandwithoutanyuserinterventionlikeacknowledgingprompts.
Youcanusethispost:
P.SWhenprompt:“Enterpassphrase(emptyfornopassphrase):”type[enter]don’tcreatepassphrase.
TheCHMhaveyourowndatabase.So,youmustspecifythelocationofdatabaseofCHMtostoreOSmetrics.
ThislocationMUSTbeoutsideofthelocationwhereyouunzippedtheZIPfilebecauseallthedirectoriesunderthatlocationwhichwerecreatedbyunzipwillberemoved.
BDBfilescanbekeptasitisforlaterusage.Thelocationshouldbeapathonavolumewithatleast2GBpernodespaceavailableandwritablebyprivilegeduseronly.
ItcannotbeonrootfilesysteminLinux.Thislocationisrequiredtobesameonallhosts.
ThepathMUSTnotbeonshareddisk.IfasharedBDBpathisprovidedtomultiplehosts,BDBcorruptionwillhappen.
Icreateanewdiskof5GBoneachserverandcreateannewVGonLinuxtoStoreDBofCHM.
1 | /dev/mapper/VG_ORACRFDB-LV_ORACRFDB |
2 | 4.9G 334M4.1G7%/opt/oracrfdb/db |
Unzipthecrfpack.zipfile.
01 | cd /opt/crfuser/ install / |
02 | $ ls |
03 | crfpack-linux.zip |
04 | $ unzipcrfpack-linux.zip |
05 | Archive: crfpack-linux.zip |
06 | creating: admin/ |
07 | creating: admin/run/ |
08 | .... |
09 | creating: log/ |
10 | creating: mesg/ |
01 | $ cd /opt/crfuser/ install / install / |
02 | $ ./crfinst.pl-ialemanha,holanda-b/opt/oracrfdb/db-malemanha |
03 |
04 | Performing checksonnodes: "alemanha holanda" ... |
05 | /opt/crfuser/ install doesn't existonholanda,creatingit... |
06 | Assigning holandaasreplica |
07 |
08 | Generating clusterwideconfiguration file ... |
09 |
10 | Creating abundle for remote nodes... |
11 |
12 | Installing onnodes "holanda alemanha" ... |
13 |
14 | Configuration completeonnodes "holanda alemanha" ... |
15 |
16 | Please run"/opt/crfuser/ install / install /crfinst.pl -f,optionallyspecifyingBDBlocationwith-basrootoneachnodetocompletethe install process. |
17 |
18 | $ su - |
01 | # /opt/crfuser/install/install/crfinst.pl-f |
02 | Removing contentsofBDBDirectory/opt/oracrfdb/db |
03 |
04 | Installation completedsuccessfullyat/usr/lib/oracrf... |
05 |
06 | # sshholanda |
07 | root@holanda's password: |
08 | Last login:TueJul1915:41:022011fromalemanha.partnerit.com.br |
09 | [root@holanda ~] # /opt/crfuser/install/install/crfinst.pl-f |
10 | Removing contentsofBDBDirectory/opt/oracrfdb/db |
11 |
12 | Installation completedsuccessfullyat/usr/lib/oracrf... |
thefollowingwhileloggedinasprivilegeduser:
1 | # /etc/init.d/init.crfdenable,onLinux |
DONOTbypassanyofabovestepsortryotherwaystoinstallbecausethedaemonswillnotworkcorrectly,andyouwillnotbesupported.
FinishedinstallCHMonServers.
InstallingGUIModeonWindows7x64
StandaloneUIinstallation.OraclerecommendstonotinstalltheUIontheservers.YoucanusethisoptiontoinstalltheUI-onlyclientonaseparatemachineoutsideofcluster.
WemusthaveperlinstalledontheDesktopClienttoinstalltheGUIModeinWindows.
WenotneedtoinstallperlinWindows.WecanusetheperlinstalledonOracleClient.(ifyouinstalledOracleClientonyourdestkop..ofcourse!!!).
AsIhaveinstalledOracleClientonmyDestop,IwillusetheperlofinstallationofOracleClient.
1.DownloadCHMfromOTNforWindows.
2.Unzipthecrfpack.zipfile
3.InstallCHMGUIModeonC:\oracle\product\crf
1 | # UsingCMDpromptonWindows |
2 | c:\> cd C:\Users\Levi\Downloads\crfpack-winnt\ install |
3 | \> c:\oracle\product\11.2.0\client_1\perl\bin\perl.execrfinst.pl-gc:\oracle\product\crf |
4 | Installation completedsuccessfullyatc:\\oracle\\product\\crf... |
Changethis:
1 | ... |
2 | set PERL=perl.exe |
3 | ... |
1 | set PERL=C:\oracle\product\11.2.0\client_1\perl\bin\perl.exe |
1 | C:\oracle\product\crf\bin>crfgui.bat -m192.168.217.10 |
2 | Cluster HealthAnalyzerV1.10 |
3 | Look for Loggerd vianodealemanha |
4 | ...Connected |
5 | Note: |
6 | Cluster 'MyCluster' , time =2011-07-19 23:12:58 |
7 | Making "MyCluster" (View |
InsidetheGUI,youcanuse‘node‘commandtoopenaviewwhichgivesmoredetailedinformationaboutanodeinaNodeView.Alternatively,youcandoubleclickanodetogettheNodeView.
ANodeViewpresentsthedetailedstatisticsoninterestingprocesses,disksandNICsbasedonheuristics.
ClickonHostHolanda…
ClickonHostAlemanha..
OnecandrilldownthedetailsonpartitionsforthediskslistedinNodeViewbydoubleclickingthedisk.TheinformationispresentedintheDiskView.
TheDiskViewprovidesadetailedlistofpartitionsandcorrespondingstatsforeachoneofthem.ItalsoclearlymarkspartitionswhicharefoundtobelongtocertaincategorieslikeVoting/OCR/SWAP/ASMdisks.
BothClusterViewandNodeViewshowtextalertsatthebottom.Thesealertsaregeneratedwhenthesampledvalueofaresourcemetriceithergoesaboveorfallsbelowathresholdthatcouldleadtopotentialproblemsonthenodeand
henceonthecluster.
Youcancheckproblemofnetworkprivate(interconnect)onS.Olevelforexample:
LATENCY(ms)andotherthingsaremonitored.
ThedefaultrefreshrateoftheGUIis1second.Tochangetherefreshrate,use-rwithnumberofseconds(i.e.-r5fora5secondrefreshrate)
C:\oracle\product\crf\bin>crfgui.bat-r5-m192.168.217.10
HistoricalMode
InvokingtheGUIwith‘-d’optionstartsitinhistoricalmode.
C:\oracle\product\crf\bin>crfgui.bat-d“hh:mm:ss”-m192.168.217.10
where-disusedtospecifyhours(),minutes()andseconds()inthepastfromthecurrenttimetostarttheGUIfrome.g.crfgui-d“05:10:00″startstheGUIanddisplaysinformationfromthedatabasewhichis5hoursand
10minutesinthepastfromthecurrenttime.
InvokingtheGUIwith‘-i’optionprovidesthesameshellatthecommandpromptasisseenintheGUIwindowswithapromptof‘toprac>’.Youcanuse‘?’atthisprompttogetdetailedinformationaboutavailablecommandsandoptions.
Enjoy
相关文章推荐
- How to monitor Nginx web server from the command line in real time
- Implementing Virtual Mode with Just-In-Time Data Loading in the Windows Forms DataGridView Control
- NetHogs - Monitor Per Process Network Bandwidth Usage in Real Time
- Realtime Update of the resources in Ogre App
- [译]Time Series Forecasting with the Long Short-Term Memory Network in Python
- Spinlock annotations merged from the realtime tree to Linux mainline in 2.6.33
- Oracle Cluster Health Monitor(CHM)
- Real Time Interactive IP LAN Monitoring with IPTraf Tool
- Real Time UML : Advances in the UML for Real-Time Systems (3rd Edition)
- 11gR2 新特性:Oracle Cluster Health Monitor(CHM)简介
- 11gR2 新特性:Oracle Cluster Health Monitor(CHM)简介
- Run-time datasource selection with JCA adapters in the Oracle Service Bus 11g
- CRS-2409:The clock on host is not synchronous with the mean cluster time
- ID 1380492.1 Monitoring SQL statements with Real-Time SQL Monitoring
- DataStage job monitor fails with out of memory error in the javacore file
- Enable the real-time apply in 10G
- Monitoring SQL Statements with Real-Time SQL Monitoring (文档 ID 1380492.1)
- Advancing The Realtime Web With RethinkDB
- Real-Time SQL Monitoring using DBMS_SQLTUNE (REPORT_SQL_MONITOR, REPORT_SQL_MONITOR_LIST and REPORT_
- 如何安装独立版的CHM(Oracle Cluster Health Monitor)