Monday, April 22, 2013

Oracle Enterprise Manager 12c : Managing Components

Managing 12 C Components

The emctl utility can be used to start, stop, and manage security for the Enterprise Manager Web site

Start/Stop Management Agent
cd /software/oem/oms/agent_inst/bin
./emctl stop agent (Stop Agent)

cd /software/oem/oms/agent_inst/bin
./emctl start agent (Start Agent)

Start/Stop Management Service

There are two ways to start/stop Management Service
a) Using emctl
cd /software/oem/oem/oms/bin
./emctl stop oms (Stop Management Service)

cd $OMS_HOME/bin
./emctl start oms (Start Management Service)

Using opmn (Oracle® Process Manager and Notification Server)

One method of starting and stopping the Management Service by using the Oracle Process Management and Notification (OPMN) utility. The OPMN utility (opmnctl) is a standard command used to start and stop components of the Oracle Application Server instance.

OPMN is installed and configured with every Oracle Application Server installation type and is essential for running Oracle Application Server.

OPMN features the following functionality:

Provides a command-line interface for process control and monitoring for single or multiple Oracle Application Server components and instances.

Provides an integrated way to manage Oracle Application Server components.

Enables management of Oracle Application Server subcomponents and sub-subcomponents.

Channels all events from different Oracle Application Server component instances to all Oracle Application Server components that can utilize them.

Solves interdependency issues between Oracle Application Server components by enabling you to start and stop components in order.

Enables customizing of enterprise functionality by using event scripts.

Enables gathering of host and Oracle Application Server process statistics and tasks.

Provides automatic restart of Oracle Application Server processes when they become unresponsive, terminate unexpectedly, or become unreachable as determined by ping and notification operations.

Provides automatic death detection of Oracle Application Server processes.

The Management Service is a J2EE application running in an Oracle Application Server Containers for J2EE (OC4J) instance within the application server. As a result, the following command will start all the components of the Oracle Application Server instance, including the OC4J_EM instance and the Management Service application:

cd /software/oem/oem/Oracle_WT/opmn/bin
./opmnctl startall

Similarly, the following command will stop all the components of the Oracle Application Server instance:

cd /software/oem/oem/Oracle_WT/opmn/bin
./opmnctl stopall

cd /software/oem/oem/Oracle_WT/opmn/bin
./opmnctl status

Processes in Instance: instance1
ias-component | process-type | pid | status
ohs1 | OHS | 18489 | Alive

Find Communication Of Agent with the OEM , Verifies that the ssl handshake succeeds with the agent key.

xxxxx:dwls999-bin $ ./emctl status agent verify
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
verifykey: Successfully Completed communication with agent

Verify DB Connections
xxxxx:dwls999-bin $ ./emctl status agent dbconnections
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
DBConnection Cache contents as of: Wed Mar 13 23:53:55 CDT 2013
Agent is Running and Ready

Ping OMS From Agent
omhq1413:dwls999-bin $ ./emctl pingOMS
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
EMD pingOMS completed successfully

Stop All 
root@someThing-bin $ ./emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down

Stops all the OMS , Weblogic Server, Oracle Web Tier e.t.c

Find The Given Properties
Dev:omhq188e:dwls999-bin $ ./emctl list properties
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
SYSMAN password: (asks For the Password)
Property Details
Management Server :
Module = EMOMS

The Enterprise Manager Command Line Interface (EM CLI) enables you to access Enterprise Manager Cloud Control functionality from text-based consoles (shells and command windows) for a variety of operating systems

Using EM CLI, you can perform Enterprise Manager Cloud Control console-based operations, such as monitoring and managing targets, jobs, groups, and blackouts. EM CLI is intended for use by enterprise or system administrators writing scripts, such as shell/batch files, Perl, Tcl, or PHP, that provide workflow in the customer's business process. You can also use EM CLI commands interactively from an operating system console

