Skip Headers
Oracle® Enterprise Manager Advanced Configuration
10g Release 1 (10.1)
Part No. B12013-03
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

2 Starting and Stopping Enterprise Manager Components

To start and stop the Management Service, the Management Agent, the Grid Control Console, the Application Server Control Console, and the Database Control, you use the Enterprise Manager command-line utility (emctl).

The capabilities of the command-line utility can be broken down into the following categories:

2.1 Controlling the Oracle Management Agent

The following sections describe how to use the Enterprise Manager command-line utility (emctl) to control the Oracle Management Agent:

2.1.1 Starting, Stopping, and Checking the Status of the Management Agent on UNIX

To start, stop, or check the status of the Management Agent on UNIX systems:

  1. Change directory to the AGENT_HOME/bin directory.

  2. Use the appropriate command described in Table 2-1.

    For example, to stop the Management Agent, enter the following commands:

    $PROMPT> cd AGENT_HOME/bin
    $PROMPT> ./emctl stop agent
    

Table 2-1 Starting, Stopping, and Checking the Status of the Management Agent

Command Purpose
emctl start agent Starts the Management Agent
emctl stop agent Stops the Management Agent
emctl status agent If the Management Agent is running, this command displays status information about the Management Agent, including the Agent Home, the process ID, and the time and date of the last successful upload to the Management Repository ().

Example 2-1 Checking the Status of the Management Agent

$PROMPT> ./emctl status agent
Oracle Enterprise Manager 10g Release 10.1.0.2.0
Copyright (c) 2002, 2003 Oracle Corporation.  All rights reserved.
-----------------------------------------------------------------
Version           : 10.1.0.2.0
Agent Home        : /private/oracle/EM_40_SH10/agent
Agent Process ID  : 8102
Parent Process ID : 8095
Agent URL         : http://usunnab08.us.oracle.com:1813/emd/main/
Started at        : 2003-01-29 12:11:39
Started by user   : oracle
Last Reload       : 2003-01-29 12:45:10
Last successful upload                       : 2003-01-30 11:08:27
Total Megabytes of XML files uploaded so far :    25.21
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    76.87%
---------------------------------------------------------------
Agent is Running and Ready
$PROMPT> 

2.1.2 Starting and Stopping the Management Agent on Windows

When you install the Oracle Management Agent on a Windows system, the installation procedure creates three new services in the Services control panel.

The procedure for accessing the Services control panel varies, depending upon the version of Microsoft Windows you are using. For example, on Windows 2000, locate the Services Control panel by selecting Settings and then Administrative Tools from the Start menu.


Note:

The emctl utility described in Section 2.2.1 is available in the bin subdirectory of the Oracle home where you installed the Management Agent; however, Oracle recommends that you use the Services control panel to start and stop the Management Agent on Windows systems.

Table 2-2 describes the Windows services that you use to control the Management Agent.

Table 2-2 Summary of Services Installed and Configured When You Install the Management Agent on WIndows

Component Service Name Format Description
Oracle Management Agent
Oracle<agent_home>Agent
For example:
OracleOraHome1Agent
Use this Service to start and stop the Application Server Control for the Oracle Application Server instance that was installed and configured to deploy the Management Service J2EE application.
Oracle SNMP Peer Encapsulator
Oracle<oracle_home>SNMPPeerEncapsulator
For example:
OracleOraHome1PeerEncapsulator
Use this service only if you are using the advanced features of the Simple Network Management Protocol (SNMP).

For more information, see the Oracle SNMP Support Reference Guide

Oracle Peer SNMP Master Agent
Oracle<oracle_home>SNMPPeerMasterAgent
For example:
OracleOraHome1PeerMasterAgent
Use this service only if you are using the advanced features of the Simple Network Management Protocol (SNMP).

For more information, see the Oracle SNMP Support Reference Guide



Note:

If you are having trouble starting or stopping the Management Agent on a Windows NT system, try stopping the Management Agent using the following command emctl command:
$PROMPT> <AGENT_HOME>/bin/emctl istop agent

After stopping the Management Agent using the emctl istop agent command, start the Management Agent using the Services control panel.

This problem and solution is applies only to the Windows NT platform, not to other Windows platforms, such as Windows 2000 or Windows XP systems.


2.1.3 Checking the Status of the Management Agent on Windows

