Hitachi

JP1 Version 11 JP1/Integrated Management - Manager Configuration Guide


2.17.2 Setting automatic startup and automatic stop (for UNIX)

This subsection describes the procedure for implementing automatic startup and stopping of JP1/IM - Manager at the time the host is started and stopped.

In the automatic startup and automatic stop scripts, C is set for the LANG environment variable by default. If you want to change the language for the output messages when the scripts are executed, edit the line of the LANG environment variable in the scripts.

Organization of this subsection

(1) In Linux

To set automatic startup and automatic stop:

  1. Copy the automatic startup and automatic stop scripts.

    # cd /etc/opt/jp1cons

    # cp -p jco_start.model jco_start

    # cp -p jco_stop.model jco_stop

(a) Notes about automatic startup of services

In a Linux environment, when the automatic startup and automatic stop of JP1/IM - Manager are enabled but you want to start or stop JP1/IM - Manager manually, execute the commands listed below. To check the status (started or stopped) of JP1/IM - Manager processes, you can use the jco_spmd_status command. When the IM database is used, you can use the jimdbstatus command to check the operation status of the IM database.

  • Starting JP1/IM - Manager

    Physical hosts:

    systemctl start jp1_cons.service

    Logical hosts:

    systemctl start jp1_cons_logical-host-name.service

  • Stopping JP1/IM - Manager

    Physical hosts:

    systemctl stop jp1_cons.service

    Logical hosts:

    systemctl stop jp1_cons_logical-host-name.service

Even when automatic startup and stop is set to enabled, JP1/IM - Manager does not stop automatically after it is started or stopped by using a command other than the systemctl command, for example, by using the jco_start or jco_start.cluster command to start, or the jco_stop or jco_stop.cluster command to stop. (In such a case, automatic startup and stop remains enabled although the stop script does not start when the system stops.)

To allow JP1/IM - Manager to stop automatically when the system stops, start it again by using the systemctl command. To know whether JP1/IM - Manager will stop automatically, execute the following commands to check whether active is returned.

Physical hosts:

systemctl is-active jp1_cons.service

Logical hosts:

systemctl is-active jp1_cons_logical-host-name.service

(b) Notes about syslog

If automatic startup and automatic stop have not been configured#1 in a Linux system on which the systemd package has been installed and an attempt is made to start or stop the system, the message shown below is output to syslog.

Even though this message is output, automatic startup and automatic stop are not performed, because they have not been configured. You can use the jco_spmd_status command to check the status of JP1/IM-Manager Service.

  • Message that is output to syslog#2

    At startup: systemd: Started JP1/Integrated Management - Manager Service.

#1

Automatic startup and automatic stop have not been configured means that the following files do not exist:

/etc/opt/jp1cons/jco_start

/etc/opt/jp1cons/jco_stop

#2

When automatic startup and automatic stop are performed on a logical host in a non-cluster system, the service name specified in Description in the automated startup script and the automated stop script that has been created for the logical host are displayed in the message.

Example:

At startup: systemd: Started JP1/Integrated Management - Manager logical-host-name Service.

(2) In AIX

To set automatic startup and automatic stop:

  1. Copy the automatic startup and automatic stop scripts.

    # cd /etc/opt/jp1cons

    # cp -p jco_start.model jco_start

    # cp -p jco_stop.model jco_stop

  2. Specify the automatic startup settings.

    Use the mkitab command to add the startup entries for JP1/Base and JP1/IM - Manager to the /etc/inittab file. Set up the IM database and then use mkitab to add entries in the following order:

    # mkitab -i hntr2mon "jp1base:2:wait:/etc/opt/jp1base/jbs_start"

    # mkitab -i jp1base "jp1cons:2:wait:/etc/opt/jp1cons/jco_start"

    After you have added the above settings, use the lsitab command to check the settings.

    # lsitab -a

    init:2:initdefault:

    brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot

    :

    :

    hntr2mon:2:once:/opt/hitachi/HNTRLib2/etc/D002start

    jp1base:2:wait:/etc/opt/jp1base/jbs_start

    pe01:234:wait:/var/opt/jp1imm/dbms/JM0/etc/pdpwon_e

    pd01:234:respawn:env LIBPATH=/var/opt/jp1imm/dbms/JM0/lib LC_MESSAGES=C

    var/opt/jp1imm/dbms/JM0/lib/servers/pdprcd /var/opt/jp1imm/dbms/JM0

    jp1cons:2:wait:/etc/opt/jp1cons/jco_start

    #

    The settings are correct if the added entries are specified in the order of hntr2mon (Hitachi Network Objectplaza Trace Library (HNTRLib2)), jp1base, pe01, pd01, and jp1cons.

    Note that the order of the entries in the /etc/inittab file changes when you execute the jimdbupdate command. If you specify the automatic startup settings before setting up the IM database and execute the jimdbupdate command, the entries must be specified in the order of hntr2mon (Hitachi Network Objectplaza Trace Library (HNTRLib2)), jp1base, pe01, pd01, and jp1cons.

  3. Specify the automatic stop settings.

    Use a text editor to add the stop entries for JP1/Base and JP1/IM - Manager to the /etc/rc.shutdown file.

    Perform this step in the following order:

    File name: /etc/rc.shutdown

    :

    testΔ-xΔ/etc/opt/jp1cons/jco_stopΔ&&Δ/etc/opt/jp1cons/jco_stop

    testΔ-xΔ/etc/opt/jp1base/jbs_stopΔ&&Δ/etc/opt/jp1base/jbs_stop

    :

    Note:

    The /etc/rc.shutdown script detects an error and cancels shutdown processing when the termination code of the last command executed is anything other than zero. Therefore, we recommend that you add a code such as exit 0 at the end of the /etc/rc.shutdown script:

The automatic startup and stop scripts are now enabled.