©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

Oracle 12c Enterprise Manager Cloud Control Installation - page 4

STEP 12. Installation progress.

Prev< 1 2 3 4 5 6 7 8 >Next

STEP 13. Run the root script from a separate command prompt.


root@s111oem:/oem/app/oraem/middleware/oms# ./allroot.sh

-e

Starting to execute allroot.sh .........


Starting to execute /oem/app/oraem/middleware/oms/root.sh ......

Running Oracle 11g root.sh script...


The following environment variables are set as:

    ORACLE_OWNER= oraem

    ORACLE_HOME=  /oem/app/oraem/middleware/oms


Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]:

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]:

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]:



Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

/var/opt/oracle exist


Creating /var/opt/oracle/oragchomelist file...

/oem/app/oraem/middleware/oms

Finished execution of  /oem/app/oraem/middleware/oms/root.sh ......



Starting to execute /oem/app/oraem/agent12c/core/12.1.0.4.0/root.sh ......

Finished product-specific root actions.

/var/opt/oracle exist

Finished execution of  /oem/app/oraem/agent12c/core/12.1.0.4.0/root.sh ......

root@s111oem:/oem/app/oraem/middleware/oms#

STEP 14. Finish.

COMMANDS TO START AND STOP


TO START OMS

$MIDDLEWARE_HOME/oms/bin/emctl start oms

NOTE: You need to start the OMR database first before you start the OMS.


TO STOP OMS

$MIDDLEWARE_HOME/oms/bin/emctl stop oms -all


TO CHECK OMS STATUS

$MIDDLEWARE_HOME/oms/bin/emctl status oms



TO START AGENT

$AGENT_BASE/agent_inst/bin/emctl start agent


TO STOP AGENT

$AGENT_BASE/agent_inst/bin/emctl stop agent


TO CHECK AGENT STATUS

$AGENT_BASE/agent_inst/bin/emctl status agent




LIST OF emctl COMMANDS FOR OMS


emctl [getversion] oms

Gets the version of the Management Service. Sample output is as follows:


./emctl getversion oms

Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0  

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.

Enterprise Manager 12c OMS Version 12.1.0.1.0


emctl [start] oms

 Starts the Management Service.


emctl stop oms -all

 Stops the Management Service including Administration Server, HTTP Server, Node Manager, and management server.


emctl stop oms -all -force and emctl stop oms -force

-force can be used with both emctl stop oms -all and emctl stop oms.

If the emctl stop oms commands do not shutdown the relevant processes, using -force option will forcefully stop the relevant processes.


emctl status oms

 Lists the status of the Management Service


emctl status oms -details

Lists Management Service details such as port numbers, lock status, domain information, and so on.


emctl config oms -list_repos_details

Lists the Management Service repository details.


emctl config oms -store_repos_details [-repos_host <host> -repos_port <port> -repos_sid <sid> | -repos_conndesc <connect descriptor> ] -repos_user <username> [-repos_pwd <pwd>]

 Configures the settings used by Management Service to connect to the Management Repository.


emctl config oms -change_repos_pwd [-old_pwd <old_pwd>] [-new_pwd <new_pwd>] [-use_sys_pwd [-sys_pwd <sys_pwd>]]

 Configures the password used by Management Service to connect to the Management schema in the Management Repository.


emctl config oms -change_view_user_pwd [-sysman_pwd <sysman_pwd>] [-user_pwd <user_pwd>] [-auto_generate]

 Configures the password used by Management Service for MGMT_VIEW user that is used for report generation.


emctl upload

Uploads xml files that are pending to upload to the OMS under the upload directory.




LIST OF emctl COMMANDS FOR AGENT


emctl start | stop agent

Starts or stops agent.


emctl status agent

Lists the status of agent.


emctl status agent -secure

Lists the secure status of the agent and the port on which the agent is running in secure mode and also the OMS security status of the agent it points to. This command also gives the OMS secure port. Below is an example output:


bash-3.00$ emctl status agent -secure

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.


Checking the security status of the Agent at location set in /ade/example_username_cpap4_ag/oracle/sysman/config/emd.properties...  Done.


Agent is secure at HTTPS Port 1838.


Checking the security status of the OMS at http://example.us.oracle.com:7654/em/upload/...  Done.


OMS is secure on HTTPS Port 4473


bash-3.00$


emctl status agent scheduler

Lists all Running, Ready, and Scheduled Collection threads.


emctl status agent jobs

