daemon & batch syntax
The syntax for the creation & update of daemon & batch.
All words should be on the same line, they are shown split below
purely for convenience. The initial keyword should
be DAEMON or BATCH followed by the daemon or
batch logical name. This is then followed by the various options
which are the same for DAEMON or BATCH.
Syntax
DAEMON daemon_name
[GROUP group_name]
[LEVEL program_level]
[EXE binary_name]
[COPIES number_of_copies]
[ACTIVE active_flag]
[EXCLUSIVE exclusive_flag]
[ENVIRONMENT environment_file]
[PIDFILE pidfile_name]
[PIDTRACK pidtrack_flag]
[STDERR error_file]
[STDOUT output_file]
[STARTUP startup_delay]
[SPAWN_LIMIT spawn_limit]
[SPAWN_WINDOW spawn_window]
[SPAWN_HOLD spawn_hold]
[PARAMS parameters]
The details for these options follows
- GROUP group_name
- gives the logical group name for this program. This is purely
for visual convenience.
Defaults to not set.
- LEVEL program_level
- a number giving the program level (used to determine LEVEL membership).
Defaults to 0.
- EXE binary_name
- gives the name of the binary to run. Can be a fully qualified path,
otherwise the PATH will be searched
Defaults to the program name.
- COPIES number_of_copies
- number giving number of copies to run.
Defaults to 1
- ACTIVE active_flag
- a logical value (TRUE/FALSE) which determines whether the program
is active or not.
Defaults to FALSE.
- EXCLUSIVE active_flag
- a logical value (TRUE/FALSE) which determines whether the program
has exclusive access to a finite resource. If set, watchdog will
wait until a dying program has completed before attempting to start
a new insatnce.
Defaults to FALSE.
- ENVIRONMENT environment_name
- if present, overides the configuration file value of
ENVIRONMENT
- PIDFILE pidfile_name
- If used, gives the location of a file containing an ASCII string which gives
the pid of the running program. Forces COPIES to be set to 1.
- PIDTRACK pidtrack_flag
- a logical value (TRUE/FALSE) which, if set, specifies that the
program should be tracked by remembering the result of the fork()
function.
- STDERR error_file
- if present, overides the value of
NEWSTDERR
- STDOUT output_file
- if present, overides the value of
NEWSTDOUT
- STARTUP output_file
- if present, overides the configuration file value of
START_HYSTERESIS
- SPAWN_LIMIT spawn_limit
- if present, overides the configuration file value of
SPAWN_LIMIT
- SPAWN_WINDOW spawn_limit
- if present, overides the configuration file value of
SPAWN_WINDOW
- SPAWN_HOLD spawn_limit
- if present, overides the configuration file value of
SPAWN_HOLD
- PARAM parameters
- gives the command line parameters to be used when starting
program.
NB: This option differs from the above in that the remainder of the line
is regarded as the parameter set.
Examples
DAEMON ctsd GROUP daemon LEVEL 200 EXE ctsd ACTIVE TRUE PARAMS -f $HOME/config/cts.cfg
DAEMON c0250-1A-A GROUP 1A-A LEVEL 1100 EXE rvc0250 ACTIVE TRUE PARAMS -f $HOME/config/c0250.cfg
BATCH tidyup GROUP daemon LEVEL 10 EXE tidyup ACTIVE FALSE PIDTRACK TRUE