Previous Topic: restartproc Utility--Restart a Process (Windows Only)

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

restartsvc Utility--Restart a Service (Windows Only)

The restartsvc.exe utility restarts a Windows service 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 Windows only.

This utility has the following format:

restartsvc <arglist>
arglist

Consists of the following 11 arguments. You must provide all of the following arguments for successful execution:

arg 1

Specifies the Windows service to restart.

arg 2

Specifies the empire trap type.

arg 3

Specifies the process monitoring entry index.

arg 4

Specifies the process monitoring entry description.

arg 5

Specifies the process monitoring entry attribute.

arg 6

Specifies the process monitoring entry operator.

arg 7

Specifies the process monitoring entry current value.

arg 8

Specifies the process monitoring entry threshold value.

arg 9

Specifies the process monitoring entry flags.

arg 10

Specifies the process monitoring entry regular expression.

arg 11

Specifies the process monitoring entry service index from the NT Service table.

Examples

The following example invokes restartsvc.exe in a sysedge.cf entry:

watch process procAlive 'testsvc|TESTSVC' 2000 0x8 30 'testsvc restart' '%CASYSEDGE%\bin\restartsvc.exe c:\testsvc.exe'

You can also invoke restartsvc.exe on the command line. The following example restarts process ID 125:

"%CASYSEDGE%\bin\restartsvc.exe" c:\testsvc.exe 10 2000 "testsvc restart" 1 3 6 4 0x8 "testsvc|TESTSVC" 125