Lists the status of the jobs that are running at present on the agent.


emctl status agent target <target name>,<target type>,<metric>

Lists the detailed status of the specified targets in the order of target name, target type. The following is an example of an oracle_database target. You can also provide a particular metric name in the emctl command to get the status of a particular metric of a target.


bash-3.00$ emctl status agent target database,oracle_database

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.


-------------------------------------------------


Target Name : database


Target Type : oracle_database


Current severity state


----------------------


Metric        Column name      Key    State   Timestamp          


-------------------------------------------------

DeferredTrans errortrans_count  n/a CLEAR 2011-07-09 02:38:07

DeferredTrans deftrans_count    n/a   CLEAR 2011-07-09 02:38:07

ha_recovery missing_media_files n/a   CLEAR 2011-07-09 02:28:57

ha_recovery corrupt_data_blocks n/a  CLEAR 2011-07-09 02:28:57

ha_recovery datafiles_need_recovery n/a CLEAR 2011-07-09 02:28:57

Response     Status        n/a     CLEAR  2011-07-09 02:38:04

Response userLogon         n/a CLEAR  2011-07-09 02:38:04

Response    State          n/a  CLEAR  2011-07-09 02:38:04

OCMInstrumentation  NeedToInstrument n/a CLEAR 2011-07-09 02:31:55

health_check  Status  n/a  CLEAR   2011-07-09 02:40:00

health_check  Unmounted  n/a  CLEAR  2011-07-09 02:40:00

health_check   Mounted  n/a CLEAR  2011-07-09 02:40:00

health_check Unavailable  n/a  CLEAR  2011-07-09 02:40:00

health_check Maintenance n/a  CLEAR  2011-07-09 02:40:00

sql_response       time  n/a  CLEAR  2011-07-09 02:38:50

sga_pool_wastage java_free_pct n/a  CLEAR  2011-07-09 02:28:


58

UserAudit username DBSNMP_example  CLEAR 2011-07-09 02:32:48


-------------------------------------------------------


Agent is Running and Ready


emctl status agent mcache <target name>,<target type>,<metric>

Lists the names of the metrics for which the values are present in the metric cache. See the following example for a simple host target:


bash-3.00$ emctl status agent mcache example.us.oracle.com,host

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.


-------------------------------------------------------

Metric cache contains value for following metrics at 2011-07-09 02:54:47


CPUUsage


DiskActivity


FileMonitoring


LPAR Performance on AIX


Load


Network


PagingActivity


-------------------------------------------------------


Agent is Running and Ready


The metrics listed above are the ones whose values are present in the metric cache.


emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]...

 


Recomputes the dynamic properties of a target and generates the dynamic properties for the target.Sample output for oracle_database is as follows:


bash-3.00$ emctl reload agent dynamicproperties database:oracle_database

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.


-------------------------------------------------------


EMD recompute dynprops completed successfully


emctl pingOMS [agent]

Pings the OMS to check if the agent is able to connect to the OMS. Agent will wait for the reverse ping from the OMS so that agent can say the pingOMS is successful.


emctl config agent getTZ

Gets the current timezone set in the environment.


emctl config agent getSupportedTZ

Prints the supported timezone based on the setting in the environment.


emctl config console <fileloc> [<EM loc>]

Allows you to configure the console based on the configuration entries that you have mentioned in the file <fileloc>.

<EM loc> is optional and can be used to operate on a different Oracle Home.


emctl config [agent] listtargets [<EM loc>]

Lists all targets present in targets.xml.

<EM loc> is optional and can be used to operate on a different Oracle Home.


emctl control agent runCollection <target_name>:<target_type> <metric_name>

Allows to manually run the collections for a particular metric of a target. Sample output is as follows:


emctl control agent runCollection example.us.oracle.com:host CPUUsage

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.


-------------------------------------------------------


EMD runCollection completed successfully


emctl getcurdir agent

Prints the current working directory you are in (pwd).


emctl resetTZ agent

Resets the timezone of the agent. Stop the agent first and then run this command to change the current timezone to a different timezone. Then start the agent.


emctl getversion agent

Prints the version of the agent. Sample output is as follows:


./emctl getversion agent

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.

Oracle Enterprise Manager 12c Release 1 Cloud Control Agent 12.1.0.1.0


emctl dumpstate agent <component> . . .

Generates the dumps for the agent. This command allow you to analyze the memory/cpu issues of the agent. Sample output is as follows:


./emctl dumpstate agent

