Availability Guide for Change Management
Reducing the Time Required for Planned Outages
Availability Guide for Change Management–125506
6-5
Writing Efficient Startup and Shutdown Command
Files
You can improve the efficiency of your startup and shutdown command files by applying
the following simple techniques:
•
Use command file syntax that executes quickly.
•
Make sure that command files execute without manual intervention.
•
Set up command files to execute in parallel.
Command File Syntax
The syntax used in command files affects the time it takes for them to execute. To make
sure that your command files execute quickly:
•
Avoid using wild-card characters.
•
Use single-line commands instead of multiple-line commands whenever possible.
A wild card is a character—usually an asterisk (*) or a question mark (?)—used to
match any character or a series of characters. When you use wild-card characters in
your command files, execution time is increased because the system must look up names
in a table. By using explicit names instead of wild-card characters, you can shorten
execution time and allow for commands to execute in parallel.
The following PATHCOM START command uses a wild-card character to start all of the
TERMs defined in the PATHMON configuration file:
= START TERM *
The next PATHCOM START command uses explicit names to start all of the TERMs
defined in the PATHMON configuration file:
= START TERM (TERM1, TERM2, TERM3, TERM4, TERM5, TERM6)
When multiple-line commands are used in a command file, they increase execution time.
By using single-line commands, you can reduce the time required to execute the
command file.
The following PATHCOM command example uses multiple lines:
= RESET SERVER
= SET SERVER NUMSTATIC 2
= SET SERVER MAXSERVERS 3
= ADD SERVER XYZ
The next PATHCOM command example produces the same results as the multiple-line
example shown earlier, but with a single command:
= ADD SERVER XYZ, NUMSTATIC 2, MAXSERVERS 3
Note. When using explicit names, you must remember to revise your command files whenever
a configuration change occurs.