Hitachi

JP1 Version 11 JP1/Base User's Guide


7.2.1 Setting services to start and stop automatically

To automatically start process management (including user management), the event service, and the log-file trap management daemon when the system starts up, run the following script after completing the installation and setup:

cd /etc/opt/jp1base
cp -p jbs_start.model jbs_start

To automatically end process management (including user management) and the event service when the system shuts down, run the following script after completing the installation and setup:

cd /etc/opt/jp1base
cp -p jbs_stop.model jbs_stop
Notes
  • To automatically start log file trapping, set a log-file trap startup definition file.

  • You can use jbs_start to automatically start a log file trap by editing the jbs_start file as needed. Edit the file so that log file trapping starts after the event service and the log-file trap management daemon have started.

  • The automatic startup and termination settings are specified according to the encoding that is set for the LANG environment variable during installation. However, if the set encoding is not shown in Table 3-5 in 3.4.2 Setting the language (for UNIX), the LANG environment variable is set to C.

  • When you change the language in jp1bs_env.conf or jp1bs_param.conf, you must also change the LANG environment variable of the automatic start script accordingly.

  • The automatic start script (jbs_start) performs an unsetup of the locale settings of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_MESSAGES by default.

In AIX environment

To automatically start and stop services in an AIX environment, perform the following procedure in addition to the above operations.

  1. Specify the settings to automatically start services.

    Using the mkitab command, make the following entries in the /etc/inittab file:

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

  2. Check the settings.

    Use the lsitab command to check settings in the /etc/inittab file.

    lsitab -a

    Confirm that the descriptions are in the same order as the order in which the processes start (first hntr2mon (Hitachi Network Objectplaza Trace Library), and then jp1base).

    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

  3. Specify the settings to automatically stop services.

    Using a text editor, add the following lines to the /etc/rc.shutdown file below the descriptions of the programs that require JP1/Base:

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

    test -x /opt/hitachi/HNTRLib2/etc/D002stop && /opt/hitachi/HNTRLib2/etc/D002stop

  4. Add the description for shutdown processing.

    Add the following line to the end of the /etc/rc.shutdown file.

    exit 0

    If the command that is executed last has a result code other than 0, the /etc/rc.shutdown script will recognize it as an error and interrupt the shutdown processing.

Notes

The automatic startup and termination settings are specified according to the encoding that is set for the LANG environment variable during installation. However, if the set encoding is not shown in Table 3-5 in 3.4.2 Setting the language (for UNIX), the LANG environment variable is set to C.

When you change the language in jp1bs_env.conf or jp1bs_param.conf, you must also change the LANG environment variable of the automatic start script accordingly.

The automatic start script (jbs_start) performs an unsetup of the locale settings of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_MESSAGES by default.