To check the status of the Management Agent on Windows systems:

  1. Change directory to the following location in the AGENT_HOME directory:

    AGENT_HOME/bin
    
    
  2. Enter the following emctl command to check status of the Management Agent:

    $PROMPT> ./emctl status agent
    
    

    If the Management Agent is running, this command displays status information about the Management Agent, including the Agent Home, the process ID, and the time and date of the last successful upload to the Management Repository ().

2.2 Controlling the Oracle Management Service

The following sections describe how to control the Oracle Management Service:

2.2.1 Controlling the Management Service on UNIX

There are two methods for starting and stopping the Oracle Management Service on UNIX systems. You can use the Oracle Process Management and Notification (OPMN) utility, or you can use a set of emctl commands.

The following sections describe these two approaches to controlling the Management Service, as well as information about starting and stopping OracleAS Web Cache, which is also required by the Grid Control Console:

2.2.1.1 Using OPMN to Start and Stop the Management Service

One method of starting and stopping the Management Service by using the Oracle Process Management and Notification (OPMN) utility. The OPMN utility (opmnctl) is a standard command used to start and stop components of the Oracle Application Server instance.

The Management Service is a J2EE application running in an Oracle Application Server Containers for J2EE (OC4J) instance within the application server. As a result, the following command will start all the components of the Oracle Application Server instance, including the OC4J_EM instance and the Management Service application:

$PROMPT> cd opmn/bin
$PROMPT> ./opmnctl startall

Similarly, the following command will stop all the components of the Oracle Application Server instance:

$PROMPT> ./opmnctl stopall

If you want to start only the components necessary to run the Management Service, you can use the Enterprise Manager command-line utility.

2.2.1.2 Using emctl to Start, Stop, and Check the Status of the Oracle Management Service

To start, stop, or check the status of the Management Service with the Enterprise Manager command-line utility:

  1. Change directory to the ORACLE_HOME/bin directory in the Management Service home.

  2. Use the appropriate command described in Table 2-3.

    For example, to stop the Management Service, enter the following commands:

    $PROMPT> cd bin
    $PROMPT> ./emctl stop oms
    

Table 2-3 Starting, Stopping, and Checking the Status of the Management Service

Command Purpose
emctl start oms Starts the Oracle Application Server components required to run the Management Service J2EE application. Specifically, this command starts OPMN, the Oracle HTTP Server, and the OC4J_EM instance where the Management Service is deployed.

Note: The emctl start oms command does not start Oracle Application Server Web Cache. For more information, see "Starting and Stopping Oracle Application Server Web Cache".

emctl stop oms Stops the Management Service.

Note that this command does not stop the other processes that are managed by the Oracle Process Manager and Notification Server (OPMN) utility.To stop the other Oracle Application Server components, such as the Oracle HTTP Server and Oracle Application Server Web Cache, see "Starting and Stopping Oracle Enterprise Manager 10g Grid Control".

emctl status oms Displays a message indicating whether or not the Management Service is running.

2.2.1.3 Starting and Stopping Oracle Application Server Web Cache

By default, when you install Oracle Enterprise Manager 10g, the Grid Control Console is configured to use Oracle Application Server Web Cache.


See Also:

Oracle Application Server Web Cache Administrator's Guide for more information about Oracle Application Server Web Cache

Oracle Application Server Web Cache not only improves the performance of the Grid Control Console, but also makes it possible to measure the end-user performance of the Enterprise Manager Web application.


See Also:

Chapter 6, "Configuring Application Service Level Management" for more information about End-User Performance Monitoring and the Enterprise Manager Web Application

To view the Grid Control Console using Oracle Application Server Web Cache, you access the Grid Control Console using the standard port number assigned during the Oracle Enterprise Manager 10g installation procedure. You can find this default port number (usually 7777) in the setupinfo.txt file, which is copied to the following directory during the Enterprise Manager installation procedure:

AS_HOME/Apache/Apache

If Oracle Application Server Web Cache is not running, you will receive an error message, such as the following, if you try to access the Grid Control Console using the default port number:

HTTP 500 - Internal server error

To start Oracle Application Server Web Cache:

  1. Change directory to the ORACLE_HOME/opmn/bin directory in the Management Service home.

  2. Use the appropriate command described in Table 2-4.

    For example, to stop Oracle Application Server Web Cache, enter the following commands:

    $PROMPT> cd opmn/bin
    $PROMPT> ./opmnctl stopproc ias-component=WebCache
    

