Open System Services Management and Operations Guide (G06.29+, H06.07+)
Operating the OSS Environment
Open System Services Management and Operations Guide—527191-005
2-27
Making OSS Application Processes Persistent with
the Kernel Subsystem
launches the named process $OSS1 that runs the program (-p) /bin/tail as if
it were a login shell (-ls); the tail utility uses the file (-f) named log in the
home directory of the user with the user ID OSS.APPS. Because of the -ls flag,
the tail command inherits any environment variables defined in either
/etc/profile or $HOME/.profile for the user ID OSS.APPS.
Once the SCF START command completes, the persistence manager monitors
both the $OSH1 and $OSS1 processes. If either process fails, the persistence
manager aborts the remaining process and makes up to 10 attempts to restart
$OSH1.
To stop the persistent process object, enter the following command at an SCF
prompt:
ABORT PROCESS $ZZKRN.#OSSAPP
This command stops both the $OSH1 and $OSS1 processes. $OSS1 is stopped
such that it does not create a zombie process.
2. Suppose your site has a shell script with the filename startmyapp. One of the
tasks performed by startmyapp (starting an application program named myapp)
needs to be done by a persistent process. startmyapp contains the following:
#! /bin/sh
#
PATH=.:/usr/ucb:/usr/bin:/bin;
export PATH;
CONFIGURATION = $1;
#
run -name=/G/oss2 myapp $CONFIGURATION
where the value passed to myapp through the variable CONFIGURATION is
supplied as a command line parameter ($1) each time startmyapp is invoked.
To configure and run myapp as a persistent process that uses the
CONFIGURATION value of reload, enter the following commands:
a. From a TACL prompt:
WHO
which produces output that includes the HOMETERM value you need to use,
such as:
Home terminal: $ZTN0A.#PT4KH30
...
b. Then, at an SCF prompt, enter:
ADD PROCESS OSSAPP,
NAME $OSH2,
HOMETERM $ZTN0A.#PT4KH30,
AUTORESTART 5,
PRIMARYCPU 2,
STARTMODE MANUAL,
USERID OSS.APPS,