OPMN

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 (OracleProcessManager). It starts up automatically when you start or reboot your computer. Refer to Section 2.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 reboot 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. 2.2 How OPMN Works 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: •Oracle Notification Server •Oracle Process Manager •PM Modules Figure 2-1 shows the architecture of the core of OPMN. Figure 2-1 OPMN Architecture Description of the illustration aspmn001.gif 2.2.1 Oracle Notification Server 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 per its subscription to ONS. When such a notification is published, ONS sends it to the appropriate subscribers. 2.2.2 Oracle Process Manager Oracle Process Manager (PM) is the centralized process management mechanism in Oracle Application Server and is used to manage Oracle Application Server processes. It starts, stops, restarts, and detects death of these processes. 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 specific, or all processes. When a specific process or all processes are to be stopped, the PM receives a request as specified by the request parameters. OPMN is monitored by a shadow process that restarts upon request or after a catastrophic failure. 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. 2.2.3 PM Modules 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. The PM Modules: •the Oracle Application Server component specific notification information is sent from running component processes. •construct Oracle Application Server component specific control information. •test responsiveness in an Oracle Application Server component specific manner to determine if a component is responding to requests. 2.3 What Oracle Application Server Components Does OPMN Manage? OPMN manages all Oracle Application Server components except the OracleAS Metadata Repository or the Application Server Control Console. You can also configure OPMN to manage other components; for example, OracleAS Port Tunnel, and custom processes. Because of the extensible design of OPMN, add-on components are managed by OPMN without having to update OPMN itself. See Also: •Chapter 9, "Configuring Oracle Application Server Port Tunnel" •Chapter 16, "Configuring Custom Process" 2.3.1 Oracle Enterprise Manager 10g Application Server Control Console 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. See Also: Oracle Application Server 10g Administrator's Guide 2.4 OPMN Configuration Files 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: : This entry represents the Oracle Application Server component. It enables management of the component for processes such as starting and stopping. : This subcomponent of the entry declares the type of process to run by association with a specific PM module. : This sub-subcomponent of the entry enables you to declare different sets of optional runtime arguments and environments for the Oracle Application Server component. The following Example 2-1 shows an example of the , , entries in an opmn.xml file. Example 2-1 opmn.xml file .... 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. 2.5 Automatic Restart 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. See Also: Chapter 4, "opmn.xml Common Configuration" 2.6 opmnctl Command Location opmnctl is the command-line utility for OPMN. 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 the opmnctl 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. 2.6.1 opmnctl Syntax The command below shows an example of the syntax of the opmnctl command: opmnctl [verbose] [] [] Table 2-1 provides a description about opmnctl syntax. Table 2-1 opmnctl Syntax Syntax Description verbose Prints detailed execution message, if available. scope Specifies where the request is routed. Refer to Section 2.8.3.1, "Scope" for a list of options. command Specifies an opmnctl command. Refer to Example 2-2 for a list of commands. options Specifies options for the command. Refer to Section 2.8.3.4, "Options" for a list of options. 2.7 opmnctl Command Quick Reference Example 2-2 lists opmnctl commands for quick reference. You can obtain the same output information by executing the opmnctl help command. Example 2-2 opmnctl Commands 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 [] startproc [=..] - Start opmn managed processes [] restartproc [=..] - Restart opmn managed processes [] stopproc [=..] - Stop opmn managed processes [] reload - Trigger opmn to reread opmn.xml [] status [] - Get managed process status ping [] - Ping local opmn validate [] - Validate the given xml file help - Print brief usage description usage [] - Print detailed usage description 2.8 opmnctl Detailed Command Description The following sections contains detailed descriptions of the opmnctl commands listed in Example 2-2. The opmnctl commands are displayed in the following sections: •Server Control Commands •Process Control Commands •Command Definitions •Status Commands •Help Commands 2.8.1 Server Control Commands The opmnctl start, startall, reload, stopall, and shutdown commands enable you to control the OPMN server. •opmnctl start •opmnctl startall •opmnctl stopall and opmnctl shutdown •opmnctl reload Output is not generated for the successful execution of an opmnctl server control command. Refer to Chapter 17, "OPMN Troubleshooting" if you receive any error messages during opmnctl command execution. 2.8.1.1 Server Control Commands on Microsoft Windows On the Microsoft Windows operating system, OPMN is installed as a Windows service (OracleProcessManager) and it starts up automatically when you reboot 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. 2.8.1.2 opmnctl start Syntax: opmnctl start 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 reboot your computer. All OPMN-managed processes are started. See Also: Chapter 3, "Using OPMN" 2.8.1.3 opmnctl startall Syntax: opmnctl startall [timeout=] 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. 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 OracleProcessManager service in the Windows services control panel. The OracleProcessManager starts automatically when you start or reboot your computer. 2.8.1.4 opmnctl stopall and opmnctl shutdown Syntax: opmnctl stopall, opmnctl shutdown Use either of these commands 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. The opmnctl stopall or the opmnctl shutdown command should only be executed prior to shutting down OPMN and your computer. 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. On Microsoft Windows, you can also perform an opmnctl shutdown by stopping the OracleProcessManager 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 2.8.1.5 opmnctl reload Syntax: opmnctl [scope] reload Use this command to trigger the OPMN to re-read 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 the OracleProcessManager 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 See Also: Section 2.8.3, "Command Definitions" 2.8.2 Process Control Commands 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 , , or level. This section describes the process control commands available with opmnctl. It includes the following process control commands: •opmnctl startproc, opmnctl restartproc and opmnctl stopproc Output is not generated for the successful execution of an opmnctl process control command. Refer to Chapter 17, "OPMN Troubleshooting" if you receive any error messages during opmnctl command execution. 2.8.2.1 opmnctl startproc, opmnctl restartproc and opmnctl stopproc Syntax: opmnctl [] startproc [=...] opmnctl [] restartproc [=...] opmnctl [] stopproc [=...] 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. •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. The 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 the 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 , and the level. For example, the following command starts OracleAS Wireless at the level. prompt > opmnctl startproc ias-component=wireless process-type=alert_server process-set=alert_instance_1 The following command restarts OC4J at the level. prompt > opmnctl restartproc ias-component=OC4J process-type=home The following command stops Oracle HTTP Server at the 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

转载于:https://www.cnblogs.com/mengheyun/archive/2011/02/23/1962233.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值