Table 2-4 Starting, Stopping, and Checking the Status of Oracle Application Server Web Cache

Command Purpose
opmnctl startproc ias-component=WebCache Starts Oracle Application Server Web Cache.
opmnctl stopproc ias-component=WebCache Stops Oracle Application Server Web Cache.
opmnctl status Displays a message showing the status of all the application server components managed by OPMN, including Oracle Application Server Web Cache.

2.2.2 Controlling the Management Service on Windows

When you install the Oracle Management Service on a Windows system, the installation procedure creates three new services in the Services control panel.

The procedure for accessing the Services control panel varies, depending upon the version of Microsoft Windows you are using. For example, on Windows 2000, locate the Services control panel by selecting Settings and then Administrative Tools from the Start menu.


Note:

The emctl utility described in Section 2.2.1 is available in the bin subdirectory of the Oracle home where you installed the Management Service; however, Oracle recommends that you use the Services control panel to start and stop the Management Service on Windows systems.

Table 2-5 describes the Windows services that you use to control the Oracle Management Service.

Table 2-5 Summary of Services Installed and Configured When You Install the Oracle Management Service on WIndows

Component Service Name Format Description
Application Server Control
Oracle<oracle_home>ASControl
For example:
OracleOraHome1ASControl
Use this Service to start and stop the Application Server Control for the Oracle Application Server instance that was installed and configured to deploy the Management Service J2EE application.
Oracle Process Management and Notification (OPMN)
Oracle<oracle_home>ProcessManager
For example:
OracleOraHome1ProcessManager
Use this service to start and stop all the components of the Oracle Application Server instance that was installed and configured to deploy the Management Service J2EE application.

Use this service to start and stop the Management Service and all its related components, including OC4J, Oracle HTTP Server, and OracleAS Web Cache, which by default must be running in order for you to access the Grid Control Console.


2.3 Controlling the Application Server Control

The Application Server Control is a component of Oracle Enterprise Manager 10g that is installed as part of any Oracle Application Server installation. The following sections describe how to start and stop the Application Server Control:


See Also:

Oracle Application Server Administrator's Guide for more information about using emctl to control the Application Server Control Console and for information on starting and stopping the Application Server Control Console on Windows

2.3.1 Starting and Stopping the Application Server Control on UNIX

To control the Application Server Control Console on UNIX systems, you use the emctl command-line utility that is available in the IAS_HOME/bin directory after you install Oracle Application Server.

To start the Application Server Control Console, change directory to the IAS_HOME/bin directory and then enter the following command:

$PROMPT> ./emctl start iasconsole

To stop the Application Server Control Console, enter the following command:

$PROMPT> ./emctl stop iasconsole

2.3.2 Starting and Stopping the Application Server Control on Windows

To start or stop the Application Server Control on Windows systems:

  1. Open the Services control panel.

    For example, on Windows NT, select Start > Settings > Control Panel and then double-click the Services icon.

    On Windows 2000, select Start > Administrative Tools > Services.

  2. Locate the Application Server Control in the list of services.

    The name of the service is usually consists of "Oracle," followed by the name of the home directory you specified during the installation, followed by the word "ASControl." For example, if you specified AS10g as the Oracle Home, the Service name would be:

    OracleAS10gASControl
    
    
  3. After you locate the service, you can use the Services control panel to start or stop the Application Server Control service.

    By default, the Application Server Control service is configured to start automatically when the system starts.

2.4 Controlling the Database Control on UNIX

The Oracle Enterprise Manager 10g Database Control Console is a component of Oracle Enterprise Manager 10g that is installed as part of any Oracle Database 10g installation.

To control the Database Control, you use the emctl command-line utility that is available in the ORACLE_HOME/bin directory after you install Oracle Database 10g.

2.4.1 Starting the Database Control on UNIX

To start the Database Control, as well the Management Agent and the Management Service associated with the Database Control:

  1. Set the following environment variables to identify the Oracle home and the system identifier (SID) for the database instance you want to manage:

    • ORACLE_HOME

    • ORACLE_SID

  2. Change directory to the ORACLE_HOME/bin directory.

  3. Enter the following command:

    $PROMPT> ./emctl start dbconsole
    

