Improving program startup with fastbind [HP-UX Linker] White paper

6
Using prebind
The fastbind tool only modifies the executable and does not modify the software product information
with the latest file metadata. Hence, causing a mismatch between the executable and the updated
software product. Under these circumstances, the prebind(1) tool can be used to accomplish both
tasks - of running fastbind on the executable and updating the software product.
The prebind(1) tool helps improve system availability by improving the startup time of a set of
frequently used and short-lived system commands. It invokes fastbind on these executables and then
uses swmodify(1M) command to update the associated software products.
As mentioned above, in the case of short-lived processes, processing startup relocations can take up a
significant part of the total run time. Some HP-UX commands fitting this description are known to be
used frequently. The ls, cp, mv, echo, date etc. commands are some examples. The use of fastbind on
such executables helps in improving system utilization. The prebind tool automates this.
Apart from the commands mentioned above, the prebind tool can also be used on any other installed
executables, by specifying their paths either on the command line or in a file. The tool operates as
folllows:
1. Invokes swlist(1M) to obtain details of the software product associated with each of
the specified executable files.
2. Invokes fastbind on the executables.
3. Calls swmodify on the software products.
The following table lists the options that are used with the prebind tool.
Options for prebind
-h
isplays a usage message
.
-p
Preview mode – displays commands that will be executed.
path-list
List of paths for executables to act on.
-f <file>
Specifies a file containing the list of executable paths (one per line).
-u
Undo – remove fastbind information from specified executables.
Figure 4 shows examples of prebind usage. In the first example, prebind called without any
executables specified acts on the hard-coded list of system commands and finishes without displaying
any messages. In the second example, prebind is invoked in the preview mode and executables are
specified on the command line. The third example shows the preview of the undo mode with the
executable paths can be supplied in a file.