Oracle® Process Manager and Notification Server Administrator's Guide 10g Release 3 (10.1.3.1.0) Part Number B28944-01 |
|
|
View PDF |
This chapter provides an overview of opmnctl
commands for Oracle Application Server components managed by OPMN. It features the following topics:
opmnctl
is the supported tool for starting and stopping all components in an Oracle Application Server instance, with the exception of 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 in a cluster or 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:
(Linux) ORACLE_HOME
/opmn/bin/opmnctl
(Microsoft 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 4-1 provides a description about opmnctl
syntax.
Table 4-1 opmnctl Syntax
Syntax | Description |
---|---|
Prints detailed execution message, if available. |
|
Specifies where the request is routed. Refer to Section 4.3.1.1, "Scope" for a list of options. |
|
Specifies an |
|
Specifies options for the command. Refer to Section 4.3.4.1.1, "Options for the Status Command of opmnctl" for a list of options. |
Example 4-1 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 [<scope>} set [<attr>=<val> ..] - Set opmn log parameters [<scope>] query [<attr>=<val> ..] - Query opmn log parameters ping [<max_retry>] - Ping local opmn validate [<filename>] - Validate the given xml file config [<options>] - Modify the opmn 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 4-1. The opmnctl
commands are displayed in the following sections:
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...]]
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 and clusters.
@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...]]
.
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.
For example, the following command starts all Oracle Application Server processes configured for OracleAS Wireless:
prompt > opmnctl startproc ias-component=wireless
For example, the following command starts all of the processes in the OC4J group COLORS
:
prompt > opmnctl @cluster startproc oc4j-group=COLORS
Refer to Chapter 5, "Using OPMN" for additional opmnctl
command examples.
Table 4-2 lists the attribute names and values that can be used with the opmnctl
command:
Table 4-2 opmnctl Attribute Names and Values
The target attributes of ias-instance
, ias-component
, process-type
, and process-set
may be specified in a hierarchical manner, with an ias-instance
, a single ias-component
within that ias-instance
, a single process-type
within the ias-component
, and a single process-set
within the process-type
. Any of these attributes may be omitted, and will be treated as a wild card (process-set
is omitted, for example, then all process-set
s under the specified process-type
will match the request).
The target attributes may also be specified in a list of a single hierarchical type (a list of ias-components
, for example).
Note: If Oracle Internet Directory is managed by OPMN and an Oracle Internet Directory dependency (not a managed-process dependency for Oracle Internet Directory) is encountered as part of the request, and the request is expected to start both Oracle Internet Directory processes (such as anopmnctl startall request), the Oracle Internet Directory process will not start unless it has been configured in the opmn.xml file previously. Otherwise, the request will timeout with an Oracle Internet Directory dependency failure. |
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 4-2:
prompt> opmnctl verbose startproc ias-component=HTTP_Server
Example 4-2 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 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.
Note: OPMN starts up automatically on Microsoft Windows when you start or restart your computer. All OPMN-managed processes are also 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.
You can use attributes for these commands. If no attribute is supplied when executing startproc, stopproc,
and restartproc
, all OPMN managed processes except components with id-matching="true"
in the opmn.xml
file will be started.
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.
All processes matching all of the attributes will be started. Components with id-matching="true"
in the opmn.xml
file will be started only if ias-component(oc4j-group)
is explicitly specified.
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
The report=true
attribute when used with startproc
, restartproc
, or stopproc
enables OPMN to report back on each part of a request as it completes. For example, if an opmnctl startproc
request will attempt to start 4 processes, OPMN will report back to the user the result of each process start attempt as soon as it completes. This attribute works on scoped requests in the same way.
For example, the following shows the reports display when a request is issued:
% opmnctl @instance:your_company:ias_stado17_1 startproc report=true opmnctl: starting opmn managed processes..
.
% opmnctl @instance:your_company:ias_stado17_1 startproc report=true opmnctl: starting opmn managed processes...
ias_stado17_1/HTTP_Server/HTTP_Server/HTTP_Server/1,86061,17501: success
ias_stado17_1/ppid/ppid/ppid/1,86063,17503: success
% opmnctl @instance:your_company:ias_stado17_1 startproc report=true opmnctl: starting opmn managed processes...
ias_stado17_1/HTTP_Server/HTTP_Server/HTTP_Server/1,86061,17501: success
ias_stado17_1/ppid/ppid/ppid/1,86063,17503: success
your_company/HTTP_Server/HTTP_Server/HTTP_Server/1,2452,11833: success
% opmnctl @instance:your_company:ias_stado17_1 startproc report=true opmnctl: starting opmn managed processes...
ias_stado17_1/HTTP_Server/HTTP_Server/HTTP_Server/1,86061,17501: success
ias_stado17_1/ppid/ppid/ppid/1,86063,17503: success
your_company/HTTP_Server/HTTP_Server/HTTP_Server/1,2452,11833: success
ias_stado17_1/OC4J/home/default_group/1,86062,17502: success
ias_stado17_1: 3 of 3 processes started.
% opmnctl @instance:your_company:ias_stado17_1 startproc report=true opmnctl: starting opmn managed processes...
ias_stado17_1/HTTP_Server/HTTP_Server/HTTP_Server/1,86061,17501: success
ias_stado17_1/ppid/ppid/ppid/1,86063,17503: success
your_company/HTTP_Server/HTTP_Server/HTTP_Server/1,2452,11833: success
ias_stado17_1/OC4J/home/default_group/1,86062,17502: success
ias_stado17_1: 3 of 3 processes started.
your_company/OC4J/home/default_group/1,2451,11851: failure
failed to start a managed process after the maximum retry limit
Log:/private/oracle/OraHome_1/opmn/logs/OC4J~home~default_group~1 your_company: 1 of 2 processes started.
By default an OPMN request is run for all affected processes at the same time, unless a dependency dictates a specific ordering. If the attribute sequential=true
is specified when used with the startproc
, restartproc
, or stopproc
command, then OPMN will only run the request on a single process at a time, waiting for the request to complete on the first before running the request on the second. When the request has finished on one process, it works on the next.
Note that dependencies are still honoured, and take part in the request sequentially as well.
As shown in Figure 4-1, by default OPMN issues jobs for all processes in parallel such that they run at the same time (except when honoring dependencies). For example, with the following command:
> opmnctl startproc ias-component=OC4J
If the sequential attribute is set to true, OPMN will only perform the request upon one process at a time (shown in Figure 4-2).
For example the following command:
% opmnctl startproc ias-component=OC4J sequential=true
starts all of the OC4J processes sequentially.
Figure 4-2 OC4J Process Sequential Request #1
OPMN is processing one OC4J process, before moving on the next shown in Figure 4-3.
As shown in Figure 4-3, when the request completes for the first OC4J process, the request starts on the next OC4J process.
Figure 4-3 OC4J Process Sequential Request #2
As shown in Figure 4-4, all affected OC4J processes have completed the request.
Figure 4-4 OC4J Process Sequential Request #3
Syntax: opmnctl config
<
target
> <
operation
> <
options
>
The opmnctl config
command enables you to execute configuration operations on either the topology
or port
element of the opmn.xml
file using the command line. You do not need to access the opmn.xml
file to perform a topology
or port
configuration.
<target>
= topology
or port
<operation>
= update
or delete
<options>
= the use of this parameter is dependent on your selection for the <target>
and <operation>
arguments
The topology
target is used to configure the discover
element in the opmn.xml
file. The discover
element provides a list of discovery service addresses. The local OPMN server will use the discover element to find and connect with remote OPMN servers in the same cluster. You can configure multiple discover elements.The arguments for the topology
command are:
update
: for the update
parameter, a discover
attribute with a value is required. The format is discover=<value>
where the value is the discovery service address.
delete
: for the delete
parameter, a discover attribute is required but no value needs to be supplied.
The following examples show usage of the described arguments and parameters:
Update the discover attribute in the opmn.xml
file with the discovery service address of *234.5.6.7.8910:
> opmnctl config topology update discover="*234.5.6.7:8910"
Delete the discover attribute in the opmn.xml
file:
> opmnctl config topology delete discover
The port
target is used to configure the port elements in the opmn.xml
file. The arguments for the port
command are:
ias-component=<id>
: this argument specifies the ias-component in which the port element resides.
process-type=<id>
: this argument specifies the process-type in which the port element resides.
portid=<id>
: this argument specifies the port ID that needs to updated or deleted.
range=<port range>
: optional argument for the update operation. This parameter is invalid for the delete operation.
protocol=<port protocol>
: optional argument for the update operation. This is an invalid argument for the delete operation.
The following examples show usage of the described arguments and parameters:
Update the default Web site port element for the OC4J ias-component
element, in the home process-type
using HTTP protocol:
> opmnctl config port update ias-component=OC4J process-type=home portid=default-web-site protocol=http
Delete the default Web site port element for the OC4J ias-component
element, in the home process-type
:
> opmnctl config port delete ias-component=OC4J process-type=home portid=default-web-site
You can start or stop your J2EE based application using the application
attribute. You can use this attribute with the startproc
, restartproc
, or stopproc
, opmnctl
commands.
For example:
prompt > opmnctl startproc application=mailserver
Start the application mailserver
on every process in the local Oracle Application Server instance that has the application mailserver
.
prompt > opmnctl @cluster startproc application=password-manager
Start the password-manager
application on every process in the entire Oracle Application Server cluster that has the password-manager
application
prompt > opmnctl @cluster startproc process-type=home application=web-module
Start the application web-module
on every process in the entire Oracle Application Server cluster that belongs to the process-type
named home
and has the application web-module
.
prompt > opmnctl @instance:inst1:inst2:inst3 startproc process-type=home application=web-module
Start the application web-module
on every process in the three named Oracle Application Server instances that belong to the process-type
named home
and has the application web-module
.
OPMN allows you to start or start an OC4J group cluster-wide using a single command. You can start or stop your OC4J group based application using the application
attribute. You can use this attribute with the startproc
, restartproc
, or stopproc
opmnctl
commands.
For example to start an OC4J group named COLORS
you would use the following command:
prompt> opmnctl @cluster startproc oc4j-group=COLORS
All of the OC4J groups you would like to start must belong to the same group. You must have one Oracle Application Server instance running the Application Server Control Console in order to manage all of the associated OC4J groups.
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:
See Also: |
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 4-3 shows the output after entering the opmnctl status
command for the AppSrv1
instance on host comp1
for the domain yourcompany.com
:
Example 4-3 opmctl Status Output
prompt > opmnctl status Processes in Instance: AppSrv1.comp1.yourcompany.com -------------------------+-----------------+--------+--------- ias-component | process-type | pid | status -------------------------+-----------------+--------+--------- OC4JGroup:COLORS | OC4J:home | 16301 | Alive OC4JGroup:COLORS | OC4J:oc4j_soa | 16256 | Alive ASG | ASG | N/A | Down HTTP_Server | HTTP_Server | 13225 | Alive
The ASG
process is the OracleAS Guard server which is discussed further in the Oracle Application Server High Availability Guide.
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 cluster:
prompt > opmnctl @cluster status
The following are the options you can specify for the <options>
parameter:
-l
: Use this option to obtain the uniqueid
(uid)
value and other specific process parameter information.
prompt > opmnctl status -l
For example, the command outputs the information shown in Example 4-4 (some columns are not shown to improve readability).
Example 4-4 opmnctl status -l output
Processes in Instance: AppSrv1.comp1.yourcompany.com ----------------+-------------+--+--+---------+-------+--+---------------------------------------- ias-component |process-type |--|--|uid |memused|--| ports ----------------+------------ +- +--+---------+-------+--+---------------------------------------- OC4JGroup:COLORS|OC4J:home |--|--|632225812|130022 |--|jms:12603,ajp:12502,rmis:12702,rmi:12403 OC4JGroup:COLORS|OC4J:oc4j_soa|--|--|632233516|104002 |--|jms:12602,ajp:8888,rmis:12701,rmi:12402 ASG |ASG |--|--|N/A |N/A |--|N/A HTTP_Server |HTTP_Server |--|--|632452828|101212 |--|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 4-3 lists the format string syntax for the <fmtlist>
option:
Table 4-3 Format String Syntax
For example, the following command displays the output shown in Example 4-5:
prompt> opmnctl status -noheaders -fsep @ -fmt %cmp%prt%pid%sta
Example 4-5 opmnctl status -noheaders output
OC4JGroup:oc4j_soa@OC4J:home@12472@Alive ASG@ASG@N/A@Down
Enter the following command for additional detailed information:
prompt > opmnctl usage status
The opmnctl status -port
command enables you to display the request connect string used to connect to the OPMN daemon. For example, the command:
prompt > opmnctl status -port
displays:
123.your_company.com:6200
This information can be used by a remote tool that is seeking to access OPMN. For example, in a J2EE Server and Process Management installation type, the request port information can be used in conjunction with the admin_client.jar
utility to perform a deployment to an OC4J instance within the scope of the identified OPMN instance.
This opmnctl status -port
command is a convenient shortcut that replaces the need to look inside of the opmn.xml
file to determine the request access port.
The opmnctl status -app
command displays information for applications (module-ids
) that are managed by OPMN.For example, after entering the following command:
> opmnctl status -app
you will see the output displayed in Example 4-6:
Example 4-6 opmnctl status -app Output
application type: OC4J -----+-----------+---------+---------+----------+------- pid | name | state | rtid | routable | parent -----+-----------+---------+---------+----------+------- 2816 | system | started | g_rt_id | true | 2816 | default | started | g_rt_id | true |system 2816 | bc4j | stopped | g_rt_id | false | 2816 | ascontrol | started | g_rt_id | true |
Only applications that are reported by live processes show up in the opmnctl status -app
output.
The information that is reported using the opmnctl status -app
command varies for each module-id
. A separate table is created for each module-id
. Data that is not available with a process is shown as empty or as N/A
in the process table.
You can use the command options specified in Section 4.3.4.1, "opmnctl status" with the opmnctl status -app
command.
The opmnctl status
command for OC4J groups displays information for OC4J groups that are managed by OPMN. The command enables you to filter the command output.
To only see the status of the OC4J group COLORS
, you can use the following command:
> opmnctl @cluster status –l oc4j-group=COLORS
The output of opmnctl status
-l
command for 10.1.3.1.0 labels OC4J Groups and OC4J processes is shown in Example 4-7 (some columns are not shown to improve readability).
Example 4-7 opmctl status -l Output for OC4J Groups
Processes in Instance: AppSrv1.comp1.yourcompany.com ----------------+-------------+--+--+---------+-------+--+---------------------------------------- ias-component |process-type |--|--|uid |memused|--| ports ----------------+------------ +- +--+---------+-------+--+---------------------------------------- OC4JGroup:COLORS|OC4J:home |--|--|632225812|130022 |--|jms:12603,ajp:12502,rmis:12702,rmi:12403 OC4JGroup:COLORS|OC4J:oc4j_soa|--|--|632233516|104002 |--|jms:12602,ajp:8888,rmis:12701,rmi:12402
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.
Multiple <attr>=<value>
pairs must be separated by an &
. For example, the following opmnctl
command:
prompt > opmnctl dmsdump "table=opmn_ons&format=xml"
will output the set of statistics that are gathered for ONS. The output includes the ports that ONS listens on and the number of notifications that ONS 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 performance metric attributes and values 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
Syntax: opmnctl [<
scope
>] set [<
attr
>=<
value
> ...]
The opmnctl set
command sets the logging configuration for OPMN.
The scope
defines where the opmnctl set
request will be routed. If none or only @instance
is specified, the request will be routed to the local Oracle Application Server instance only. If @instance
is followed by specified instance names, the request will be routed to the specified Oracle Application Server instances.
If @cluster
is specified, the request will be routed to all instances in the cluster.
An attribute name must be specified along with an attribute value. The following attribute names are required by OPMN for this command:
target
: the value for target
can be either log
or debug
, which refer to the opmn.log
or the opmn.dbg
, respectively. Refer to Section A.2.1, "OPMN log Files" for more information.
Note: Enable usage of theopmn.dbg file only after conferring with Oracle Support. The opmn.dbg file is used by Oracle Support to debug and diagnose OPMN issues. Messages that are contained in the opmn.dbg file are typically not readily comprehensible to the user. |
comp
: specifies the OPMN internal components and subcomponents
comp
AttributeThe value for the comp
attribute can be either ons
or pm
. Additionally, the attribute value can be a specific set of sub-components for either the ons or pm
attributes.
The following values for comp
specify the OPMN internal components and subcomponents:
internal:
specifies the common internal information for OPMN
ons
:specifies the ONS component information for OPMN
pm
: specifies the PM component information for OPMN
Both the ons and pm
components consist of subcomponents which may be specified using the component[subcomponents]
syntax where component can be either ons or pm
. If both ons and pm
are specified together they must be separated by a semicolon in the opmn.xml
file. If subcomponents are listed, the listed items must be separated by a comma.
Table 4-4 ONS Component Codes
ONS element | Definition |
---|---|
all |
all subcomponents |
local |
local information |
listener |
listener information |
discover |
discover (server or multicast) information |
servers |
remote servers currently up and connected to the cluster |
topology |
current cluster wide server connection topology |
server |
remote server connection information |
client |
client connection information |
connect |
generic connection information |
subscribe |
client subscription information |
message |
notification receiving and processing information |
deliver |
notification delivery information |
special |
special notification processing |
internal |
internal resource information |
secure |
SSL operation information |
workers |
worker threads |
Table 4-5 PM Component Codes
PM element | Definition |
---|---|
all |
all subcomponents |
requests |
HTTP (user) requests |
remote |
remote HTTP requests |
scheduler |
scheduler thread and resource information |
monitor |
monitor thread information |
workers |
worker threads |
process |
managed processes |
depend |
dependency processing |
rmd |
RMD directives |
fos |
service failover information |
internal |
internal resources |
schedjobs |
periodic scheduled jobs |
procjobs |
for each process scheduled jobs |
fos |
service failover processing |
dms |
DMS processing |
modules |
|
Each subcomponent for ons and pm
may be prefaced with the negation character, !, which deselects the subcomponent. By using all
with negated sub-components, specific subcomponents can be easily eliminated from the display.
Components and subcomponents are set or negated in the order in which they are encountered. Therefore:
ons[all,!topology]
will yield all ons subcomponents excluding topology, while:
ons[!topology,all]
will yield all ons subcomponents including topology.
Syntax: opmnctl [<scope>] query [<attr>=<value> ...]
The opmnctl query
command enables you to query the logging configuration for OPMN.
The attribute name of target
must be specified along with an attribute value. The value for target
can be either log
or debug
, which refer to the opmn.log
file or the opmn.dbg
file, respectively. Refer to Section A.2.1, "OPMN log Files" for more information.
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 4-8 shows the output from the opmnctl help
command.
Example 4-8 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
[<scope>} set [<attr>=<val> ..] - Set opmn log parameters
[<scope>] query [<attr>=<val> ..] - Query opmn log parameters
ping [<max_retry>] - Ping local opmn
validate [<filename>] - Validate the given xml file
config [<options>] - Modify the opmn 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
config
help
For example, enter the following command to receive the output shown in Example 4-9:
prompt > opmnctl usage stopall
Example 4-9 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.