root@someThing-bin $ ./emcli
Summary of commands:

argfile -- execute emcli verbs from a file
help -- get help for emcli verbs (Usage: emcli help [<verb_name>])
login -- login to the EM Management Server (OMS)
logout -- logout from the EM Management Server (OMS)
setup -- setup emcli to work with an EM
status -- list emcli configuration details
sync -- synchronize with the EM (OMS)
version -- list emcli verb versions or the emcli client version
Dev:omhq188e:dwls999-bin $ ./emcli statuc
Error: The command name "statuc" is not a recognized command.
Run the "help" command for a list of recognized commands.
You may also need to run the "sync" command to synchronize with the current OMS.
Dev:omhq188e:dwls999-bin $ ./emcli status
Oracle Enterprise Manager Cloud Control 12c Release 2.
Copyright (c) 1996, 2012 Oracle Corporation and/or its affiliates. All rights reserved.

Instance Home : /software/oem/manager/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli
Verb Jars Home : /software/oem/manager//gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli
Status : Configured
EMCLI Home : /software/oem/manager/oms/bin/.
EMCLI Version :
Java Home : /software/oem/manager/jdk16/jdk/jre
Java Version : 1.6.0_24
Log file : /software/oem/manager/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/.emcli.log
EM user : SYSMAN
Auto login : false
Trust all certificates : true

root@someThing: ./emcli login -username=sysman -password=xxxxxx
login Successfull

root@someThing $ ./emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /software/oem/manager/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/agent.log
About to access self-update code path to retrieve the platforms list..
Getting Platforms list ...
Version =
Platform = Linux x86-64
Platforms list displayed successfully.

root@someThing $ ./emcli logout
Logout successful

Read More

Oracle Enterprise Manager 12C : More Details

OMS Start Up

When you start the Management Service, the following services are started:

OPMN process. This is the watchdog for the Apache process. The OPMN process starts the Apache process if it crashes.

Apache processes to start the HTTP server

Node Manager Java process. This is the watchdog for the Managed Server and Admin Server processes. It restarts the Managed Server and Admin Server processes if they crash.

Admin Server Java process (if the command to start OMS is executed on the first OMS machine). This is the WebLogic Server instance that maintains configuration data for configured Enterprise Manager domain.

Managed Server Java process. This is the Managed WebLogic Server on which Enterprise Manager application is deployed.

Logging Details

emctl log file 

Managed Server log files 

OMS log files
(In an environment with multiple OMS instances, <n> refers to the number of the OMS in the environment.)

Node Manager log files

Admin Server log files

WebTier Service Fails to Start
Check logs under <WebTier Instance Home>/diagnostics folder in case WebTier start fails.

To Verify Plugin Installation 
Verify if all the plug-ins were installed successfully. To do so, access the following log file from the Management Agent home, and search for the sentence WARN:Plugin configuration has failed.


Read More

Oracle Enterprise Manager 12C : Agent Installation

Oracle Management Agent (Management Agent) is one of the core components of Enterprise Manager Cloud Control that enables you to convert an unmanaged host to a managed host in the Enterprise Manager system. The Management Agent works in conjunction with the plug-ins to monitor the targets running on that managed host.

Download the “” file and unzip it to a Specific Location.The Agent File can be found at

/software/oem/manager/oms/sysman on the Main Oms Installation.

Before Installing the Agent , make sure you get all the Details Needed

root@someThing-bin $ ./emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host :
HTTP Console Port : 7790
HTTPS Console Port : 7803
HTTP Upload Port : 4890
HTTPS Upload Port : 4904
EM Instance Home : /software/oem/manager/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /software/oem/manager/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL:
Upload URL:

WLS Domain Information
Domain Name : GCDomain
Admin Server Host:

Managed Server Information
Managed Server Instance Name: EMGC_OMS1
Managed Server Instance Host:
WebTier is Up
Oracle Management Server is Up

