Job Management Partner 1/Automatic Job Management System 3 Administration Guide
JP1/AJS3 operations and backup and recovery procedures are the same on a logical host that does not fail over as on a logical host in a cluster system. However, the logical host will not fail over with the cluster software.
- Organization of this subsection
- (1) Startup and shutdown order
- (2) Performing operations for JP1/AJS3 on a logical host
- (3) Example of setting up automatic start and stop
- (4) Setting up automatic start and stop on both the physical host and logical host
(1) Startup and shutdown order
Start services on the logical host in the following order:
- JP1/Base
- JP1/AJS3
Stop services on the logical host in the following order:
- JP1/AJS3
- JP1/Base
(2) Performing operations for JP1/AJS3 on a logical host
When you execute a command for an instance of JP1/AJS3 set up on a logical host, specify the logical host name explicitly.
(3) Example of setting up automatic start and stop
If you want JP1/AJS3 services for logical hosts to automatically start and stop when the system starts or stops, you need to specify the settings described below. The setting method differs for each OS supported by JP1/AJS3. The following describes the setting method for each OS.
To delete a logical host, delete the automatic start and stop scripts created for the logical host and the link setting.
(a) In Windows
Using a text editor, open the file JP1/Base-installation-folder\conf\boot\Jp1svprm.dat used by JP1/Base startup control and add the following lines:
: JP1/Base-settings : [Jp1AJS2_logical-host-name] Name=JP1/AJS2_logical-host-name ServiceName=JP1_AJS2_logical-host-name StopCommand=jajs_spmd_stop.exe -h logical-host-nameThe command specified in StopCommand is executed when JP1/Power Monitor shuts down the host.
The StopCommand is available only when JP1/AJS3 and JP1/Power Monitor are installed on the same host.
(b) In HP-UX
- Create the automatic start and stop scripts for the logical host.
Example automatic start and stop scripts (/sbin/init.d/jp1_service_cluster):
#!/bin/sh case $1 in start_msg) echo "Start JP1 Service $JP1_HOSTNAME" ;; stop_msg) echo "Stop JP1 Service $JP1_HOSTNAME" ;; 'start') : JP1/Base-settings : if [ -x /etc/opt/jp1ajs2/jajs_start.cluster ] then /etc/opt/jp1ajs2/jajs_start.cluster logical-host-name jajs_spmd-command-option fi ;; 'stop') if [ -x /etc/opt/jp1ajs2/jajs_stop.cluster ] then /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name jajs_spmd_stop-command-option : JP1/Base-stop-processing : ;; esac exit 0- Link to the scripts you created in step 1.
- Start script
- Execute the following command to set up the link:
The higher the value in XXX, the later the start script is executed.
ln -s /sbin/init.d/jp1_service_cluster /sbin/rc2.d/SXXX_JP1_SERVICE
- Stop script
- Execute the following command to set up the link:
The higher the value in XXX, the later the stop script is executed.
ln -s /sbin/init.d/jp1_service_cluster /sbin/rc1.d/KXXX_JP1_SERVICE
Typically, set the values so that a JP1 service that starts earlier stops later.
- Set permissions for the created file.
Execute the following commands to set permissions:
chmod u=rx,go=r /sbin/init.d/jp1_service_cluster chown root:sys /sbin/init.d/jp1_service_cluster chmod u=rx,go=r /sbin/rc2.d/SXXX_JP1_SERVICE chown -h root:sys /sbin/rc2.d/SXXX_JP1_SERVICE chmod u=rx,go=r /sbin/rc1.d/KXXX_JP1_SERVICE chown -h root:sys /sbin/rc1.d/KXXX_JP1_SERVICE(c) In Solaris
- Create the automatic start and stop scripts for the logical host.
Example automatic start and stop scripts (/etc/init.d/jp1_service_cluster)
#!/bin/sh case $1 in start_msg) echo "Start JP1 Service $JP1_HOSTNAME" ;; stop_msg) echo "Stop JP1 Service $JP1_HOSTNAME" ;; 'start') : JP1/Base-start-processing : if [ -x /etc/opt/jp1ajs2/jajs_start.cluster ] then /etc/opt/jp1ajs2/jajs_start.cluster logical-host-name option-of-jajs_spmd command fi ;; 'stop') if [ -x /etc/opt/jp1ajs2/jajs_stop.cluster ] then /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name option-of-jajs_spmd_stop-command fi : JP1/Base-start-processing : ;; esac exit 0- Link to the scripts you created in step 1.
- Start script
- Execute the following command to set up the link:
The higher the value in XX, the later the start script is executed.
ln -s /etc/init.d/jp1_service_cluster /etc/rc2.d/SXX_JP1_SERVICE
- Stop script
- Execute the following command to set up the link:
The higher the value in XX, the later the stop script is executed.
ln -s /etc/init.d/jp1_service_cluster /etc/rc0.d/KXX_JP1_SERVICE
Typically, set the values so that a JP1 service that starts earlier stops later.
- Set permissions for the created file.
Execute the following commands to set permissions:
chmod u=rx,go=r /etc/rc2.d/SXX_JP1_SERVICE chown -h root:sys /etc/rc2.d/SXX_JP1_SERVICE chmod u=rx,go=r /etc/rc0.d/KXX_JP1_SERVICE chown -h root:sys /etc/rc0.d/KXX_JP1_SERVICE(d) In AIX
- Initialization process
Use the mkitab command to make the following entries in the /etc/inittab file.
# mkitab -i JP1/Base-record "jp1ajs2:2:wait:/etc/opt/jp1ajs2/jajs_start.cluster logical-host-name option-of-jajs_spmd-command"- Shutdown process
Add the following code to the /etc/rc.shutdown file, in a position later than code that shuts down programs for which JP1/AJS3 is a prerequisite.
If this script terminates abnormally, the OS shutdown process will be canceled. Enter exit 0 on the last line so that the script terminates normally.
test -x /etc/opt/jp1ajs2/jajs_stop.cluster && /etc/opt/jp1ajs2/jajs_stop.cluster logical-host-name option-of-jajs_spmd_stop-command : JP1/Base-stop-processing : exit 0
(4) Setting up automatic start and stop on both the physical host and logical host
If you want JP1/AJS3 services to automatically start and stop on both the physical host and logical host, you must specify the settings described below in addition to the automatic start and stop settings on the logical host.
The setting method differs for each OS supported by JP1/AJS3. The following describes the setting method for each OS.
(a) In a Windows environment
Use startup control to define the order in which the services are started and stopped.
If you want to change the startup sequence and stop sequence for the physical host and logical host, change the definition in startup control.
For details about startup control, see the Job Management Partner 1/Base User's Guide.
(b) In HP-UX and Solaris environments
The sequence for automatic start and automatic stop is determined by the value of the number part (XX in SXX) of the automatic start and stop scripts. The higher the XX value, the later the script is executed. Symbolic links to the automatic start and stop scripts for the physical host are automatically created during installation. To implement the automatic start and stop of services for the physical host, change the name of the symbolic link created for the logical host, and then adjust the start and stop sequences for the physical host and logical host.
Note that the automatic start and stop scripts for the physical host are already provided. The following table lists the symbolic links to the automatic start and stop scripts for the physical host.
Table 11-3 Symbolic links to the automatic start and automatic stop scripts for the JP1/AJS3 physical host
OS name Start script Stop script HP-UX /sbin/rc2.d/S907jp1ajs2 /sbin/rc1.d/K093jp1ajs2 Solaris /etc/rc2.d/S99_JP1_80_AJS2 /etc/rc0.d/K01_JP1_20_AJS2 Check the value of XX (number) in SXX in the above table and XX (number) in SXX of the automatic start and stop scripts for the logical host. Determine the start sequence for the physical host and logical host according to the relationship of these values.
For example, if you want to start services on the logical host first, specify a value smaller than 900 (in HP-UX) or 99 (in Solaris) for XX in symbolic-link-name SXX of the automatic start script created for the logical host.
Note that because JP1/AJS3 requires JP1/Base, JP1/Base must be started first.
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.