Oracle Management Cloud – Managing the Oracle Cloud Agent

This post is about some useful commands to administer the OMC’s Cloud agent. The very first step is to install the OMC Cloud agent. You may refer to my previous post on how to install it here.
The omcli command is located at /agent_inst/bin.
I’m skipping these 3 basic commands start, stop and status.
Here we go!
      List the targets currently managed by the Cloud agent
$ ./omcli config agent listtargets
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
[hostname.localdomain:1302, Lama]
[hostname.localdomain, omc_host_linux]
      Get the TimeZone of the server where the Cloud agent is running
$ ./omcli config agent getTZ
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
US/Eastern
      Get a detailed output of the Cloud agent scheduler
$ ./omcli status agent scheduler
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
—————————————————————
Number of currently running scheduled items :: 0
Number of currently ready scheduled items :: 0
Number of scheduled items :: 57
Schedule Attempts Delay Percentage :: 0.000%
Running entries::
Ready entries::
Scheduled entries::
2017-03-31 14:32:58.968 : HeapMonitorTask
2017-03-31 22:34:14.667 : PurgeTargetEvents
2017-03-31 22:35:47.885 : PurgeADR
2017-04-01 13:34:20.810 : EventStatusPurge
—————————————————————
Agent is Running and Ready
      Get a summary of the Cloud agent’s scheduler
$ ./omcli status agent scheduler -summary
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
—————————————————————
Number of currently running scheduled items :: 0
Number of currently ready scheduled items :: 0
Number of scheduled items :: 57
Schedule Attempts Delay Percentage :: 0.000%
—————————————————————
Agent is Running and Ready
      Dump the internal state of the agent [option component name]
$ ./omcli dumpstate agent
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Generated file: /u01/omc/infra/agent_inst/sysman/emd/dumps/SystemDump_1490985620656.xml
      Dump internal information of all components of the Cloud agent
$ ./omcli dumpstate agent -dump_full_state
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Generated file: /u01/omc/infra/agent_inst/sysman/emd/dumps/SystemDump_1490985775823.xml
      Add entities to the Cloud agent using JSON template
$ ./omcli add_entity agent /home/oracle/omc_weblogic.json
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Operation Succeeded: Accepted 2 of 2 entities for processing.
      Delete entities from the Cloud agent using JSON template
$ ./omcli delete_entity agent /home/oracle/omc_weblogic.json
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Request for removing the entities was accepted for processing.
This is just a small taste of all the options built into the Oracle’s Cloud agent.  For more information about all the options refer to Oracle’s documentation.
Thanks,

Alfredo