Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)

See the osh(1) and run(1) reference pages either online or in the Open System
Services Shell and Utilities Reference Manual for more information about the -name flags.
An OSS persistent process does not need to run in the same processor as the OSH process
that starts it. The OSH command -cpu flag can be used in the STARTUPMSG attribute to start
the OSS persistent process in a specific, currently available processor. For example:
STARTUPMSG "-cpu n -p /bin/sh ..."
starts an OSS shell (-p /bin/sh) in processor n.
The -cpu flag is not compatible with use of the CPU attribute and the $ZCPU environment
variable. Do not use the -cpu flag when the same OSS persistent process will be run in more
than one processor.
See the osh(1) reference page either online or in the Open System Services Shell and Utilities
Reference Manual for more information about the -cpu flag.
All features available to the process when it is started from an OSS shell command line are
available when it is started by the persistence manager:
The /etc/profile file that provides the initial environment for all processes when an
OSS shell is started can provide the initial environment for the process; to use this feature,
you must use the -ls flag in the OSH command that launches the process (must be part
of the STARTUPMSG attribute).
See the osh(1) reference page either online or in the Open System Services Shell and
Utilities Reference Manual for more information about the -ls flag.
The .profile file associated with the user ID during logon to OSS can provide the
initial environment for the process; the USERID attribute provides the user ID that determines
the .profile file used.
Any argument can be passed to the process that would be entered in a command line;
the STARTUPMSG attribute contains these arguments.
Environment variables (env and environ) can be retrieved by the process.
The standard input, output, and error files are supported, with redirection governed by
the rules that apply to the OSH command. If the process requires that tty devices provide
or use these files, then redirection to appropriate terminal simulation devices must be
done in the STARTUPMSG attribute.
When more than 128 characters are required to correctly start an application or script, a
script requiring less than 128 characters in its STARTUPMSG attribute can be run to start the
command or script that needs to be made persistent.
The following SCF commands for the NonStop Kernel subsystem support OSS generic processes:
ABORT – Stops a persistent process
ADD – Initially configures a persistent process
ALTER – Changes the configuration of a persistent process
DELETE – Removes the configuration for a persistent process
INFO – Provides information about the configuration of a persistent process
STATUS – Provides information about the current state of a persistent process
START – Starts a persistent process when it is not started automatically
Examples
Suppose your site needs to monitor an application log and routinely runs the command
66 Operating the OSS Environment