Users need to create a script for the following cases when: starting or stopping ISV applications and user application in line with the userApplication state transition, and switching the userApplication status in line with the stopping of the applications.
Set the created scripts as Cmdline resources, and then set those resources in the userApplication.
This chapter also describes the example of the scripts and notes when creating them.
The following three script types can be set to Cmdline:
Start script
is started when the status of userApplication is transited to Online or Standby.
is a script to start user applications.
Stop script
is started when the status of userApplication is transited to Offline.
is a script to stop user applications.
Check script
is used to monitor the status of resources (user applications) to be started or stopped with a Start or Stop script. It is executed in regular intervals after starting RMS. In addition, it is a script to report the status of user applications.
(*) If the processing time of the Check script (time from the start to the end of the Check script) is within about 0.25 seconds, it is started in about 10-second intervals. If the processing time exceeds 0.25 seconds, it is started in about 20-second intervals.
Besides, the Start script and Stop script are called as the Online script and Offline script respectively.
The following table indicates attributes can be set to the Cmdline resources.
Attribute | Outline |
---|---|
NULLDETECTOR | If an attribute value is set to "Yes," Check script is disabled. The resource state is determined only depending on what Online or Offline script of the Cmdline resource shows when each script is executed in conjunction with Online or Offline processing of the userApplication. In this case, the resource state is unmonitored. Moreover, all values of other Flags are set to "No."
|
ALLEXITCODES | If the attribute is set to "No," the exit code of the Check script is interpreted as follows: 0: Online If the attribute is set to "Yes," the exit code is interpreted as follows. 0: online The default value is "No." * Do not use them as return values within the script because the values displayed in 3, 5, 6 and other than the values above indicate a special status. |
LIEOFFLINE | If the attribute is set to "Yes" and the Stop script is not set, the Offline processing of the resource is interpreted as it was processed successfully. However, for the resource status, the current status is displayed. |
CLUSTEREXCLUSIVE | If the attribute is set to "Yes," the resource needs to be Online on one node at the same time in a cluster system. If the resource becomes Online on two or more nodes at the same time because of a script problem and so on, the state of userApplication to which this resource belongs becomes Inconsistent. |
AUTORECOVER | If the attribute is set to "Yes," it tries to restart on the same node before userApplication is failed over in the even to a resource failure. This attempt is performed just once. |
MONITORONLY | This attribute controls whether to switch userApplication to Faulted state when the resource is Faulted. If this attribute is set to "Yes," userApplication cannot be Faulted even if the resource becomes Faulted. |
STANDBYCAPABLE | If the attribute is set to "Yes," RMS sets the StandbyCapable attribute to "1" for this resource. For detailed information regarding this attribute, see "Appendix D Attributes" of "PRIMECLUSTER Reliant Monitor Services (RMS) with Wizard Tools Configuration and Administration Guide." |
REALTIME | If the attribute is set to "No," the Check script is started in the TS class. |
TIMEOUT | This attribute sets a timeout interval (seconds) to start and stop programs. |
Note
When PRIMECLUSTER products are not specified, do not change ReturnCodes of the Cmdline resource.