2.4.2 Stopping the Database Control on UNIX

To stop the Database Control, as well the Management Agent and the Management Service associated with the Database Control:

  1. Set the following environment variables to identify the Oracle home and the system identifier (SID) for the database instance you want to manage:

    • ORACLE_HOME

    • ORACLE_SID

  2. Change directory to the ORACLE_HOME/bin directory.

  3. Enter the following command:

    $PROMPT> ./emctl stop dbconsole
    

2.4.3 Starting and Stopping the Database Control on Windows

To start or stop the Database Control on Windows systems:

  1. Open the Services control panel.

    For example, on Windows NT, select Start > Settings > Control Panel and then double-click the Services icon.

    On Windows 2000, select Start > Administrative Tools > Services.

  2. Locate the Database Control in the list of services.

    The name of the service is usually consists of "Oracle," followed by the name of the home directory you specified during the installation and the database system identifier (SID), followed by the word "DBControl." For example, if you specified DBd10g as the Oracle Home, the Service name would be:

    OracleDB10gDBControl
    
    
  3. After you locate the service, you can use the Services control panel to start or stop the Database Control service.

    By default, the Database Control service is configured to start automatically when the system starts.

2.5 Guidelines for Starting Multiple Enterprise Manager Components on a Single Host

Oracle Enterprise Manager 10g components are used to manage a variety of Oracle software products. For example, each time you install Oracle Application Server 10g (9.0.4) instance, you also install an Application Server Control. Similarly, each time you install Oracle Database 10g, you install a Database Control. In addition, if you want to centrally manage your system with Database Control, the Management Agent is also installed on each host you monitor.

In most cases, in a production environment, you will want to distribute your database and application server instances among multiple hosts to improve performance and availability of your software resources. However, in rare cases where you must install multiple application servers or databases on the same host, consider the following guidelines.

When you start Application Server Control, the Management Agent, or the Database Control, Enterprise Manager immediately begins gathering important monitoring data about the host and its managed targets. Keep this in mind when you develop a process for starting the components on the host.

Specifically, consider staggering the startup process so that each Enterprise Manager process has a chance to start before the next process begins its startup procedure.

For example, suppose you have installed OracleAS Infrastructure 10g, the J2EE and Web Cache application server installation type, and the Management Agent on the same host. When you start up all the components (for example, after a restart of the system), use a process such as the following:

  1. Use the opmnctl startall command to start all the OPMN-managed processes in the OracleAS Infrastructure 10g home directory.

  2. Wait 15 seconds.

  3. Use the emctl start iasconsole command to start the Application Server Control in the OracleAS Infrastructure 10g home directory.

  4. Wait 15 seconds.

  5. Use the opmnctl startall command to start all the OPMN-managed processes in the J2EE and Web Cache home directory.

  6. Wait 15 seconds.

  7. Use the emctl start iasconsole command to start the Application Server Control in the J2EE and Web Cache home directory.

  8. Wait 15 seconds.

  9. Use the emctl start agent command to start the Management Agent for the host.

Using a staggered startup procedure such as the preceding example will ensure that the processes are not in contention for resources during the CPU-intensive startup phase for each component.

2.6 Starting and Stopping Oracle Enterprise Manager 10g Grid Control

As described in the previous sections, you use separate commands to control the Oracle Management Service, Oracle Management Agent, and the Oracle Application Server components on which the Grid Control depends.

The following sections describe how to stop and start all the Grid Control components that are installed by the Oracle Enterprise Manager 10g Grid Control Console installation procedure.

You can use this procedure to start all the framework components after a system reboot or to shutdown all the components before bringing the system down for system maintenance.

2.6.1 Starting Grid Control and All Its Components

The following procedure summarizes the steps required to start all the components of the Grid Control. For example, use this procedure if you have restarted the host computer and all the components of the Grid Control have been installed on that host.