Oracle Enterprise Manager 12c Release 1 Cloud Control 12.1.0.1.0.

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.

Dumpstate succeeded


emctl gensudoprops

Generates the sudo properties of the agent.


emctl clearsudoprops

Clears the sudo properties.


emctl clearstate

Clears the state directory contents. The files that are located under $ORACLE_HOME/sysman/emd/state will be deleted if this command is run. The state files are the files which are ready for the agent to convert them into corresponding xml files.


emctl getemhome

Prints the agent home directory. The sample output is as follows:


emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]

 Starts blackout on a target.

<Target_name:Target_type> defaults to local node target if not specified.If -nodeLevel is specified after <Blackoutname>,the blackout will be applied to all targets and any target list that follows will be ignored.Duration is specified in [days] hh:mm


emctl stop blackout <Blackoutname>

 Stops the blackout that was started on a particular target. Only those blackouts that are started by the emctl tool can be stopped using emctl. This command cannot stop the blackouts that are started using the Console or emcli.


emctl status blackout [<Target_name>[:<Target_Type>]]....

Provides the status of the blackout of the target. The status includes the type of blackout, whether one time, repeating, or a scheduled blackout. This command also specifies whether the blackout has started or stopped.


emctl secure agent [registration password]

 Secures the agent against an OMS. The registration password must be provided.


emctl unsecure agent

 Unsecures the agent. This will make the agent unsecure and the agent's port will be changed to http port.


emctl verifykey

Verifies the communication between the OMS and agent by sending pingOMS.


emctl deploy agent [-s <install-password>] [-o <omshostname:consoleSrvPort>] [-S] <deploy-dir> <deploy-hostname>:<port> <source-hostname>

 

'agent' creates and deploys only the agent.


[-s <password>]: Install password for securing agent.


[-S ]: Password will be provided in STDIN.


[-o <omshostname:consoleSrvPort>]: The OMS Hostname and console servlet port. Choose the unsecured port.


<deploy-dir> : Directory to create the shared (state-only) installation port.


<deploy-hostname:port> : Host name and port of the shared (state-only) installation. Choose unused port.


<source-hostname>: The host name of the source install. Typically the machine where EM is installed. This is searched and replaced in targets.xml by the host name provided in argument <deploy-hostname:port>.


<sid>: The instance of the remote database. Only specified when deploying "dbconsole".



About emctl.log File


The emctl.log file is a file that captures the results of all emctl commands you run. For Management Agent, the log file resides in the $AGENT_INSTANCE_HOME/sysman/log directory of the Management Agent, and for Management Service, the log file resides in the $OMS_INSTANCE_HOME/sysman/log directory. The file is updated every time you run an emctl command. If your emctl command fails for some reason, access this log file to diagnose the issue.


For example, run the following command from the Oracle home directory of the Management Agent to check its status:


<agent_home>emctl status agent


After running the command, navigate to the log directory to view the following information in the emctl.log file:


1114306 :: Wed Jun 10 02:29:36 2011::AgentLifeCycle.pm: Processing status agent

1114306 :: Wed Jun 10 02:29:36 2011::AgentStatus.pm:Processing status agent

1114306 :: Wed Jun 10 02:29:37 2011::AgentStatus.pm:emdctl status returned 3


Here, the first column, that is, 1114306, is the PID that was used to check the status. The second column shows the date and time when the command was run. The third column mentions the Perl script that was run for the command. The last column describes the result of the command, where it shows the progress made by the command and the exit code returned for the command. In this case, the exit code is 3, which means that the Management Agent is up and running.


Similarly, for the Management Service, you can run the following command from the Oracle home directory of the Management Service to check its status:


<agent_home>emctl status oms


In another example, run the following command from the Oracle home directory of the Management Agent to upload data:


<agent_home>emctl upload agent


After running the command, navigate to the log directory to view the following information in the emctl.log file:


1286220 :: Tue Jun  9 07:13:09 2011::AgentStatus.pm:Processing upload

1286220 :: Tue Jun  9 07:13:10 2011::AgentStatus.pm:emdctl status agent returned 3

1286220 :: Tue Jun  9 07:13:41 2011::AgentStatus.pm: emdctl upload returned with exit code 6


Here, the entries are similar to the entries in the first example, but the exit code returned is 6, which means the upload operation is failing for some reason.


The exit codes returned depend on the emctl command executed. In general, exit code of zero means success and any exit code other than zero means failure. For details about the cause of failure, view the error message.