High Availbility

OS & Virtualization

Showing posts with label gridcontrol. Show all posts
Showing posts with label gridcontrol. Show all posts

Tuesday, November 27, 2012

DB Control Not Starting due to Incorrect Timezone


Cause
The Agent does not start because of incorrect time zone.
Solution
  1. check ORACLE_HOME/sysman/admin/supportedtzs.lst and ORACLE_HOME/sysman/admin/nsupportedtzs.lst for a correct value on TZ
  2. Comment the line AgentTZRegion="<some value>" in
    ORACLE_HOME/<hostname>_<SID>/sysman/config/emd.properties
  3. export TZ=<chosen time zone from step 1>
  4. emctl config agent getTZ
  5. emctl config agent updateTZ
  6. emctl start dbconsole

Note: on 11.1 and higher DB Console, it is enough to run "emctl resettz agent" and then follow the instructions in the output (ie. running th mgmt_target.set_agent_tzrgn procedure) to change or set the correct timezone on the DB Console.

 


Thursday, November 15, 2012

Manually trigger metric collection in Grid Control

Metric Collection errors are generally down to the following reasons:
  • Configuration Error as described above
  • Temporary Collection Errors
  • Oracle Bugs 
Reevaluating Metric Collections
If you are running a Management Agent Release 10.2, then you can use the following command to perform an immediate reevaluation of a metric collection:
emctl control agent runCollection <targetName>:<targetType> <colletionItemName>
emctl control agent runCollection testdb.us.oracle.com:oracle_database oracle_dbconfig
  1. Run "emctl config agent listtargets" to list all the targets in the agent
  2. Run "emctl control agent runCollection"
  3. Eg : To manually upgrade mgmt$tablespaces

    emctl control agent runCollection testdb.us.oracle.com:oracle_database oracle_dbconfig


Checking scheduler status
> emctl status agent scheduler

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).

Friday, November 23, 2007

User Defined Metrics

Oracle Enterprise Manager 10g

You can monitor a OS process using Oracle Enterprise Manager. Here are the steps which I use to monitor the memory usage on a Linux box.


Steps


  1. write a script eg "getmem.sh"

  2. export em_result = `freegrep Memawk {'print $3'}`
    echo em_result=$em_result

  3. Login to Grid Control > Targets > > User-Defined Metrics

  4. Create an User Defined Metric to run the shell script.

Note : you need to use "em_result=....." where em_result is the keyword.