To start all the Grid Control components on a host, use the following procedure:

  1. If your Oracle Management Repository resides on the host, change directory to the Oracle Home for the database where you installed the Management Repository and start the database and the Net Listener for the database:

    1. Set the ORACLE_HOME environment variable to the Management Repository database home directory.

    2. Set the ORACLE_SID environment variable to the Management Repository database SID (default is asdb).

    3. Start the Net Listener:

      $PROMPT> $ORACLE_HOME/bin/lsnrctl start
      
      
    4. Start the Management Repository database instance:

      ORACLE_HOME/bin/sqlplus /nolog
      SQL> connect SYS as SYSDBA
      SQL> startup
      SQL> quit
      

      See Also:

      Oracle Database Administrator's Guide for information about starting and stopping an Oracle Database

  2. Start the Oracle Management Service:

    $PROMPT> ORACLE_HOME/bin/emctl start oms
    
  3. Start OracleAS Web Cache:

    $PROPMT> $ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=WebCache
    
    
  4. Change directory to the home directory for the Oracle Management Agent and start the Management Agent:

    $PROMPT> AGENT_HOME/bin/emctl start agent
    

    Note:

    Be sure to run the emctl start agent command in the Oracle Management Agent home directory and not in the Management Service home directory.

  5. Optionally, start the Application Server Control Console, which is used to manage the Oracle Application Server instance that is used to deploy the Management Service:

    $PROMPT> $ORACLE_HOME/bin/emctl start iasconsole
    

2.6.2 Stopping Grid Control and All Its Components

The following procedure summarizes the steps required to stop all the components of the Grid Control. For example, use this procedure if you have installed all the components of the Grid Control on the same host you want to shut down or restart the host computer.

To stop all the Grid Control components on a host, use the following procedure:

  1. Stop the Oracle Management Service:

    $PROMPT> $ORACLE_HOME/bin/emctl stop oms
    
  2. If necessary, stop the Application Server Control Console, which is used to manage the Oracle Application Server instance used to deploy the Management Service:

    $PROMPT> $ORACLE_HOME/bin/emctl stop iasconsole
    
  3. Stop all the Oracle Application Server components, such as the Oracle HTTP Server the OracleAS Web Cache:

    $PROMPT> $ORACLE_HOME/opmn/bin/opmnctl stopall
    

    See Also:

    Oracle Application Server Administrator's Guide

  4. Change directory to the home directory for the Oracle Management Agent and stop the Management Agent:

    $PROMPT> AGENT_HOME/bin/emctl stop agent
    

    Note:

    Be sure to run the emctl stop agent command in the Oracle Management Agent home directory and not in the Oracle Application Server home directory.

  5. If your Oracle Management Repository resides on the same host, change directory to the Oracle Home for the database where you installed the Management Repository and stop the database and the Net Listener for the database:

    1. Set the ORACLE_HOME environment variable to the Management Repository database home directory.

    2. Set the ORACLE_SID environment variable to the Management Repository database SID (default is asdb).

    3. Stop the database instance:

      $PROMPT> ORACLE_HOME/bin/sqlplus /nolog
      SQL> connect SYS as SYSDBA
      SQL> shutdown
      SQL> quit
      

      See Also:

      Oracle Database Administrator's Guide for information about starting and stopping an Oracle Database

    4. Stop the Net Listener:

      $PROMPT> $ORACLE_HOME/bin/lsnrctl stop
      

2.7 Additional Management Agent Commands

The following sections describe additional emctl commands you can use to control the Management Agent:

2.7.1 Uploading and Reloading Data to the Management Repository

Under normal circumstances, the Management Agent uploads information about your managed targets to the Management Service at regular intervals.

However, there are two Enterprise Manager commands that can help you force an immediate upload of data to the Management Service or a reload of the target definitions and attributes stored in the Management Agent home directory.

To use these commands, change directory to the AGENT_HOME/bin directory (UNIX) or the AGENT_HOME\bin directory (Windows) and enter the appropriate command as described in Table 2-6.

Table 2-6 Manually Reloading and Uploading Management Data

Command Purpose
emctl upload Use this command to force an immediate upload of the current management data from the managed host to the Management Service. Use this command instead of waiting until the next scheduled upload of the data.
emctl reload This command is for use by Oracle Support. This command can be used when manual edits are made to the Management Agent configuration (.XML) files. For example, if changes are made to the targets.xml file, which defines the attributes of your managed targets, this command will upload the modified target information to the Management Service, which will then update the information in the Management Repository.

Note: Oracle does not support manual editing of the targets.xml files unless the procedure is explicitly documented or you are instructed to do so by Oracle Support.


2.7.2 Specifying New Target Monitoring Credentials

