High Availbility

OS & Virtualization

Thursday, October 04, 2012

Oracle 11g Grid Control Command

What works? Commands

 

Set environment variables. (emctl from OMS home has to be used )

$ export ORACLE_HOME=<path to OMS installation>
$ export PATH=$ORACLE_HOME/bin:$PATH
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib


Start OMS

$ emctl start oms


This will start oms as well as the required weblogic processes. [starts opmn, HTTP_SERVER, Node Manager]


Check Status of OMS

$ emctl status oms [-details]


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

$ export ORACLE_HOME=/u01/app/Middleware/oms11g
$ export PATH=$ORACLE_HOME/bin:$PATH
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib


gridcontrol:/u01/app/Middleware/oms11g []$ cd bin
gridcontrol:/u01/app/Middleware/oms11g/bin []$ ./emctl status oms
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up


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


The "details" option is very informative. It will ask for Sysman password.


gridcontrol:/u01/app/Middleware/oms11g/bin []$ ./emctl status oms -details
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : bnair.localdomain
HTTP Console Port   : 7788
HTTPS Console Port  : 7799
HTTP Upload Port    : 4889
HTTPS Upload Port   : 4900
SLB or virtual hostname: bnair.localdomain
Agent Upload is unlocked.
OMS Console is unlocked.
Active CA ID: 1


Stop OMS

$ emctl stop oms [-all]


Using the "all" option stop node manager and Admin Server as well.


List OMS

$ emctl list oms


This provides the oms name configured in the local ORACLE_HOME. A "*" is displayed next to OMS name if admin server is configured on the same host.


What "also" works?

Though opmnctl cannot be used to start oms, you can still use opmnctl to start | stop | check status of HTTP Server components.


$export ORACLE_INSTANCE=/u01/gc_inst/WebTierIH1
$ cd $ORACLE_INSTANCE/bin
gridcontrol:/u01/gc_inst/WebTierIH1/bin []$ ./opmnctl status
Processes in Instance: instance1
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
ohs1                             | OHS                |    3962 | Alive


Log file locations


OMS Application logs:  <EM_INSTANCE_HOME>/sysman/log
OPMN logs:                   <Webtier Instance Home>/diagnostics/logs/OPMN/opmn
HTTP Server:                 <Webtier Instance Home>/diagnostics/logs/OHS/ohs1


Directory Structure






The diagram shows the locations related to oms, agents and webtier only.
(Based on more detailed diagram available at oracle support).

No comments: