MC/ServiceGuard monitors services (applications). It executes a service as a sub-process, and when it detects service termination, it determines that a package error has occurred. The only interface between HiRDB and MC/ServiceGuard, except for HiRDB startup and termination processing, is service termination (exit). All HiRDB processes are monitored by pdprcd and are restarted by HiRDB facilities after an abnormal termination. Therefore, there is no need to have MC/ServiceGuard monitor HiRDB processes. Figure 25-48 shows the relationship between process startup and monitoring.
Figure 25-48 Relationship between process startup and monitoring (MC/ServiceGuard)
To maintain the status in which HiRDB is running as a package, a dummy service (dummy process) is necessary. This dummy process must satisfy all the following conditions:
The following is an example of a shell script for generating a dummy process:
#!/bin/sh |
Specify this shell script in SERVICE_CMD in the package control script. To start a resident process, infinite startup should be used by specifying SERVICE RESTART ="-R" in the package control script. Otherwise, unexpected termination will be treated as abnormal termination of the HiRDB server.