Once you Unzip the “” file ,we can see agent.rsp file

Change the agent.rsp file with details
EM_UPLOAD_PORT=4890 <Depends on You >
#AGENT_INSTANCE_HOME=<Value Unspecified>
#AGENT_PORT=<Value Unspecified>
#ORACLE_HOSTNAME=<Value Unspecified>
#s_agentHomeName=<Value Unspecified>
#s_agentServiceName:<String> Sets the agent Service Name and this variable can be
# used to overrite the agent service name calculated by the install. This is
# required for only Windows.
# Example:
# s_agentServiceName = "Oracleagent12gAgent" ; default value
# s_agentServiceName = "GridAgent" ; User specified value

#Please Don't change the values of these variables
#EM_INSTALL_TYPE:<STRING> install type

Now we have Script which helps us in the Installation of Agent.
Run the like

./ AGENT_BASE_DIR=/software/oem12cagent/ RESPONSE_FILE=/software/oem12cagent/agentinstall/agent.rsp INVENTORY_LOCATION=/software/oem12cagent/oraInventory

make Sure the Inventory_location is write enabled.
Once this command is Completed , the agent is installed and Started.

To Find the Status Of the Agent
root@someThing:dwls999-bin $ ./emctl status agent

The emctl Command for agent are available in

De installing an Agent

root@someThing-bin $ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Agent Version :
OMS Version :
Protocol Version :
Agent Home : /software/oem12cagent/agent_inst
Agent Binaries : /software/oem12cagent/core/
Agent Process ID : 22060
Parent Process ID : 21971
Agent URL :
Repository URL :
Started at : 2013-03-12 15:03:33
Started by user : dwls999
Last Reload : (none)
Last successful upload : 2013-03-13 00:18:36
Last attempted upload : 2013-03-13 00:18:36
Total Megabytes of XML files uploaded so far : 0.36
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 30.09%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2013-03-13 00:21:09
Last successful heartbeat to OMS : 2013-03-13 00:21:09
Next scheduled heartbeat to OMS : 2013-03-13 00:22:09

Agent is Running and Ready

Stop the Agent

rooot@someThing-bin $ ./emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Stopping agent ..... stopped.

Run the Delete_target Command

root@someThing-bin $ ./emcli delete_target -name="" -type="oracle_emd" -delete_monitored_targets

Target "" deleted successfully

Happy learning :-)

Read More

Oracle Enterprise Manager 12C: Directory Structure

In The Thrid Series Of Oracle Enterprise Manager 12c, we see the Directory Structure

Oracle Management Service home directory
Middleware WebTier home directory
Middleware Common home directory
Oracle Management Service Instance home directory
Oracle Management Agent home directory
Oracle Management Service Plugins home
Oracle Management Agent Plugin home

The Oracle Management Service is a J2EE application that is installed and deployed using the Oracle WebLogic Server.

The Oracle Management Service is a J2EE application that is installed and deployed using the Oracle WebLogic Server.

The Env Variable Configuration Based on the Installation That Did on my PC

ORACLE_HOME/bin = The bin directory in the Management Service home contains commands used to control the components of the Cloud Control installation.
OMS_INSTANCE_HOME=This directory contains configuration files for OMS home. The default OMS_INSTANCE_HOME location is gc_inst.
OMS_INSTANCE_HOME/WebTierIH1=This directory contains WebTier instance Oracle Home corresponding to EMGC_OMS#.
OMS_INSTANCE_HOME/NodeManager = This directory contains WebLogic Node Manager properties, logs, and domain information.
OMS_INSTANCE_HOME/em = This is the OMS instance directory and contains and Enterprise Manager log files.
OMS_INSTANCE_HOME/user_projects = This directory contains EMGC_ADMINSERVER and EMGC_OMS# domains and their logs.

The Directory Structure for the Installation is as follows


Directory gc_inst is ORACLE_INSTANCE that contains OHS instance (gc_inst/WebTierIH1) and Weblogic Domain (gc_inst/user_projects)

