Previous Topic: restartsvc Utility--Restart a Service (Windows Only)

Next Topic: Examples Using State Management

restartproc.sh Utility--Restart a Process (UNIX Only)

The restartproc.sh utility restarts a process through an action invocation. This utility is mainly used as an action for a Process Monitor table entry. Before running this utility, make sure that the corresponding process monitoring entry is already created. This utility is available on UNIX only.

This utility has the following format:

restartproc <arglist>

arglist

Consists of the following two arguments. You must provide both arguments for successful execution when running the utility on the command line:

arg 1

Specifies the program to restart.

arg 2

Specifies the integer value of 10 that is equivalent to PROCSTOP_TRAP.

Note: arg 2 is not required when it is defined as the action item for the process monitor entry. See the example below.

Examples

The following example invokes restartproc.sh in a sysedge.cf entry:

watch process procAlive 'lpd' 123 0x8 60 'Printer Service Alive' '/opt/EMPsysedge/bin/restartproc.sh /usr/bin/lpd'

You can also invoke restartproc.sh on the command line as follows:

/opt/EMPsysedge/bin/restartproc.sh /usr/bin/lpd 10