Hitachi

JP1 Version 12 for UNIX Systems JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference


6.3.4 Setup procedure in a cluster system

This subsection describes the setup required to operate Performance Management in a cluster system.

There are setup procedures for the executing node and for the standby node. Set up the executing node first, and then set up the standby node.

Note that the icon [Figure] indicates an item that must be performed for the executing node, and the icon [Figure] indicates an item that must be performed for the standby node. The icon [Figure] indicates either of the following setup items:

Organization of this subsection

(1) Registering PFM - Agent for Platform [Figure] [Figure]

The procedure for registering PFM - Agent for Platform is the same as for a non-cluster system. For details about this procedure, see Chapter 4. Installation and Setup in UNIX.

(2) Setting up a logical host of PFM - Agent

You must set up a logical host environment for PFM - Agent for Platform on the executing node.

Note:

Before starting this setup, stop all services of Performance Management programs in the entire Performance Management system. For details about how to stop services, see the chapter that describes startup and termination of Performance Management in the JP1/Performance Management User's Guide.

(a) Mounting the shared disk [Figure]

Make sure that the shared disk is mounted. If it is not mounted, mount it by using a cluster software operation or volume manager operation.

(b) Setting up a logical host of PFM - Agent for Platform [Figure]

Execute the jpcconf ha setup command to create a logical host environment. This command creates a logical host environment by copying necessary data to the shared disk and setting definitions for a logical host.

To set up a logical host of PFM - Agent for Platform:

  1. Execute the jpcconf ha setup command to create a logical host environment for PFM - Agent for Platform

    Execute the command as follows:

    jpcconf ha setup -key UNIX -lhost jp1-halaop -d /jp1

    Use the -lhost option to specify the logical host name. This example specifies jp1-halaop as the logical host name. If you use DNS, specify the logical host name without the domain name.

    Specify the directory name on the shared disk in the environment directory name of the -d option. For example, if -d/jp1 is specified, /jp1/jp1pc is created and then files for the logical host environment file are created.

  2. Execute the jpcconf ha list command to check the logical host settings.

    Execute the command as follows:

    jpcconf ha list -key all

    Make sure that the created logical host environment is valid.

(c) Setting up the connection-target PFM - Manager [Figure]

Execute the jpcconf mgrhost define command to set up the PFM - Manager that manages PFM - Agent for Platform.

To set up the connection-target PFM - Manager:

  1. Execute the jpcconf mgrhost define command to set the connection-target PFM - Manager.

    Execute the command as follows:

    jpcconf mgrhost define -host jp1-hal -lhost jp1-halaop

    Specify the host name of the connection-target PFM - Manager in the -host option. If the connection-target PFM - Manager runs on a logical host, specify the logical host name of the connection-target PFM - Manager in the -host option. This example specifies jp1-hal as the PFM - Manager's logical host name.

    Use the -lhost option to specify the logical host name of PFM - Agent for Platform. This example specifies jp1-halaop as the logical host name of PFM - Agent for Platform.

Although the above example shows interactive execution, you can also execute the jpcconf mgrhost define command non-interactively. For details about the jpcconf mgrhost define command, see the chapter that explains the commands in the manual JP1/Performance Management Reference.

(d) Setting up the logical hosts of other Performance Management programs [Figure] [Figure]

If you have other PFM - Manager or PFM - Agent programs to be set up on the same logical host in addition to PFM - Agent for Platform, set them up at this stage.

For details about the setup procedure, see the chapter that describes operations in a cluster system in the JP1/Performance Management User's Guide or in the applicable PFM - Agent manual.

(e) Setting up a network [Figure] [Figure]

You must set up the network when Performance Management programs run in a network environment that uses a firewall.

The two items below are specified in the network environment settings. Change the settings if necessary.

  • IP addresses

    You must specify IP addresses if you use Performance Management in a network connected to multiple LANs. To specify the IP addresses, directly edit the contents of the jpchosts file.

    After editing the jpchosts file, copy it from the executing node to the standby node.

    For details about how to set IP addresses, see the chapter that describes installation and setup in UNIX in the JP1/Performance Management Planning and Configuration Guide.

  • Port numbers

    If you establish communication between Performance Management programs via a firewall, use the jpcconf port define command to set the port numbers.

    For details about how to set port numbers, see the chapter that describes installation and setup in UNIX, and the chapter that describes construction and operations in a cluster system, in the JP1/Performance Management Planning and Configuration Guide.

(f) Changing the log file size [Figure] [Figure]

The operating status of Performance Management is output to a log file unique to Performance Management. This log file is called the common message log. This setting is required only when you wish to change this file size.

For details, see the chapter that describes installation and setup in UNIX in the JP1/Performance Management Planning and Configuration Guide.

(g) Changing the performance data storage destination [Figure] [Figure]

This setting is required only when you want to change the directory where the database of performance data managed by PFM - Agent is saved, backed up, exported, or imported. For details about how to specify the setting, see Chapter 4. Installation and Setup in UNIX.

(h) Setting up the action log output [Figure] [Figure]

This setting is required to output action log data when an alarm occurs. Action log data is history information that is output in cooperation with the alarm function related to exceeded thresholds, such as for system load.

For details about how to set up the action log, see J. Outputting Action Log Data.

(i) Exporting the logical host environment definition file [Figure]

After you have created a logical host environment for PFM - Agent for Platform, you must export the environment definition to a file. This export processing involves output of the definition information for the Performance Management program set up on the logical host to a file in the batch mode. If you are setting up other Performance Management programs on the same logical host, export the environment definitions after all setup processes have been completed.

To export the logical host environment definition:

  1. Execute the jpcconf ha export command to export the logical host environment definition.

    Output to an export file the definition information that has been created so far for the logical host environment. You can assign any name to the export file.

    For example, to export the logical host environment definitions to the lhostexp.txt file, execute the following command:

    jpcconf ha export -f lhostexp.txt

    Although the above example shows interactive execution, you can also execute the jpcconf ha export command non-interactively. For details about the jpcconf ha export command, see the chapter that explains the commands in the manual JP1/Performance Management Reference.

(j) Copying the logical host environment definition file to the standby node [Figure] [Figure]

Copy the logical host environment definition file exported in (i) Exporting the logical host environment definition file from the executing node to the standby node.

(k) Unmounting the shared disk [Figure] [Figure]

Unmount the shared disk by using a cluster software operation or volume manager operation, to complete the task. If you plan to continue using the shared disk you unmounted, there is no need to perform the unmount operation again.

Note:

Even if the shared disk is unmounted, you need to perform setup without mounting the shared disk if the specified environment directory contains the jp1pc directory under which files are stored.

In this case, use the following procedure:

  1. Use the tar command to archive the jp1pc directory in the specified environment directory on the local disk.

  2. Mount the shared disk.

  3. If the specified environment directory does not exist on the shared disk, create the environment directory.

  4. Expand the tar file to the environment directory on the shared disk.

  5. Unmount the shared disk.

  6. Delete the files under the jp1pc directory in the specified environment directory on the local disk.

(3) Setting up a logical host environment for the standby node [Figure]

Set up a logical host environment for PFM - Agent for Platform on the standby node.

(a) Importing the logical host environment definition file [Figure]

Import the export file that was copied from the executing node to the standby node.

To specify settings for executing (on the standby node) the Performance Management program of the logical host created on the executing node, use the jpcconf ha import command. If multiple Performance Management programs have been set up for a single logical host, the settings for all the programs are imported in batch mode.

When executing this command, you do not need to mount the shared disk in advance.

To import the logical host environment definition file:

  1. Execute the jpcconf ha import command to import the logical host environment definition.

    Execute the command as follows:

    jpcconf ha import -f lhostexp.txt

    Although the above example shows interactive execution, you can also execute the jpcconf ha import command non-interactively. For details about the jpcconf ha import command, see the chapter that explains the commands in the manual JP1/Performance Management Reference.

    This command changes settings to make the environment for the standby node the same as in the export file. As a result, setup is performed for starting PFM - Agent for Platform on the logical host.

    If fixed port numbers were set by the jpcconf port define command during setup, they are also set in the same manner.

  2. Execute the jpcconf ha list command to check the logical host settings.

    Execute the command as follows:

    jpcconf ha list -key all

    Make sure that the displayed information is the same as when the jpcconf ha list command is executed on the executing node.

(4) Registering PFM - Agent in the cluster software [Figure] [Figure]