WebLogic Server will create Domain with 1 Admin Server and 1 Managed Server as shown below WebLogic Admin Server (EMGC_ADMINSERVER) & Managed Server (EMGC_OMS1)

wlserver_10.3, logs, utils, modules : These directories contain Fusion Middleware files.
jdk16 : This directory contains JDK configuration files.
oms : This directory contains OMS configuration files. For more information, see Section 10.2.2.
plugins : This directory contains metadata plug-ins configuration files installed on the OMS.
oracle_WT : This directory contains Oracle WebTier configuration files.
oracle_common : This directory contains common files used by OMS, Oracle WebTier, and WebLogic Server directories.

Oracle Management Agent

The Oracle Management Agent is installed automatically when you install Oracle Management Service. This local instance of the Oracle Management Agent gathers management information about the targets on the Oracle Management Service host. You can then manage those targets, such as the host itself, from the Cloud Control Console.


Four Dir Structure are configured


AGENT_INSTANCE_HOME/bin= The AGENT_INSTANCE_HOME/bin directory in the Cloud Control Home contains the emctl command that controls the Oracle Management Agent for this host.
You use the following emctl commands in this directory to start and stop the Oracle Management Agent on this host:
<AGENT_INSTANCE_HOME>/bin/emctl start agent
<AGENT_INSTANCE_HOME>/bin/emctl stop agent


Read More

Oracle Enterprise Manager 12C : Installation of OEM 12C

In The Second Phase we see how to Install the OEM 12C

Installation Requirements

Let’s see the Requirements on the Hardware Side. There are 3 components to be installed
Oracle Management Service (OMS)
Oracle Management Agents (Management Agents)
Oracle Management Repository (Management Repository), since the Repository is already available we don’t deal with this.

Management Service

<1000 Targets
<100 Agents
<10 Current Sessions
>=1000 & <10,000 Targets
>=100 but <1000 Agents
>=10 but <25 Concurrent User Sessions
>=10,000 Targets
> 2 OMS
>=1000 Agents
>=25 but <=50 Concurrent User Sessions
CPU Core 2 4 8
File System 7GB 7GB 7GB

Management Agent

Stand alone Agent: 2 CPU Cores Per Host, 512MB Ram,1 GB File System.
Master Agent: 2 CPU Cores Per Host, 512MB Ram, 1 GB File System.

[root@someThing install]$ uname -a
Linux omhq188e 2.6.32-279.19.1.el6.x86_64 #1 SMP Sat Nov 24 14:35:28 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

Package, kernel and Library Requirements
1 .Oracle Management Service
Requires Packages (Specific to Red hat 6.x)
  • make-3.81
  • binutils-
  • gcc-4.1.1
  • libaio-0.3.106
  • glibc-common-2.3.4
  • libstdc++-4.1.1
  • sysstat-5.0.5
  • glibc-devel-2.5-49-i686 (This is a 32-bit package)
  • glibc-devel-2.5-49-x86_64 (This is a 64-bit package)

Check For the packages
[root@someThing install]$ yum list installed | grep make
make.x86_64 1:3.81-20.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3

[root@someThing install]$ yum list installed | grep binutils
binutils.x86_64 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3

[root@someThing install]$ yum list installed | grep gcc
gcc.x86_64 4.4.6-4.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
libgcc.i686 4.4.6-4.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
libgcc.x86_64 4.4.6-4.el6 @anaconda-RedHatEnterpriseLinux-

[root@someThing install]$ yum list installed | grep libaio
libaio.x86_64 0.3.107-10.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
libaio-devel.x86_64 0.3.107-10.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3

[root@someThing install]$ yum list installed | grep libstdc
libstdc++.i686 4.4.6-4.el6 @dev-rhel-x86_64-server-6
libstdc++.x86_64 4.4.6-4.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3

