©2015 -
Oracle 12c Enterprise Manager Cloud Control Installation -
STEP 12. Installation progress.
STEP 13. Run the root script from a separate command prompt.
root@s111oem:/oem/app/oraem/middleware/oms# ./allroot.sh
-
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-
/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-
/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.
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 -
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 -
Stops the Management Service including Administration Server, HTTP Server, Node Manager, and management server.
emctl stop oms -
-
If the emctl stop oms commands do not shutdown the relevant processes, using -
emctl status oms
Lists the status of the Management Service
emctl status oms -
Lists Management Service details such as port numbers, lock status, domain information, and so on.
emctl config oms -
Lists the Management Service repository details.
emctl config oms -
Configures the settings used by Management Service to connect to the Management Repository.
emctl config oms -
Configures the password used by Management Service to connect to the Management schema in the Management Repository.
emctl config oms -
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 -
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-
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-
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-
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-
DeferredTrans deftrans_count n/a CLEAR 2011-
ha_recovery missing_media_files n/a CLEAR 2011-
ha_recovery corrupt_data_blocks n/a CLEAR 2011-
ha_recovery datafiles_need_recovery n/a CLEAR 2011-
Response Status n/a CLEAR 2011-
Response userLogon n/a CLEAR 2011-
Response State n/a CLEAR 2011-
OCMInstrumentation NeedToInstrument n/a CLEAR 2011-
health_check Status n/a CLEAR 2011-
health_check Unmounted n/a CLEAR 2011-
health_check Mounted n/a CLEAR 2011-
health_check Unavailable n/a CLEAR 2011-
health_check Maintenance n/a CLEAR 2011-
sql_response time n/a CLEAR 2011-
sga_pool_wastage java_free_pct n/a CLEAR 2011-
58
UserAudit username DBSNMP_example CLEAR 2011-
-
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-
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-
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-
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> [-
Starts blackout on a target.
<Target_name:Target_type> defaults to local node target if not specified.If -
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 [-
'agent' creates and deploys only the agent.
[-
[-
[-
<deploy-
<deploy-
<source-
<sid>: The instance of the remote database. Only specified when deploying "dbconsole".
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.