The management agent, ma, executes management commands on HADB hosts. The management agent also ensures availability of the HADB node supervisor processes by restarting them if they fail.
You can start the management agent:
As a service, for production use. See Starting the Management Agent as a Service To ensure availability of the management agent, make sure it is restarted automatically when the system reboots. See Ensuring Automatic Restart of the Management Agent.
As a regular process (in console mode), for evaluation, testing, or development. See Starting the Management Agent in Console Mode.
With the service management facility (SMF) on Solaris 10. See Running the Management Agent with the Solaris 10 Service Management Facility.
In each case, the procedures are different depending on whether you are using Java Enterprise System or the standalone Application Server.
Starting the management agent as a service ensures that it will continue to run until the system shuts down or you explicitly stop it. The command depends on your installation and platform:
To start the management agent as a service, use this command:
/etc/init.d/ma-initd start
To stop the service, use this command:
/etc/init.d/ma-initd stop
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.
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:
HADB_ROOT is the HADB installation directory, HADB_install_dir.
HADB_MA_CFG is the location of the management agent configuration file. For more information, see Customizing Management Agent Configuration
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.
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.
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:
id:5:initdefault:
This example shows a default runlevel of 5.
Create soft links to the file /etc/init.d/ma-initd, as described in Creating soft links.
Reboot the machine.
To deactivate automatic start and stop of the agent, remove the links or change the letters K and S in the link names to lowercase.
In a shell, change your current directory to HADB_install_dir /bin.
Edit the shell script ma-initd.
Make sure the default values of HADB_ROOT and HADB_MA_CFG in the script to reflect your installation:
HADB_ROOT is the HADB installation directory, HADB_install_dir.
HADB_MA_CFG is the location of the management agent configuration file. For more information, see Customizing Management Agent Configuration
Copy ma-initd to the directory /etc/init.d
Create soft links to the file /etc/init.d/ma-initd, as described in Creating soft links.
To deactivate automatic start and stop of the agent, remove the links or change the letters K and S in the link names to lowercase.
On Solaris, create the following softlinks:
/etc/rc0.d/K20ma-initd /etc/rc1.d/K20ma-initd /etc/rc2.d/K20ma-initd /etc/rc3.d/S99ma-initd /etc/rc5.d/K20ma-initd (only for Sun 4m and 4u architecture) /etc/rc6.d/K20ma-initd /etc/rcS.d/K20ma-initd
On Linux, create the following softlinks:
/etc/rc0.d/K20ma-initd /etc/rc1.d/K20ma-initd /etc/rc3.d/S99ma-initd /etc/rc5.d/S99ma-initd /etc/rc6.d/K20ma-initd
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:
To start the HADB management agent in console mode, use the command:
opt/SUNWhadb/bin/ma [config-file]
The default management agent configuration file is /etc/opt/SUNWhadb/mgt.cfg
To stop the management agent, kill the process or close the shell window.
To start the management agent in console mode, use the command:
HADB_install_dir\bin\ma [config-file]
The optional argument config-file is the name of the management agent configuration file. For more information on the configuration file, see Customizing Management Agent Configuration.
To stop the agent, kill the process.
To start the management agent in console mode, use the command:
HADB_install_dir\bin\ma [config-file]
The optional argument config-file is the name of the management agent configuration file; for more information, see Customizing Management Agent Configuration
To stop the management agent, kill the process.
To start the HADB management agent in console mode, use the command:
HADB_install_dir/bin/ma [config-file]
The default management agent configuration file is HADB_install_dir /bin/ma.cfg
To stop the management agent, kill the process or close the shell window.
Service Management Facility (SMF) provides mechanisms to restart, view, and manage services on Solaris 10. You can use SMF to start, restart, and manage the HADB management agent.
The fault management resource identifier (FMRI) for the management agent is svc:/application/hadb-ma.
The syntax of the management agent ma command is:
ma [common-options] [ service-options] config-file
Where:
common-options is one or more of the common options described in Management Agent Command Syntax.
service-options is one of the Windows service options described in Management Agent Command Syntax.
config-file is the full path to the management agent configuration file. For more information, see Customizing Management Agent Configuration.
Option |
Description |
Default |
---|---|---|
--define name=value-D |
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 |
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.
Edit the management agent configuration file and set the values as desired.
Start the management agent, specifying the customized configuration file as the argument.
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:
Solaris and Linux: HADB_install_dir /bin/ma.cfg .
Windows: HADB_install_dir \bin\ma.cfg.
The following table describes the settings in the configuration file.
Table 3–3 Configuration File Settings
Setting Name |
Description |
Default |
---|---|---|
console.loglevel |
Console log level. Valid values are SEVERE, ERROR, WARNING, INFO, FINE, FINER, FINEST |
WARNING |
logfile.loglevel |
Log file log level. Valid values are SEVERE, ERROR, WARNING, INFO, FINE, FINER, FINEST |
INFO |
logfile.name |
Name and location of log file. Must be a valid path with read/write access. |
Solaris and Linux:/var/opt/SUNWhadb/ma/ma.log Windows: HADB_install_dir\ma.log |
ma.server.type |
Client protocol. Only JMXMP is supported. |
jmxp |
ma.server. jmxmp.port |
Port number for internal (UDP) and external (TCP) communication. Must be a positive integer. Recommended range is 1024-49151. |
1862 |
ma.server. mainternal.interfaces |
Interfaces for internal communication for machines with multiple interfaces. Must be a valid IPv4 address mask. All management agents in a domain must use the same subnet For example, if a host has two interfaces, 10.10.116.61 and 10.10.124.61, use 10.10.116.0/24 to use the first interface. The number after the slash indicates the number of bits in the subnet mask. |
None |
ma.server. dbdevicepath |
Path to store HADB device information. |
Solaris and Linux: /var/opt/SUNWhadb/4 Windows: HADB_install_dir \device |
ma.server. dbhistorypath |
Path to store HADB history files. |
Solaris and Linux: /var/opt/SUNWhadb Windows: REPLACEDIR (replaced by the actual URL at runtime.) |
ma.server. dbconfigpath |
Path to store node configuration data. |
Solaris and Linux: /var/opt/SUNWhadb/dbdef Windows: C:\Sun\SUNWhadb\dbdef |
repository.dr.path |
Path to domain repository files. |
Solaris and Linux: /var/opt/SUNWhadb/repository Windows: C:\Sun\SUNWhadb\repository |