To monitor the performance of your database targets, Enterprise Manager connects to your database using a database username and password. This username and password combination is referred to as the database monitoring credentials.


Note:

The instructions in this section are specific to the monitoring credentials for a database target, but you can use this procedure for any other target type that requires monitoring credentials. For example, you can use this procedure to specify new monitoring credentials for your Oracle Management Service and Management Repository.

For more information about the monitoring credentials for the Management Repository, see "Changing the SYSMAN Password".


When you first add an Oracle9i Database target, or when it is added for you during the installation of the Management Agent, Enterprise Manager uses the DBSNMP database user account and the default password for the DBSNMP account as the monitoring credentials.

When you install Oracle Database 10g, you specify the DBSNMP monitoring password during the database installation procedure.

As a result, if the password for the DBSNMP database user account is changed, you must modify the properties of the database target so that Enterprise Manager can continue to connect to the database and gather configuration and performance data.

Similarly, immediately after you add a new Oracle Database 10g target to the Grid Control, you may need to configure the target so it recognizes the DBSNMP password that you defined during the database installation. Otherwise, the Database Home page may display no monitoring data and the status of the database may indicate that there is a metric collection error.

You can modify the Enterprise Manager monitoring credentials by using the Oracle Enterprise Manager 10g Grid Control Console or by using the Enterprise Manager command-line utility (emctl).

2.7.2.1 Using the Grid Control Console to Modify the Monitoring Credentials

To modify the password for the DBSNMP account in the Oracle Enterprise Manager 10g Grid Control Console:

  1. Click the Targets tab in the Grid Control Console.

  2. Click the Database subtab to list the database targets you are monitoring.

  3. Select the database and click Configure.

    Enterprise Manager displays the Configure Database: Properties page.

  4. Enter the new password for the DBSNMP account in the Monitor Password field.

  5. Click Test Connection to confirm that the monitoring credentials are correct.

  6. If the connection is successful, continue to the end of the Database Configuration wizard and click Submit.

2.7.2.2 Using the Enterprise Manager Command Line to Modify the Monitoring Credentials

To enter new monitoring credentials with the Enterprise Manager command-line utility:

  1. Change directory to the AGENT_HOME/bin directory (UNIX) or the AGENT_HOME\bin directory (Windows).

  2. Enter the following command to specify new monitoring credentials:

    $PROMPT>./emctl config agent credentials [Target_name[:Target_Type]]
    
    

    To determine the correct target name and target type, see "Listing the Targets on a Managed Host".

    shows an example of the prompts and the output you receive from the command.

Example 2-2 Modifying the Database Monitoring Credentials

$PROMPT>./emctl config agent credentials emrep10.acme.com:oracle_database
Oracle Enterprise Manager 10g Release 10.1.0.2.0
Copyright (c) 2002, 2003 Oracle Corporation.  All rights reserved.
Name = emrep10.us.oracle.com, Type = oracle_database
Want to change for "UserName" (y/n):n
Want to change for "password" (y/n):y
Enter the value for "password" :*******
EMD reload completed successfully

2.7.3 Listing the Targets on a Managed Host

There are times when you need to provide the name and type of a particular target you are managing. For example, you must know the target name and type when you are setting the monitoring credentials for a target.

To list the name and type of each target currently being monitored by a particular Management Agent:

  1. Change directory to the AGENT_HOME/bin directory (UNIX) or the AGENT_HOME\bin directory (Windows).

  2. Enter the following command to specify new monitoring credentials:

    $PROMPT>./emctl config agent listtargets  [AGENT_HOME]
    
    

    shows the typical output of the command.

Example 2-3 Listing the Targets on a Managed Host

./emctl config agent listtargets
Oracle Enterprise Manager 10g Release 10.1.0.2.0
Copyright (c) 2002, 2003 Oracle Corporation.  All rights reserved.
[usunnab08.us.oracle.com, host]
[LISTENER_usunnab08.us.oracle.com, oracle_listener]
[EnterpriseManager.usunnab08.us.oracle.com_HTTP Server, oracle_apache]
[EnterpriseManager.usunnab08.us.oracle.com_home, oc4j]
[EnterpriseManager.usunnab08.us.oracle.com_Web Cache, oracle_webcache]
[EnterpriseManager.usunnab08.us.oracle.com, oracle_ias]
[EnterpriseManager.usunnab08.us.oracle.com_OC4J_EM, oc4j]
[EnterpriseManager.usunnab08.us.oracle.com_OC4J_Demos, oc4j]
[EM_Repository, oracle_emrep]
[usunnab08.us.oracle.com:1813, oracle_emd]
[EM Website, website]
[emrep10.us.oracle.com, oracle_database]

