Java Enterprise System on Solaris or Linux

Java Enterprise System on Windows

To start the management agent as a Windows service, use this command: HADB_install_dir\bin\ma -i [config-file ]

The optional argument config-file specifies
the management agent configuration file. Use a configuration file only if
you want to change the default management agent configuration. For more information,
see Customizing Management Agent Configuration

To stop the management agent and remove (deregister) it as a service,
use the command: HADB_install_dir\bin\ma
-r [config-file ]

To perform administration, choose Administrative Tools | Services, which
enables you to start and stop the service, disable automatic startup, and
so on.

Standalone Application Server on Solaris or Linux

To start the management agent as a service, use this command:

HADB_install_dir/bin/ma-initd start

To stop the service, use this command:

HADB_install_dir/bin/ma-initd stop

To change the default values, edit the shell script HADB_install_dir/bin/ma-initd . Copy ma-initd to
the directory /etc/init.d. Replace the default values of
HADB_ROOT and HADB_MA_CFG in the script to reflect your installation:

Standalone Application Server on Windows

To start the management agent as a Windows service, use this command: HADB_install_dir\bin\ma -i [config-file ]

The optional argument config-file specifies
the management agent configuration file. Use a configuration file only if
you want to change the default management agent configuration.

To stop the management agent and remove (deregister) it as a service,
use the command: HADB_install_dir\bin\ma
-r [config-file ]

To perform administration, choose Administrative Tools | Services, which
enables you to start and stop the service, disable automatic startup, and
so on.

Ensuring Automatic Restart of the Management Agent

In a production deployment, configure the management agent to restart
automatically. Doing so ensures the availability of the management agent in
case the ma process fails or the operating system reboots.

On Windows platforms, once you have started the management agent as
a service, use the Windows administrative tools to set the service Startup
type to “Automatic,” and then set desired Recovery options.

On Solaris and Linux platforms, use the procedures in this section,
to configure automatic restart of the management agent. These procedures ensure
the management agent starts only when the system enters:

Runlevel 3 on Solaris (the default).

Runlevel 5 on RedHat Linux (the default in graphical mode).

Entering other runlevels stops the management agent.

To Configure Automatic Restart with Java Enterprise
System on Solaris or Linux

Before You Begin

This section assumes you have a basic understanding of operating system
initialization and runlevels. For information on these topics, see your operating
system documentation.

Ensure that your system has a default runlevel of 3 or 5.

To check the default runlevel of your system, inspect the file /etc/inittab , and look for a line near the top similar to this:

Starting the Management Agent in Console Mode

You may wish to start the management agent in console mode for evaluation
or testing. Do not start the management agent this way in a production environment,
because the ma process will not restart after a system
or process failure and will terminate when the command window is closed. The
command depends on your platform and installation:

Assign value to property name,
where property is one of the properties defined in Configuration File. This option can be repeated multiple times.

None

--help-?

Display help information.

False

--javahome path-j

Use Java Runtime Environment (1.4 or later) located at path.

None

--systemroot path-y

Path to the operating system root as normally set in %SystemRoot%.

None

--version-V

Display version information.

False

Table 3–2 describes options for
starting the management agent as a Windows service. The -i, -r, and -s options
are mutually exclusive; that is, use only one of them at a time.

On Windows, when specifying paths for property values in the configuration
file or on the command line, escape file paths containing spaces with double
quotes ("). Escape drive and directory separators, : and \, with double quotes
and a backslash: "\: and \".

Table 3–2 Management Agent Service
Options (Windows Only)

Option

Description

Default

--install-i

Install the agent as a Windows service and start the service. Use only
one of -i, -r, and -s options.

False

--name servicename-n

Use specified name for the service when running multiple agents on a
host.

HADBMgmtAgent

--remove-r

Stop the service and delete the agent from the Windows service manger.
Use only one of -i, -r, and -s options.

False

--service-s

Run the agent as a Windows service. Use only one of -i, -r, and -s options.

False

Customizing Management Agent Configuration

HADB includes a configuration file that you can use to customize the
management agent settings. When you start the management agent without specifying
a configuration file, it uses default values. If you specify a configuration
file, the management agent will use the settings in that file. You can re-use
the configuration file on all hosts in a domain.

To Customize Management Agent configuration on HADB
Hosts

Edit the management agent configuration file and set the values
as desired.

Start the management agent, specifying the customized configuration
file as the argument.

Configuration File

With Java Enterprise System, all the entries in the configuration file
are commented out. No changes are required to use the default configuration.
To customize the management agent configuration, remove the comments from
the file, change the values as desired, then start the management agent specifying
the configuration file as an argument.

The management agent configuration file is installed to:

Solaris and Linux: /etc/opt/SUNWhadb/mgt.cfg.

Windows: install_dir\lib\mgt.cfg.

With the standalone installer, the management agent configuration file
is installed to: