• No results found

(2) Settings for automatically stopping Administration Agent

The procedure for specifying the settings for automatically stopping Administration Agent are described here for each OS.

! Important note

If you specify settings to automatically restart Administration Agent, Administration Agent cannot be stopped by these procedures. Stop the host after stopping each logical server.

■ Stopping procedures for AIX

The following actions are required for Administration Agent to stop automatically when the host stops: 1. Create a script file for Administration Agent to stop.

2. Add a processing for Administration Agent to stop in the /etc/rc.shutdown script.

The following are the procedures to create a script file for Administration Agent to stop, and the procedures of adding the stop processing of Administration Agent to the /etc/rc.shutdown script:

Creating a script file for Administration Agent stop

Create the script file that stops Administration Agent with any file name under /etc/ (example: /etc/ AdminAgentStop). Furthermore, set the authority of the script file to 755.

The following is an example of a script file:

#!/bin/sh

BIN_PATH=/opt/Cosminexus/manager/bin # Stopping Administration Agent

if [ -x $BIN_PATH/adminagentctl ] ; then $BIN_PATH/adminagentctl stop

fi exit 0

In this example, even if the stop processing fails, the shutdown processing is not interrupted because of the last

exit 0. If the shutdown is interrupted when an error occurs, check the return codes after the execution of respective commands and return a return code other than 0.

Adding the stop processing for Administration Agent to the /etc/rc.shutdown script

Add the script file that makes Administration Agent to stop in the /etc/rc.shutdown script as the processing executed using the /etc/rc.shutdown script.

The following is an example of adding thestop processing of Administration Agent to the /etc/rc.shutdown

script. Note that this is an example when the script file for Administration Agent to stop is saved in /etc/ AdminAgentStop.

if [ -x /etc/AdminAgentStop]; then /etc/AdminAgentStop

fi

■ Stopping procedures for HP-UX

For Administration Agent to stop automatically when the host stops, create a symbolic link to /sbin/init.d/ AdminAgent in the/sbin/rc<N>.d directory (<N> shows the execution level when Administration Agent is stopped). Note that the user with a root authority must create the symbolic link.

Determine the execution level when Administration Agent is stopped and the order in which Administration Agent is stopped, which in turn are specified when the symbolic link is created, in accordance with the operating environment. However, when stopping Administration Agent and Management Server on the same host, set the order so that Management Server stops before Administration Agent stops.

The following is an execution example of making Administration Agent stop automatically. In this example, it is a prerequisite that Administration Agent is stopped automatically when the execution level changes from 2 to 1.

# ln -s /sbin/init.d/AdminAgent /sbin/rc2.d/K900AdminAgent # chmod 755 /sbin/rc2.d/K900AdminAgent

Specify the name of the symbolic link in the K<NNN>stop-script-name format. Specify a 3-digit numeral that shows the stopping sequence within the same execution level, in <NNN>. Specify the same name as the name of the stop script of the link destination, in stop-script-name. For details on the specification rules of the execution level and the symbolic link, see the OS documentation.

■ Stopping procedures of Linux

For Administration Agent to stop automatically when the host stops, create a symbolic link to /etc/rc.d/init.d

in the /etc/rc.d/rc<N>.d directory (<N> shows the execution level when Administration Agent is stopped). Note that the user with a root authority should create the symbolic link.

Determine the execution level when Administration Agent is stopped and the order in which Administration Agent is stopped, which in turn are specified when the symbolic link is created, in accordance with the operating environment. However, when stopping Administration Agent and Management Server on the same host, set the order so that Management Server stops before Administration Agent stops.

The following is an execution example that stops Administration Agent automatically. In this example, it is a prerequisite that Administration Agent is stopped automatically when the execution level is 3.

# ln -s /etc/rc.d/init.d/AdminAgent /etc/rc.d/rc3.d/K91AdminAgent # chmod 755 /etc/rc.d/rc3.d/K91AdminAgent

Specify the name of the symbolic link in the K<NN>stop-script-name format. Specify a 2-digit numeral that shows the stopping sequence within the same execution level, in <NN>. Specify the same name as the name of the stop script of the link destination, in stop-script-name. For details on the specification rules of the execution level and the symbolic link, see the OS documentation.

■ Stopping procedures for Solaris

For Administration Agent to stop automatically when the host stops, create a symbolic link to /etc/init.d in the /etc/rc<N>.d directory (<N> shows the execution level when Administration Agent is stopped). Note that the user with a root authority must create the symbolic link.

Determine the execution level when Administration Agent is stopped and the order in which Administration Agent is stopped, which in turn are specified when the symbolic link is created, in accordance with the operating environment. However, when stopping Administration Agent and Management Server on the same host, set up the order so that Management Server stops before Administration Agent stops.

The following is an execution example for Administration Agent to stop automatically. In this example, it is a prerequisite that Administration Agent is stopped automatically when the execution level changes from 2 to 1.

# ln -s /etc/init.d/AdminAgent /etc/rc2.d/K91AdminAgent # chmod 755 /etc/rc2.d/K91AdminAgent

Specify the name of the symbolic link in the K<NN>stop-script-name format. Specify a 2-digit numeral that shows the stopping sequence within the same execution level, in <NN>. Specify the same name as the name of the stop script of the link destination, in stop-script-name. For details on the specification rules of the execution level and the symbolic link, see the OS documentation.

3

Monitoring the Statistics (Statistics