2.7.4 Controlling Blackouts

Blackouts allow Enterprise Manager users to suspend management data collection activity on one or more managed targets. For example, administrators use blackouts to prevent data collection during scheduled maintenance or emergency operations.


See Also:

The "Systems Monitoring" chapter in Oracle Enterprise Manager Concepts for more information about Enterprise Manager blackouts

You can control blackouts from the Oracle Enterprise Manager 10g Grid Control Console or from the Enterprise Manager command-line utility (emctl). However, if you are controlling target blackouts from the command line, you should not attempt to control the same blackouts from the Grid Control Console. Similarly, if you are controlling target blackouts from the Grid Control Console, do not attempt to control those blackouts from the command line.


See Also:

"Creating, Editing, and Viewing Blackouts" in the Enterprise Manager online help for information about controlling blackouts from the Grid Control Console

From the command line, you can perform the following blackout functions:

  • Starting Immediate Blackouts

  • Stopping Immediate Blackouts

  • Checking the Status of Immediate Blackouts


    Note:

    When you start a blackout from the command line, any Enterprise Manager jobs scheduled to run against the blacked out targets will still run. If you use the Grid Control Console to control blackouts, you can optionally prevent jobs from running against blacked out targets.

To use the Enterprise Manager command-line utility to control blackouts:

  1. Change directory to the AGENT_HOME/bin directory (UNIX) or the AGENT_HOME\bin directory (Windows).

  2. Enter the appropriate command as described in Table 2-7.


    Note:

    When you start a blackout, you must identify the target or targets affected by the blackout. To obtain the correct target name and target type for a target, see "Listing the Targets on a Managed Host".

Table 2-7 Summary of Blackout Commands

Blackout Action Command
Set an immediate blackout on a particular target or list of targets emctl start blackout <Blackoutname> [<Target_name>[:<Target_Type>]].... [-d <Duration>]

Be sure to use a unique name for the blackout so you can refer to it later when you want to stop or check the status of the blackout.

The -d option is used to specify the duration of the blackout. Duration is specified in [days] hh:mm where:

  • days indicates number of days, which is optional

  • hh indicates number of hours

  • mm indicates number of minutes

If you do not specify a target or list of targets, Enterprise Manager will blackout the local host target. All monitored targets on the host are not blacked out unless a list is specified or you use the -nodelevel argument, which is described below.

If two targets of different target types share the same name, you must identify the target with its target type.

Stop an immediate blackout emctl stop blackout <Blackoutname>
Set an immediate blackout for all targets on a host emctl start blackout <Blackoutname> [-nodeLevel] [-d <Duration>]

The -nodeLevel option is used to specify a blackout for all the targets on the host; in other words, all the targets that the Management Agent is monitoring, including the Management Agent host itself. The -nodeLevel option must follow the blackout name. If you specify any targets after the -nodeLevel option, the list is ignored.

Check the status of a blackout emctl status blackout [<Target_name>[:<Target_Type>]]....

Use the following examples to learn more about controlling blackouts from the Enterprise Manager command line:

  • To start a blackout called "bk1" for databases "db1" and "db2," and for Oracle Listener "ldb2," enter the following command:

    $PROMPT> emctl start blackout bk1 db1 db2 ldb2:oracle_listener -d 5 02:30
    
    

    The blackout starts immediately and will last for 5 days 2 hours and 30 minutes.

  • To check the status of all the blackouts on a managed host:

    $PROMPT> emctl status blackout
    
    
  • To stop blackout "bk2" immediately:

    $PROMPT> emctl stop blackout bk2
    
    
  • To start an immediate blackout called "bk3" for all targets on the host:

    $PROMPT> emctl start blackout bk3 -nodeLevel
    
    
  • To start an immediate blackout called "bk3" for database "db1" for 30 minutes:

    $PROMPT> emctl start blackout bk3 db1 -d 30
    
    
  • To start an immediate blackout called "bk3" for database "db2" for five hours:

    $PROMPT> emctl start blackout bk db2 -d 5:00