To run Performance Management programs in a logical host environment, you must register them in the cluster software, and set up the environment so that the Performance Management programs start and terminate from the cluster software.

This subsection describes the settings for registering PFM - Agent for Platform in the cluster software.

Generally, when you register applications in the UNIX cluster software, you need to specify the four items: Start, stop, monitoring of action, and forced stop.

The following table describes how to specify the required settings in PFM - Agent for Platform.

Table 6‒3: How to control PFM - Agent Option for Platform (UNIX) to be registered in the cluster software

No.

Item

Description

1

Start

Execute the following commands in this sequence to start PFM - Agent for Platform:

  1. jpcspm start -key AH -lhost logical-host-name

  2. jpcspm start -key UNIX -lhost logical-host-name

PFM - Agent for Platform starts after the shared disk and the logical IP address are ready for use.

2

Stop

Execute the following commands in this sequence to stop PFM - Agent for Platform:

  1. jpcspm stop -key UNIX -lhost logical-host-name

  2. jpcspm stop -key AH -lhost logical-host-name

PFM - Agent for Platform stops before the shared disk and the logical IP address are disabled.

Note that if the service has stopped due to, for example, an error, the return value of the jpcspm stop command is 3. In this case, normal termination is assumed because the service has already stopped.

If the cluster software determines the execution results based on the return value, take appropriate action such as setting the return value to 0.

3

Monitoring of action

To monitor actions of PFM - Agent for Platform, execute the ps command to make sure that the following process is running:

ps -ef | grep process-name logical-host-name | grep -v  grep monitored-process
Note:

The ps command may output information other than that for the monitored processes, as in the example below. Take measures such as changing the grep statement so that unnecessary information is not output.

(Example) Output result when the ps command is executed in an environment where the color display of the bash shell is enabled

jpcagtu -d /opt/jp1pc/agtu/agent

grep -- color=auto jpcagtu

For monitored-process, you can specify the following:

  • jpcagtu

  • agtu/jpcsto

  • jpcah

For details about process names, see the chapter that describes construction and operations in a cluster system in the JP1/Performance Management User's Guide, and D. List of Processes.

Note that, during operation of Performance Management, processes might temporarily stop due to maintenance or for other reasons. In anticipation of such stopping of processes, we recommend that you provide a means for suppressing the monitoring of actions (for example, monitoring is not performed if a file indicating maintenance exists).

4

Forced stop

If you need to perform a forced stop, execute the following command:

  • jpcspm stop -key all -lhost logical-host-name -kill immediate

You can only specify all for the service key in the -key option.

Note:

When this command is executed, all Performance Management processes in the specified logical host environment are stopped forcibly by the SIGKILL signal. At this time, forced stop of Performance Management is performed for each logical host, not for each service.

Specify the setting so that forced stop is performed only when normal stop operation does not work.

Notes:
  • Performance Management programs registered in the cluster are started and stopped from the cluster. Therefore, specify the setting so that the programs will not start automatically during OS startup.

  • Before executing a Performance Management command, make sure that the LANG environment variable is specified in the script to be registered in the cluster software.

  • If the cluster software determines the execution results based on the return value of the command, specify the setting so that return values of Performance Management commands are converted to the value expected by the cluster software. For details about return values of Performance Management commands, see the chapter that explains the commands in the manual JP1/Performance Management Reference.

  • If you want to use the ps command to monitor actions, execute the ps command in advance to make sure that the entire logical host name is displayed up to the end. Note that if you use () or [] to specify a process name and logical host name in the ps command, acquisition of the process name and logical host name might fail. In such a case, check the reference for the ps command for the OS, and then re-execute the command.

(5) Checking startup and stop from the cluster software [Figure] [Figure]

Make sure that Performance Management programs function normally by starting and terminating the programs from the cluster software on each node.

(6) Setting up an environment in a cluster system [Figure] [Figure]

When you have finished setting up Performance Management programs, set up their environment so that PFM - Web Console can display operating status reports for monitored programs as appropriate to the operations. You must also set up the environment so that notifications can be sent to the user in the event of a problem in a monitored program.

For details about how to set up an environment for the Performance Management programs, see the chapter that describes construction and operation in a cluster system in the JP1/Performance Management User's Guide.

To transfer an environment used in a physical environment to a logical environment, change the settings to prevent unnecessary records from being collected in each of the physical and logical environments.