384
Appendix D
Using SNAplus2 in a High Availability Environment
Advanced Configuration Techniques
commands in the script. The ability to add other SNAplus2 commands
gives you a way to specify local recovery actions before allowing the
script to end.
For example, suppose you want to monitor a Token Ring LS called
TRLS
.
If it fails, you first try to restart
TRLS
. If
TRLS
does not restart, you try to
start an SDLC LS called
SDLCLS
.
Your monitor script might look like this:
#!/bin/ksh
# This script monitors an SNAplus2 package, which uses the
# following SNAplus2 configuration:
#
# A node is configured to run a Token Ring
# LS, TRLS, and an SDLC LS, SDLCLS. TRLS uses a port
# called TRPORT, and SDLCLS uses a port called SDLCPORT.
#
# If the primary LS ever fails, the script performs three steps
# to restore SNA network connectivity.
#
# Step 1: Attempt local restart of TRLS. If successful, monitor
# the LS, then return to Step 1. Otherwise, go to
Step 2.
#
# Step 2: Attempt local failover to SDLCLS. Monitor the LS
# until it fails, then go to Step 3.
#
# Step 3: Exit, which will inform ServiceGuard of a complete
# package failure. Service Guard will then perform
# remote failover.
#
# Add the SNAplus2 command directory to PATH.
#
PATH=/opt/sna/bin:$PATH
#-------------------------------------------------------------
# STEP 1: Local restart
#-------------------------------------------------------------
#
# Start (or restart) the primary LS. If local restart is
# successful, then loop back to try it again.
#
exitcode=0
while (( $exitcode == 0 ))
do
#
# Attempt to start the node. If it is already active,
# the command will have no effect.
#
snapadmin init_node
#
# Attempt to start the port. If it is already active,
# the command will have no effect.
#
snapadmin start_port, port_name=TRPORT
Summary of Contents for HP-UX SNAplus2
Page 4: ...4 ...
Page 14: ...14 Contents ...
Page 22: ...22 ...
Page 23: ...23 1 SNA Terms and Concepts ...
Page 65: ...65 2 Introduction to SNAplus2 ...
Page 107: ...107 3 Administering SNAplus2 ...
Page 132: ...132 Chapter3 Administering SNAplus2 Using the Command Line Administration Program ...
Page 133: ...133 4 Basic Configuration Tasks ...
Page 142: ...142 Chapter4 Basic Configuration Tasks Configuring Logging ...
Page 143: ...143 5 Defining Connectivity Components ...
Page 167: ...167 6 Configuring Dependent LUs ...
Page 174: ...174 Chapter6 Configuring Dependent LUs Defining LU Pools ...
Page 175: ...175 7 Configuring APPC Communication ...
Page 208: ...208 Chapter7 Configuring APPC Communication Configuring APPC Security ...
Page 209: ...209 8 Configuring User Applications ...
Page 222: ...222 Chapter8 Configuring User Applications Configuring RJE Workstations ...
Page 223: ...223 9 Configuring Passthrough Services ...
Page 235: ...235 10 Managing SNAplus2 from NetView ...
Page 248: ...248 Chapter10 Managing SNAplus2 from NetView Using UCF ...
Page 249: ...249 11 Managing SNAplus2 Clients ...
Page 300: ...300 Chapter11 Managing SNAplus2 Clients Managing HP UX Clients ...
Page 301: ...301 A Configuration Planning Worksheets ...
Page 337: ...337 B APPN Network Management Using the Simple Network Management Protocol ...
Page 343: ...343 C Configuring an Invokable TP Using snaptpinstall ...
Page 353: ...353 D Using SNAplus2 in a High Availability Environment ...