Writing effective scripts
Writing smart application start scripts can also help reduce the likelihood of problems when you bring applications online.
A good practice for start scripts is to check prerequisite conditions before you start an application. The prerequisite conditions might include access to a file system, adequate paging space, and free file system space. The start script should exit and run a command to notify system administrators if requirements are not met.
In pre-event and post-event scripts, on the first line you must specify the
shell environment. For example, if you are using the Korn shell environment, the first line in the
event script must be #!/bin/ksh93.
When you start a database, it is important to consider whether there are multiple instances within the same cluster. In this scenario, you want to start only the instances applicable for each node. Certain database startup commands read a configuration file and start all known databases at the same time. This behavior might not be an ideal configuration for all environments.
Be careful not to kill any PowerHA® SystemMirror® processes as part of your script. If you are using the output of the ps command and you are using the grep command to search for a certain pattern, verify that the pattern does not match any of the PowerHA SystemMirror or Reliable Scalable Cluster Technology (RSCT) processes.