HP StorageWorks Clustered File System 3.6.0 Windows Storage Server Edition Administration Guide (403103-005, January 2008)

Table Of Contents
Chapter 18: Advanced Monitor Topics 233
This script connects to port 2468, sends a string specified by the protocol,
and determines whether it has received an expected response. You
distribute this script to the same location on all servers on virtual host
vh1, and then create a custom service monitor that uses that script. This
provides not only verification of the connection, but a degree of content
verification.
An Example of Start and Stop Scripts
Suppose the myservice application caches transactions induced by
requests from external users for later commitment to a back-end database
server. You want to ensure that if a failover occurs, any transactions
previously acknowledged by one server appear as complete to users
connecting to the new server. This is the kind of situation where Start and
Stop scripts are useful.
The Stop script should commit all cached transactions to the back-end
database. The Start script should force an update of your view of the
database from the back-end server.
Then, if the service moves from the primary server to a backup, all
transactions performed on the primary will be sent to the database and
from there to the backup server before connections are directed to the
backup server.
Script Environment Variables
When you specify a script for a custom service or device monitor, HP
Clustered File System sets the following environment variables for that
script:
MX_METHOD=(START|STOP|RECOVER|PROBE)
The type of script (Start, Stop, Recovery, or probe).
MX_ACTIVE_STATE=(ACTIVE|INACTIVE)
Whether the script is being run on an active instance of the object. For
example, if a service-monitor script is being run on the server that
currently has the active virtual host, its state will be
ACTIVE. For
device-monitor scripts, the state is
ACTIVE if the monitored device is
active on the server running the script.