[root@someThing install]$ yum list installed | grep sysstat
sysstat.x86_64 9.0.4-20.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3

[root@someThing install]$ yum list installed | grep glibc-devel
glibc-devel.x86_64 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6

2. Oracle Management Agent
Requires Packages (Specific to Red hat 6.x)
  • make-3.81
  • binutils-
  • gcc-4.1.1
  • libaio-0.3.106
  • glibc-common-2.3.4
  • libstdc++-4.1.1
  • sysstat-5.0.5

Kernel Requirements
kernel.shmmax parameter to a value 1 byte less than 4 GB or 4294967295
kernel.shmmax : Controls the maximum shared segment size, in bytes
[root@someThing install]$ cat /proc/sys/kernel/shmmax

Library Requirements
1. Oracle Management Service
glibc-2.5-12 for Both 32bit and 64bit
Glibc features high performance and a high degree of portability (i.e., is easy to port) to both new processors and kernels. Moreover, it complies with all relevant industry standards and is also internationalized

[root@someThing install]$ yum list installed | grep glibc
glibc.i686 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6
glibc.x86_64 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6
glibc-common.x86_64 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6
glibc-devel.x86_64 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6
glibc-headers.x86_64 2.12-1.80.el6_3.6 @dev-rhel-x86_64-server-6

2. Oracle Management Service

Software needed:
1. OS: RHEL/OEL 4, 5 or 6 with packages, kernel settings and users mentioned in install doc.
2. Oracle database with parameters, tablespaces and users mentioned in install doc.
3. JDK and Weblogic server comes with 12c software (for 11g EM we need to install them separately).


[root@someThing install]$ cat /proc/meminfo
MemTotal: 32844872 kB
MemFree: 24189776 kB

We have 32GB available.


No Of Processors
[root@someThing install]$ cat /proc/cpuinfo | grep | sort -u | wc -l

No Of CPU Cores
[root@someThing install]$ grep cpu.cores /proc/cpuinfo | sort -u
cpu cores : 4

Hard disk
50GB for OMS + 15 GB for OS = 85GB

[root@someThing install]$ cat /proc/partitions
major minor #blocks name

8 0 439514302 sda
8 1 524288 sda1
8 2 438988800 sda2
253 0 2097152 dm-0
253 1 4194304 dm-1
253 2 1048576 dm-2
253 3 1048576 dm-3
253 4 52428800 dm-4
253 5 524288 dm-5
253 6 1048576 dm-6
253 7 4194304 dm-7
253 8 4194304 dm-8
253 9 131072 dm-9
253 10 131072 dm-10
253 11 4194304 dm-11
253 12 4194304 dm-12

Check The File Descriptors

[root@someThing install]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256451
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Make sure that SELINUX and firewall are disabled

Find the Run level
[root@someThing install]$ runlevel
N 3

Check Whether Iptables is Disabled
[root@someThing install]$ chkconfig --list | grep iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

Check Whether Selinux is Disabled
[root@someThing install]$ cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.

Make sure that you use unique host names and static IP addresses. Do not use Virtual IP or Virtual hostnames or SCANs.

Make sure that a physical host name is used and is fully resolvable. Make sure that all nslookup queries resolve to the same name and associated IP address.

[root@someThing install]$ nslookup omhq188e
Address: canonical name =

Installing the Oracle Enterprise Manager

1.Enter the Details for the Oracle Support ( If available )

2.Select Skip for updates

3.In the next step if checks for Pre requirements

4.Once all are checked , then
Select “Simple” under the Create a new Enterprise Manager System

5.In the next screen , enter the DB details

6.In the next screen , select “OK” if you have any Database Warnings.

There will be a couple of more screens . We can select the “OK” for all of those. In the last screen it will ask to execute few scripts as root.

Login as root and execute the scripts.

NOTE : During the last Screens it will show you the details of the installation including port no every thing. Please note them down

Happy Learning :-)

Read More