Oracle® Process Manager and Notification Server Administrator's Guide
10g Release 2 (10.1.2) B13996-02 |
|
Previous |
Next |
This chapter provides an overview of OPMN for Oracle Application Server. It features the following topics:
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.
Does not depend on any other Oracle Application Server component being up and running before it can be started and used.
The OPMN server should be started as soon as possible after turning on the host. OPMN must be running whenever OPMN-managed components are turned on or off.
Note: On the Microsoft Windows operating system, OPMN is installed as a Windows service(Oracle<OracleHomename>ProcessManager) . It starts up automatically when you start or restart your computer. Refer to Section 1.8.1.3, "opmnctl startall" for more information.
|
Oracle Application Server components managed by OPMN should never be started or stopped manually. Do not use command line scripts or utilities from previous versions of Oracle Application Server for starting and stopping Oracle Application Server components. OPMN must be the last service turned off whenever you restart or turn off your computer.
Use the Application Server Control Console and the opmnctl
command line utility to start or stop Oracle Application Server components.
OPMN consists of a core grouping of three components that interpret and convey notification information sent between Oracle Application Server processes within the same or different OPMN servers.
The core of OPMN consists of the following three components:
Figure 1-1 shows the architecture of the core of OPMN.
Oracle Notification Server (ONS) is the transport mechanism for failure, recovery, startup, and other related notifications between components in Oracle Application Server. It operates according to a publish-subscribe model: an Oracle Application Server component receives a notification of a certain type for each subscription to ONS. When such a notification is published, ONS sends it to the appropriate subscribers.
Oracle Process Manager (PM) is the centralized process management mechanism in Oracle Application Server and is used to manage Oracle Application Server processes. The PM is responsible for starting, restarting, stopping, and monitoring every process it manages. The PM handles all requests sent to OPMN associated with controlling a process or obtaining status about a process. The PM is also responsible for performing death-detection and automatic restart of the processes it manages. The Oracle Application Server processes that PM is configured to manage are specified in the opmn.xml
file.
The PM waits for a user command to start a specific, or all Oracle Application Server processes. When a process is stopped, the PM receives a request as specified by the request parameters.
The OPMN server consists of 2 processes. The first OPMN server process has only one purpose: to start the second OPMN server process when necessary. The second OPMN server process handles all request traffic and does all the work. If the second OPMN server process goes down as part of an opmnctl reload
command or an unexpected crash it will be restarted by the first OPMN server process.
On Microsoft Windows, the second OPMN server process will not be restarted if it is deliberately terminated. Instead, the first OPMN server process will exit as well. Recovering from this situation is accomplished by restarting the OPMN server from the command line or service manager.
The PM uses the ONS to:
detect that a process has completed initialization and is ready to receive requests
determine what ports are in use
obtain component specific runtime information
The Application Server Control Console also uses PM to manage processes.
The Oracle Process Manager Modules (PM Modules) implement Oracle Application Server component-specific process management functionality. The PM Modules pass notification information returned by other Oracle Application Server component PM Modules within the same or different OPMN servers.
handle any communications originating from the running component.
construct Oracle Application Server component specific control information (how to start, stop, restart the component).
test responsiveness in an Oracle Application Server component specific manner to determine if a component is responding to requests.
OPMN manages all Oracle Application Server components except the OracleAS Metadata Repository or the Application Server Control Console.
OPMN enables you to explicitly manage the following list of Oracle Application Server 10g Release 2 (10.1.2) components:
Oracle HTTP Server
Oracle Application Server Containers for J2EE (OC4J)
Distributed Configuration Management (DCM) daemon (server)
OracleAS Log Loader
Oracle Internet Directory
OracleAS Port Tunnel
OracleAS Web Cache
OracleBI Discoverer
OracleAS Wireless
OPMN also manages other Oracle Application Server components implicitly; the constituent parts of the implicit Oracle Application Server components are managed by OPMN as part of one or more other Oracle Application Server components. For example, OracleAS Portal while not explicitly managed by OPMN is implicitly managed because it is operational using OC4J and Oracle HTTP Server.
The following components are implicitly managed by OPMN:
OracleAS Single Sign-On
Oracle HTTP Server Adapter of OracleAS Integration InterConnect
Oracle Distributed Authoring and Versioning (OraDAV)
OracleAS Portal
OracleAS SOAP
OracleAS UDDI Registry Server
Oracle Ultra Search
OracleAS TopLink
You can also configure OPMN to manage other processes using the Custom PM Module. See Chapter 15, "Configuring Custom Process" for more information.
Because of the extensible design of OPMN, add-on components are managed by OPMN without having to update OPMN itself.
In addition to OPMN, you can also manage your enterprise using the Application Server Control Console. Application Server Control Console leverages the functionality of OPMN to manage your Oracle Application Server enterprise. Using a Web browser, Application Server Control Console provides a graphical interface that enables management of all Oracle Application Server components in your network and enterprise.
The opmn.xml
file does not contain component-specific element names. Component specific management code is located in the PM modules which get loaded by OPMN at startup according to what has been specified in the modules section of the opmn.xm
l file.
Each level has a specific set of configurations. In addition, there are several configuration elements that are accepted at more than one level to provide the flexibility of applying a configuration across an entire Oracle Application Server component or just part of a component.
OPMN reads the following configuration files when started or reloaded:
ORACLE_HOME
/opmn/conf/opmn.xml
The opmn.xml
file is the main configuration file for OPMN. The opmn.xml
file contains information for the ONS, the PM, and Oracle Application Server component specific configuration.The opmn.xml
file shows you which Oracle Application Server components OPMN is managing on your system.
The opmn.xml
file contains Oracle Application Server component entries arranged in the following hierarchical structure:
<ias-component> <process-type> <process-set>
<ias-component>
: This entry represents the Oracle Application Server component. It enables management of the component for processes such as starting and stopping.
<process-type>
: This subcomponent of the <ias-component>
entry
declares the type of process to run by association with a specific PM module.
<process-set>
: This sub-subcomponent of the <ias-component>
entry enables you to declare different sets of optional runtime arguments and environments for the Oracle Application Server component.
Example 1-1 shows an example of the <ias-component>
, <process-type>
, <process-set>
entries in an opmn.xml file.
Example 1-1 opmn.xml file
<ias-component id="OC4J"> <process-type id="home"> <process-set id="default_island">....
You can edit opmn.xml
using Application Server Control Console. Click the Process Management link at the bottom of the Oracle Application Server instance home page. Do not stop the OPMN server after you edit the opmn.xml
file. Application Server Control Console automatically reloads the updated opmn.xml
file after you edit the file.
If you manually edit the opmn.xml
file run the dcmctl updateConfig
command on the command line. dcmctl updateConfig
reloads the updated file and updates the configuration repository with the manual changes.
ORACLE_HOME
/opmn/conf/ons.conf
OPMN uses the ons.conf
file to find all the different Oracle Application Server instances in the farm. The ons.conf
file is automatically generated and maintained by DCM. Do not edit the ons.conf
file; edits to this file are overwritten by DCM.
ORACLE_HOME
/dcm/config/dcm.conf
The dcm.conf
file specifies the instance name and cluster name of the local Oracle Application Server installation.The dcm.conf
file is automatically generated and maintained by DCM. The dcm.conf
file should not be edited manually.
OPMN gives the user control over automatic death detection and restart of components; you can configure the parameters by which OPMN determines a process has died and disable automatic restart for individual components.
OPMN monitors the operation of its managed processes by the following methods:
Operating system level detection of Oracle Application Server process death
Periodic ping requests to Oracle Application Server processes
Periodic status notification from Oracle Application Server processes ("reverse-ping")
The ping and notification functionality is only used where appropriate according to the functionality of the Oracle Application Server component.
OPMN automatically restarts Oracle Application Server components that terminate unexpectedly. OPMN will also restart processes that are unresponsive according to the result of notification and ping operations.
opmnctl
is the supported tool for starting and stopping all components in an Oracle Application Server instance, with the exception of the Oracle Application Server Metadata Repository and the Oracle Enterprise Manager 10g Application Server Control Console (Application Server Control Console). opmnctl provides a centralized way to control and monitor Oracle Application Server components from the command line. You can use opmnctl to execute control and monitoring commands across multiple Oracle Application Server instances simultaneously.
opmnctl
also enables you to perform operations on a specified Oracle Application Server instance on the application server farm, all instances in the farm, and all instances in a cluster using an optional parameter called scope
. You can also use the scope
option to control an individual Oracle Application Server process.
The opmnctl
command is located in the following directory locations:
(UNIX) ORACLE_HOME
/opmn/bin/opmnctl
(Windows) ORACLE_HOME
\opmn\bin\opmnctl
Note: Oracle Application Server components managed by OPMN should never be started or stopped manually. Do not use command line scripts or utilities from previous versions of Oracle Application Server for starting and stopping Oracle Application Server components. Use the Application Server Control Console and theopmnctl command line utility to start or stop Oracle Application Server components.
|
Note: Oracle recommends starting OPMN as the user that has installed Oracle Application Server. |
The following command shows an example of the syntax of the opmnctl
command:
opmnctl [verbose] [<scope>] <command> [<options>]
Table 1-1 provides a description about opmnctl
syntax.
Table 1-1 opmnctl Syntax
Syntax | Description |
---|---|
Prints detailed execution message, if available. |
|
Specifies where the request is routed. Refer to Section 1.8.3.1, "Scope" for a list of options. |
|
Specifies an |
|
Specifies options for the command. Refer to Section 1.8.4.1.1, "Options for the Status Command of opmnctl" for a list of options. |
Example 1-2 lists opmnctl
commands for quick reference. You can obtain the same output information by executing the opmnctl help
command.
prompt > opmnctl help scope command options _________ __________ __________ start - Start opmn startall - Start opmn and all managed processes stopall - Stop opmn and all managed processes shutdown - Shutdown opmn and all managed processes [<scope>] startproc [<attr>=<val>..] - Start opmn managed processes [<scope>] restartproc [<attr>=<val>..] - Restart opmn managed processes [<scope>] stopproc [<attr>=<val>..] - Stop opmn managed processes [<scope>] reload - Trigger opmn to reread opmn.xml [<scope>] status [<options>] - Get managed process status [<scope>] dmsdump [<attr>=<val>&..] - Get DMS stats ping [<max_retry>] - Ping local opmn validate [<filename>] - Validate the given xml file help - Print brief usage description usage [<command>] - Print detailed usage description
The following sections contains detailed descriptions of the opmnctl
commands listed in Example 1-2. The opmnctl
commands are displayed in the following sections:
The opmnctl start, startall, reload, stopall,
and shutdown
commands enable you to control the OPMN server.
Output is not generated for the successful execution of an opmnctl
server control command. Refer to Appendix A, "OPMN Troubleshooting" if you receive any error messages during opmnctl
command execution.
On the Microsoft Windows operating system, OPMN is installed as a Windows service (Oracle<OracleHomename>ProcessManager)
and it starts up automatically when you restart your computer. When you start or stop OPMN using Windows Services you start or stop all OPMN-managed components on the local instance.
Use the Application Server Control Console and the opmnctl
command line utility to start or stop Oracle Application Server components.
Use this command to start the OPMN server for a local Oracle Application Server instance without starting OPMN-managed processes.
Execute this command as soon as possible after starting your computer.
OPMN starts up automatically on Microsoft Windows when you start or restart your computer. All OPMN-managed processes are started.
Syntax: opmnctl startall [timeout=<
seconds
>]
Use this command to start OPMN as well as the OPMN managed processes for a local Oracle Application Server instance. The startall
is equivalent to the start
command and the startproc
command without arguments. Oracle recommends using the start
or startproc
command.
This command operates synchronously and waits for the operation to complete before returning. To set a timeout for the request, specify the timeout value in seconds.
Components with id-matching="true"
will not be started.
Enter the following command for additional detailed information:
prompt > opmnctl usage startall stopall start startall startproc
On Microsoft Windows, you can also perform an opmnctl startall
by starting the Oracle<OracleHomename>ProcessManager
service in the Windows services control panel. The Oracle<OracleHomename>ProcessManager
starts automatically when you start or restart your computer.
Use the opmnctl stopall
command to shut down the OPMN server as well as the OPMN-managed processes for the local Oracle Application Server instance. This request operates synchronously; it waits for the operation to complete before returning.
Shutting down the OPMN server is not necessary during normal operation. Shutting down the OPMN server prevents remote commands to OPMN from executing on the Oracle Application Server instance until OPMN is restarted.
The opmnctl stopall
command should only be executed prior to shutting down OPMN and your computer. This request first tries to stop all OPMN-managed processes gracefully. Processes which will not stop gracefully will be forcefully shutdown. After stopping all managed processes, the OPMN daemon will shutdown itself.
The opmnctl stopall command should only be used when it is necessary to stop the OPMN daemon. Once started, the OPMN daemon should remain up until it is necessary to restart the computer or some other unforeseen administrative event occurs.To stop all OPMN-managed processes without stopping the OPMN daemon, consider using the opmnctl stopproc
command without any arguments.To restart the OPMN daemon without restarting any OPMN-managed processes, consider using the opmnctl reload
command. The opmnctl reload
command is the appropriate command to use when the only goal is to restart the opmn daemon with a new configuration.
Use the opmnctl stopproc
command if you want to stop all OPMN managed processes.
Use the opmnctl reload
if you want OPMN to reread its configuration.
Enter one of the following commands to obtain additional information:
prompt > opmnctl usage stopall
or
prompt > opmnctl usage shutdown
Use the opmnctl shutdown
command to shut down the OPMN server as well as the OPMN-managed processes for the local Oracle Application Server instance.
The opmnctl shutdown
command quickly shutdowns the OPMN daemon and OPMN-managed processes for the local Oracle Application Server instance.The opmnctl shutdown
command is similar to the opmnctl stopall
command but waits less time before initiating a forceful termination of OPMN-managed processes. After all of the OPMN-managed processes are stopped, the OPMN daemon will shutdown itself.The opmnctl shutdown command should only be performed when it is necessary to stop the OPMN daemon. Once started, the OPMN daemon should remain up until it is necessary to restart the computer or some other unforeseen administrative event occurs.To stop all OPMN-managed processes without stopping the OPMN daemon, consider using the opmnctl stopproc
command without any arguments.To restart the OPMN daemon without restarting any OPMN-managed processes, consider using the opmnctl reload
command. The opmnctl reload
command is the appropriate command to use when the objective is to restart the OPMN daemon with a new configuration.
On Microsoft Windows, you can also perform an opmnctl shutdown
by stopping the Oracle<OracleHomename>ProcessManager
service in the Windows services control panel.
Use the opmnctl stopproc
command if you want to stop all OPMN managed processes.
Use the opmnctl reload
if you want OPMN to reread its configuration.
Enter one of the following commands to obtain additional information:
prompt > opmnctl usage stopall
or
prompt > opmnctl usage shutdown
Syntax: opmnctl [
scope
] reload
Use this command to trigger the OPMN to reread its configuration files in the requested scope. This command restarts the OPMN server without restarting any Oracle Application Server processes managed by OPMN. The OPMN server for the Oracle Application Server instance must be up and running.
Note: On Microsoft Windows, you can highlight theOracle<OracleHomename>ProcessManager in the services control panel and select Restart. The restart of the service is not equivalent to an opmnctl reload , however. This action is equivalent to an opmnctl shutdown followed by an opmnctl startall . It is a much slower operation than opmnctl reload because it restarts OPMN and all the processes managed by OPMN.
|
Enter the following command for additional detailed information:
prompt > opmnctl usage reload
The opmnctl
process control commands enable you to start, stop, or restart single or multiple Oracle Application Server components. You can control an Oracle Application Server component at the <ias-component>
, <process-set>
, or <process-type>
level.
This section describes the process control commands available with opmnctl
. It includes the following process control commands:
Output is not generated for the successful execution of an opmnctl
process control command. Refer to Appendix A, "OPMN Troubleshooting" if you receive any error messages during opmnctl
command execution.
Syntax: opmnctl [<
scope
>] startproc [<
attr
>=<
value
>...]
opmnctl [<
scope
>] restartproc [<
attr
>=<
value
>...]
opmnctl [<
scope
>] stopproc [<
attr
>=<
value
>...]
Use these commands to start, restart, or stop OPMN-managed processes in the requested scope. The OPMN server for the Oracle Application Server instance must be up and running.
The following attributes and values can be used with the startproc, stopproc,
and restartproc
commands:
ias-component, process-type,
and process-set:
The values for these attributes should be the same as the id
value specified in the opmn.xml
file. If no attribute is supplied, the command is applied to all OPMN-managed processes other than those that are configured in the opmn.xml
file with id-matching="true"
. To execute commands on components configured with id-matching="true"
, it is necessary to specify the ias-component
argument.
mode
: The mode
attribute value can be either sync
or async
; the default value is sync
. The sync
value for mode causes the opmnctl
command to operate synchronously and wait for the command to be executed completely before a return prompt is displayed. The timeout element can only be specified when the value of mode is sync
. The value is specified in number of seconds. After the specified timeout expires, the operation is aborted for startproc
but not for restartproc
or stopproc.
T
he opmnctl
command prompt returns, the OPMN server continues to perform the opmnctl
restartproc
or stopproc
command request until the operation is finished.
The async
value for mode causes the return prompt to be displayed immediately, while the OPMN server continues to perform the opmnctl
command request until the operation is finished.
uniqueid:
This value is assigned by OPMN after starting up. You can use this value when you execute the restartproc
and stopproc
commands. You can obtain this value by entering the following command and obtaining the unique number for the Oracle Application Server component in the uid
column of the generated output:
prompt > opmnctl status -l
Attribute names other than those listed may be specified for some types of Oracle Application Server processes managed by OPMN. Unique attribute name should be specific to each type of Oracle Application Server process.
Using the opmnctl startproc, restartproc,
or stopproc
commands with a specified scope and attributes enables control of specific processes in your enterprise. You can execute the opmnctl startproc, restartproc,
or stopproc
commands at the <ias-component>
, <process-type>
and the <process-set>
level.
For example, the following command starts OracleAS Wireless at the <process-set>
level:
prompt > opmnctl startproc ias-component=wireless process-type=alert_server process-set=alert_instance_1
The following command restarts OC4J at the <process-type>
level:
prompt > opmnctl restartproc ias-component=OC4J process-type=home
The following command stops Oracle HTTP Server at the <ias-component>
level:
prompt > opmnctl stopproc ias-component=HTTP_Server
Enter one of the following commands to obtain additional information:
prompt > opmnctl usage startproc
or
prompt > opmnctl usage restartproc
or
prompt > opmnctl usage stopproc
opmnctl
features command definitions that enable you to further define the action you would like to execute with OPMN.
This section describes the command definitions available with the opmnctl
command. It includes the following sections:
Syntax: @instance[:instname[:instname...]]
@cluster[:clusname[:clusname...]]
@farm
The scope
option specifies which Oracle Application Server instances the opmnctl
command applies to. You can use the scope option for opmnctl
commands for single or multiple Oracle Application Server instances, clusters and farms.
@instance:
If you do not specify a name after @instance
option, the opmnctl
command is applied to the local Oracle Application Server instance; local refers to the Oracle Application Server instance or cluster containing the OPMN server handling the request. The default is the local Oracle Application Server instance. If the @instance
option is followed by Oracle Application Server instance names, the request will be routed to Oracle Application Server instances. To apply the command to one or more Oracle Application Server instances, specify @instance[:instname[:instname...]]
.
@cluster:
If you do not specify a name after @cluster
option, the opmnctl
command is applied to the local Oracle Application Server cluster. If @cluster
is followed by a set of 1 or more cluster names, the request will be routed to the all Oracle Application Server instances contained in the specified Oracle Application Server clusters. To apply the command to all Oracle Application Server instances within one or more Oracle Application Server clusters, specify @cluster[:clusname[:clusname...]]
.
@farm:
To apply the command query to all Oracle Application Server instances in the Oracle Application Server farm.
For example, the following command starts OC4J on Oracle Application Server instance named "myInst2.foo.com":
prompt > opmnctl @instance:myInst2.foo.com startproc ias-component=HTTP_Server
The opmnctl
attributes enable you to apply process control operations to specific Oracle Application Server components. If no attributes are specified, all OPMN-managed processes are started, stopped, or restarted.
For example, the following command starts all Oracle Application Server processes configured for OracleAS Wireless:
prompt > opmnctl startproc ias-component=wireless
Refer to Chapter 2, "Using OPMN" for additional opmnctl
command examples.
Table 1-2 lists the attribute names and values that OPMN can use this command:
Table 1-2 opmnctl Attribute Names and Values
Syntax: opmnctl verbose command
The opmnctl
verbose
option enables you to obtain detailed information about the command you are executing.
For example, the following command outputs the information shown in Example 1-3:
prompt> opmnctl verbose startproc ias-component=HTTP_Server
Example 1-3 opmnctl verbose output
HTTP/1.1 200 OK Content-Length: 0 Content-Type: text/html Response: Ping succeeded. opmnctl: starting opmn managed processes... HTTP/1.1 200 OK Content-Length: 571 Content-Type: text/html Response: 1 of 1 processes started. <response> <opmn id="jerichar-sun.us.oracle.com:6200" http-status="200" http-response="1 of 1 processes started."> <ias-instance id="M140801.jerichar-sun.us.oracle.com"> <ias-component id="HTTP_Server"> <process-type id="HTTP_Server"> <process-set id="HTTP_Server"> <process id="1954086921" pid="9355" status="Alive" index="1" log="/home/demoas/M140801/opmn/logs/HTTP_Server~1" operation="request" result="success"> </process> </process-set> </process-type> </ias-component> </ias-instance> </opmn> </response>
The opmnctl
status
commands enable you to determine the status of OPMN-managed processes.
This section describes the command options available with the opmnctl
command. It includes the following sections:
Syntax: opmnctl [
<scope
>] status [<
options
>]
The status
command enables you to obtain information on the Oracle Application Server processes managed by OPMN.
The output is a text table. Each row in the table represents one Oracle Application Server process.
You can customize the status command in the following ways:
Supply a scope to obtain status of processes running on other Oracle Application Server instances
Change the information displayed about each Oracle Application Server process
Remove the table headers from the output
Change the field separator
Change the record separator
Change the width of individual columns
Change the justification of the data in an individual column
Enter the opmnctl usage status
command to obtain full details on how to use the status command.
Example 1-4 shows the output after entering the opmnctl status
command for the AppSrv1
instance on host comp1
for the domain yourcompany.com
:
Example 1-4 opmctl Status Output
prompt > opmnctl status Processes in Instance: AppSrv1.comp1.yourcompany.com --------------------+----------------------+--------+--------- ias-component | process-type | pid | status --------------------+----------------------+--------+--------- WebCache | WebCacheAdmin | 29121 | Alive WebCache | WebCache | 29120 | Alive OC4J | OC4J_Demos | N/A | Down OC4J | home | 29268 | Init dcm-daemon | dcm-daemon | 29113 | Alive LogLoader | logloader | N/A | Down HTTP_Server | HTTP_Server | 29099 | Alive
You can use the opmnctl status
command with <scope>
to obtain additional detailed information. For example, the following command gives you the status of every process of every component of every OracleAS Instance in an entire farm.:
prompt > opmnctl @farm status
The following are the options you can specify for the <options>
parameter:
-l
: Use this option to obtain the uniqueid
(uid)
value.
For example, the following command outputs the information shown in Example 1-5:
prompt > opmnctl status -l
Example 1-5 opmnctl status -l output
Processes in Instance: j2eeuser.yourcompany.com -------------+------------+------+-------+---------+-------+---------+-------- ias-component|process-type|pid |status |uid |memused|uptime | ports -------------+------------+------+-------+---------+-------+---------+-------- -OC4J | home | 5611 | Alive |632225812|105008 |17:55:58 |jms:3701, rmi: 3201,ajp:3000
The uid
information enables you to stop or restart an individual Oracle Application Server process.
For example, the following command stops the home
process-type
:
prompt > opmnctl stopproc uniqueid=632225812
-fsep <string>
: Use this option to assign a field separator value for your opmnctl status
output. The default value is |.
-rsep <string>
: Use this option to assign a record separator value for your opmnctl status
output. The default value is \n.
-noheaders
: Use this option if you do not want a header displayed after you run the opmnctl status
command.
-fmt <fmtlist>
: This is a single string containing one or more statistic identifiers connected together where each identifier has the following format: <statname>[<width>{<justification>].
The default value is: %cmp18%prt18%pid5R%sta8.
Table 1-3 lists the format string syntax for the <fmtlist>
option:
Table 1-3 Format String Syntax
For example, the following command displays the output shown in Example 1-6:
prompt> opmnctl status -noheaders -fsep @ -fmt %cmp%prt%pid%sta
Example 1-6 opmnctl status -noheaders output
OC4J@home@N/A@Down dcm-daemon@dcm-daemon@13875@Alive LogLoader@logloaderd@9800@Alive HTTP_Server@HTTP_Server@13926@Alive
Enter the following command for additional detailed information:
prompt > opmnctl usage status
Syntax: opmnctl [
<scope
>] dmsdump [<attr>=<value>
[&<attr>=<val>...]]
The opmnctl dmsdump
command enables you to print the Oracle Dynamic Monitoring Service (DMS) statistics for OPMN. You can obtain a printout of process control operations for specific Oracle Application Server components. If no attributes are specified, performance data for all OPMN-managed processes for your Oracle Application Server components are printed out.
DMS enables you to monitor a specific performance metric, a set of performance metrics, or all performance metrics. Options allow you to specify a reporting interval to report the requested metrics. For more information about DMS performance metric attributes and values refer to the Oracle Application Server Performance Guide.
The <scope>
defines where the print request will be routed. The usage of <scope>
with the opmnctl dmsdump
command has the following characteristics:
If none or only @instance
is specified, the print request will be routed to the local Oracle Application Server instance only. If @instance
is followed by other Oracle Application Server instance names, the request will be routed to the specified names.
If @cluster
is specified, the request will be routed to the local Oracle Application Server cluster. If @cluster is followed by names, the request will be routed to the Oracle Application Server cluster with the specified names. If @cluster
is followed by other Oracle Application Server cluster names, the request will be routed to the specified names.
If @farm
is specified, the request will be routed to the whole farm.
Multiple <attr>=<value>
pairs must be separated by an &
. The following command:
prompt > opmnctl dmsdump "table=opmn_ons&format=xml"
will output the set of statistics that are gathered for ONS, including the ports that it listens on and the number of notifications it has processed. The output is in .xml
format rather than text. If you want to review the output in text format do not include &format=xml
on the command line.
For more information about DMS refer to the Oracle Application Server Performance Guide.
Syntax: opmnctl ping
[<max_retry
>]
The opmnctl ping
command enables you to contact the local OPMN server to verify operation. <max_retry
> specifies the maximum number of retry times. If <max_retry
> is specified, the local OPMN is pinged every one second, until the command execution succeeds or <max_retry
> is reached.
For example, the following command,
prompt > opmnctl ping 10
designates pinging of OPMN 10 times until the ping command succeeds
The opmnctl help
commands enable you to obtain additional information regarding OPMN.
This section describes the help command options available with the opmnctl
command. It includes the following sections:
Use this command to print a short syntax description of opmnctl
commands.
Example 1-7 shows the output from the opmnctl help
command.
Example 1-7 opmnctl help Output
prompt > opmnctl help
usage: /ORACLE_HOME/bin/opmnctl [verbose] [<scope>] <command> [<options>]
verbose: print detailed execution message if available
Permitted <scope>/<command>/<options> combinations are:
scope command options
_________ __________ __________
start - Start opmn
startall - Start opmn & all managed processes
stopall - Stop opmn & all managed processes
shutdown - Shutdown opmn & all managed processes
[<scope>] startproc [<attr>=<val>..] - Start opmn managed processes
[<scope>] restartproc [<attr>=<val>..] - Restart opmn managed processes
[<scope>] stopproc [<attr>=<val>..] - Stop opmn managed processes
[<scope>] reload - Trigger opmn to reread opmn.xml
[<scope>] status [<options>] - Get managed process status
[<scope>] dmsdump [<attr>=<val>&..] - Get DMS stats
ping [<max_retry>] - Ping local opmn
validate [<filename>] - Validate the given xml file
help - Print brief usage description
usage [<command>] - Print detailed usage description
Syntax: opmnctl usage [<
command
>]
The usage
command displays help for all opmnctl
commands, or only for the specified command.
The command can be one or more of the following:
start
startall
startproc
stopall
stopproc
restartproc
reload
shutdown
ping
status
dmsdump
help
For example, enter the following command to receive the output shown in Example 1-8:
prompt > opmnctl usage stopall
Example 1-8 opmnctl usage stopall output
opmnctl stopall
Stop opmn daemon and opmn managed processes for local ias instance. This request first tries to stop all opmn managed processes gracefully. Processes which will not stop gracefully will be forcefully shutdown. After stopping all managed processes, the opmn daemon will shutdown itself. This request should only be performed when it is necessary to stop the opmn daemon. Once started, the opmn daemon should remain up until it is necessary to restart the computer or some other rare administrative event occurs. To stop all opmn managed processes without stopping the opmn daemon, consider using the stopproc command without any arguments. To restart the opmn daemon without restarting any managed processes, consider using the the reload command. The reload command is the appropriate command to use when the only goal is to restart the opmn daemon with a new configuration. This request operates synchronously and will wait for the operation to complete before returning.
Syntax: opmnctl validate
[<filename
>]
The opmnctl validate
command validates the XML syntax of the opmn.xml
file. The default ORACLE_HOME
/opmn/conf/opmn.xml
is validated if the filename parameter is not specified. The <filename
> can be specified by either the relative or absolute path.
Only one file can be validated at a time. No output is generated for successful opmn.xml
file validation.
You can configure OPMN to execute your own custom event scripts whenever a particular component starts, stops, or crashes. You can select from one or more of the following event types:
pre-start: OPMN runs the pre-start script after any configured dependency checks have been performed and passed, and before the Oracle Application Server component starts. For example, the pre-start script can be used for site-specific initialization of external components.
pre-stop: OPMN runs the pre-stop script before stopping a designated Oracle Application Server component. For example, the pre-stop script can be used for collecting Java Virtual Machine stack traces prior to stopping OC4J processes.
post-crash: OPMN runs the post-crash script after the Oracle Application Server component has terminated unexpectedly. For example, a user could learn of component crashes by supplying a script or program to be executed at post-crash events which sends a notification to the administrator's pager.
Some Oracle Application Server components and services require that other components and services are up and running before starting. OPMN is configured at installation with default start order dependencies, which enables you to start all of the components in an instance in the proper order with a single command. Refer to the Oracle Application Server Administrator's Guide for more information on Oracle Application Server dependencies.
OPMN is configured with a set of dependencies but you can configure additional dependencies according to the environment
The log files generated by OPMN provide important information that can help you identify and diagnose performance and configuration issues. The Application Server Control Console makes reviewing these log files easier by helping you locate and view Oracle Application Server component log files.
The OPMN local listener port used by ONS clients and PM administrative processes do not use Secure Socket Layer (SSL) encryption for security, but rely on two other mechanisms to ensure authorized access to the OPMN server:
OPMN binds the local listener port to the local host. Users on the local system can connect to this port and issue OPMN process control requests. Information requests are allowed on the OPMN request port, which is bound to the system IP. The request port does not have SSL encryption.
When the OPMN server process first starts up and successfully binds to the local port, it creates a string of printable ASCII characters which it uses as a key for local connections. All connection attempts on the local port must include this key or the connection is closed by the OPMN server. The ASCII character string is written into the ORACLE_HOME
/opmn/conf/.formfactor
file. Processes that cannot access the .formfactor
file are not permitted to interact with the OPMN server.
For security reasons, the OPMN server logs any attempts to connect to its local port with an invalid form factor key (a key that does not match the value written by this OPMN process into the .formfactor
file).
In addition to attempted security violations, there are four common user errors that can cause this error to occur:
The user attempts to run the OPMN client manually with the wrong user identification. Only the application server user can read the value from the .formfactor
file, and so requests or processes run as the wrong user will not be able to provide the correct key to the OPMN server.
The user is attempting to run an OPMN client from the wrong ORACLE_HOME
. It is possible to have multiple ORACLE_HOME
instances set up on the same system. If the other ORACLE_HOME
instances have OPMN configured to use the same local port then the Oracle Application Server process request from the wrong ORACLE_HOME
will read the wrong .formfactor
file.
The user has manually changed the local port configuration in the opmn.xml
file and started a new OPMN server without first stopping the previous OPMN server. The new OPMN server will run, bind to the new port, and overwrite the .formfactor
file. The previous OPMN server is now unreachable through the local port, and can only be shutdown through remote OPMN requests (if SSL and authentication are configured) or by manually stopping the previous OPMN server.
The Oracle Application Server and the Oracle Database both use ONS. When these two products are installed onto the same host, an ONS port conflict arises since the default port values (local="6100" remote="6200") for ONS are the same for both the Oracle Database and Oracle Application Server.
ONS with the Oracle Database is only used for special configurations and therefore is typically never started. However, the database listener will attempt to connect to the Database ONS server but will end up connecting to the ONS server that was installed with Oracle Application Server. ONS (as part of OPMN) is always started whenever Oracle Application Server is started.
Because the Oracle Database is installed in a different ORACLE_HOME
than that of Oracle Application Server, the Database ONS does not have access to the .formfactor
file that was created when OPMN started up with the Oracle Application Server. As a result, the database listener attempts to connect to OPMN; the DB listener interprets it as a its standalone ONS) without a form factor string. Oracle Application Server OPMN logs an error similar to the following in the ons.log
file:
04/11/15 18:43:32 [4] Local connection 0,127.0.0.1,6100 invalid form factor
This is expected OPMN behavior Oracle Application Server; preventing client access to the ONS server unless they possess the correct formfactor string.
To avoid having the Oracle Database listener contact the Oracle Application Server OPMN server, change the default local and remote port values for the ONS server that was installed with the Oracle Database. Alternatively, you can apply the latest Oracle Database patchset available on OTN:
http://www.oracle.com/technology/products/
OPMN supports remote requests to other OPMN servers in the same farm, but for security reasons all process control requests (start, restart and stop) are only enabled if SSL is enabled in the opmn.xml
file and a wallet file is configured. If neither SSL nor a wallet file are configured, OPMN will reject any remote process control request with HTTP code 403.
The remote port used for remote administration must be SSL-enabled. The remote port should only be used for communication between multiple OPMN servers. Oracle Application Server components and Application Server Control Console transmit through the local port which is inaccessible to remote administration. All access control and authentication is controlled by going through Application Server Control Console.
DCM manages the configuration of opmn.xml
and manages configurations among application server instances that are associated with a common Infrastructure (members of an Oracle Application Server farm). It enables Oracle Application Server cluster-wide deployment so you can deploy an application to an entire cluster, or make a single host or instance configuration change applicable across all instances in a cluster. The Application Server Control Console uses DCM to make configuration changes and to propagate configuration changes and deployed applications across the cluster.
All command line process control should be through the OPMN opmnctl
command. The DCM dcmctl
command should be used only for configuration related operations and application deployment.
The Oracle Application Server Hi-Av Tool (iHAT) provides a real time, graphical interface view of your enterprise. iHAT displays all Oracle Application Server processes managed by one or more OPMN servers including useful performance metrics about each process. The snapshot of the system is updated continuously at a configurable interval.
iHAT shows your Oracle Application Server instance with Oracle Application Server components. The ias-component, process-set,
and process-type
levels are displayed for each Oracle Application Server component. The child process display of the process-type
shows the status, process-type
, process identification (pid), memory usage, uptime, and CPU usage.
Figure 1-2 shows an example of the iHAT display for an enterprise with two Oracle Application Server instances.
To download iHAT, visit the OTN:
http://www.oracle.com/technology/membership