The HP-UX Parallel rc Framework

Executive Summary
On HP-UX, traditionally, the rc sequencer is used to execute start or kill scripts when the system enters
into a new run level. The rc sequencer executes the scripts sequentially. It waits for a script to
complete before executing the next script in the sequence. This works well when the scripts are simple
and the number of scripts is small. The increase in complexity and number of scripts has lead to
longer waiting time for the system to switch between run levels. This is especially seen during a system
reboot where the system is brought down from the highest run level to the lowest run level and then
brought back to the highest run level. The amount of time taken to reboot HP-UX is a major concern
for customers, especially for those who are particular about high availability. The rc scripts, executed
at HP-UX startup and shutdown contribute significantly to the boot time.
Due to the above limitations with the rc sequencer, For HP-UX 11iv3, Hewlett-Packard has developed
a framework that executes start and kill scripts in parallel. This white paper summarizes the features of
this framework and serves as a guide for enabling, configuring and tuning rc scripts within the
framework.
Intended Audience
This document is intended for developers of rc scripts who will find it useful to enable their rc scripts to
run in parallel. System administrators will find useful tips on installing and configuring the Parallel rc
Framework.
Terms and Definitions
rc script A script that is invoked during the transition from one run
level to another. Unless otherwise specified, a “script” will
refer to an “rc script”.
rc sequencer In the traditional model /sbin/rc is a sequencer for both
start and kill scripts. It executes rc scripts in the ascending
alphabetical order.
Sequencer directory The directory where symbolic links to rc scripts are placed.
The directories are /sbin/rcN.d/ where N = 0, 1, 2, 3,
4, 5, and 6.
Parallel rc Framework A framework that allows rc scripts to execute in parallel.
Parallel rc Execution Infrastructure The run time aspects of the Parallel rc Framework.
Dependency A method of specifying a relationship between rc scripts.
Dependency Database A persistent store for storing dependencies.
The Working of the Traditional rc Script Sequencer
Traditionally, symbolic links to rc start scripts for a particular run level N are located in the directory
/sbin/rcN.d/ and symbolic links to rc kill scripts for the same scripts are placed in the directory
/sbin/rc{N-1}.d/. These directories are called sequencer directories. The symbolic links in the
sequencer directories follow a strict naming convention. The Start script names begin with the
character ‘S’ while the kill script names begin with the character ‘K’. The first character is followed by
a three digit number used for sequencing and finally by the name of the script. For example, setboot