Enterprise Manager EMCTL Agent

Enterprise Manager Cloud Control Agent ($AGENT_HOME)

For example:

AGENT_HOME=/usr/oracle/emagent/core/12.1.0.4.0

Start Agent

To start the agent:

$AGENT_HOME/bin/emctl start agent

Stop Agent

To stop the agent:

$AGENT_HOME/bin/emctl stop agent

Agent Status

To get the current status of the agent

$AGENT_HOME/bin/emctl status agent

Example output:

oracle@server2$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /usr/oracle/emagent/agent_inst
Agent Log Directory    : /usr/oracle/agent_inst/sysman/log
Agent Binaries         : /usr/oracle/emagent/core/12.1.0.4.0
Agent Process ID       : 26335
Parent Process ID      : 25925
Agent URL              : https://server2.juliandyke.com:3872/emd/main/
Local Agent URL in NAT : https://server2.juliandyke.com:3872/emd/main/
Repository URL         : https://server1.juliandyke.com:4903/empbs/upload
Started at             : 2015-05-26 18:01:25
Started by user        : oracle
Operating System       : Linux version 2.6.32-504.16.2.el6.x86_64 (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-06-03 09:52:44
Last attempted upload                        : 2015-06-03 09:52:44
Total Megabytes of XML files uploaded so far : 8.87
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 55.27%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-06-03 09:59:00
Last successful heartbeat to OMS             : 2015-06-03 09:59:00
Next scheduled heartbeat to OMS              : 2015-06-03 10:00:00

---------------------------------------------------------------
Agent is Running and Ready

If the agent is not running then the output is as follows:

oracle@server2$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent is Not Running

Agent Version

To check the current version of the agent use getversion. For example:

$AGENT_HOME/bin/emctl getversion agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
   Oracle Enterprise Manager Cloud Control Agent 12c Release 4

Agent Home

To check the current home directory for the agent use getemhome. For example:

$AGENT_HOME/bin/emctl getemhome
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
EMHOME=/u01/oracle/em/agent_inst

Reload Agent

To reload the agent (restart with an updated configuration) use:

$AGENT_HOME/bin/emctl reload agent

For example:

$AGENT_HOME/bin/emctl reload agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
--------------------------------------------------------------
EMD reload completed successfully

Upload Data

To upload collected metric data from the agent to the OMS use:

$AGENT_HOME/bin/emctl upload agent

For example:

$AGENT_HOME/bin/emctl upload agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
--------------------------------------------------------------
EMD upload completed successfully

Plug-Ins

To list plug-ins excluding discovery plug-ins:

[oracle@server1]$ $AGENT_HOME/bin/emctl listplugins agent 
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
oracle.sysman.oh    12.1.0.4.0   /u01/oracle/emagent/plugins/oracle.sysman.oh.agent.plugin_12.1.0.4.0
oracle.sysman.db    12.1.0.6.0   /u01/oracle/emagent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0

To list all installed plug-ins including discovery plug-ins:

[oracle@server1]$ $AGENT_HOME/bin/emctl listplugins agent -type all
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
oracle.sysman.oh    12.1.0.4.0   /u01/oracle/emagent/plugins/oracle.sysman.oh.agent.plugin_12.1.0.4.0
oracle.sysman.db    12.1.0.6.0   /u01/oracle/emagent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0
oracle.sysman.xa    12.1.0.6.0   /u01/oracle/emagent/plugins/oracle.sysman.xa.discovery.plugin_12.1.0.6.0
oracle.sysman.db    12.1.0.6.0   /u01/oracle/emagent/plugins/oracle.sysman.db.discovery.plugin_12.1.0.6.0
oracle.sysman.emas  12.1.0.6.0   /u01/oracle/emagent/plugins/oracle.sysman.emas.discovery.plugin_12.1.0.6.0
oracle.sysman.oh    12.1.0.4.0   /u01/oracle/emagent/plugins/oracle.sysman.oh.discovery.plugin_12.1.0.4.0

Agent State Dump

To dump the current state of the agent use dumpstate. For example:

$AGENT_HOME/bin/emctl upload agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Dumpstate succeeded