Infrasctucture Sys Function Reference
Sys
The sys layer is used to initiate and control one or more sub processes.    A system of processes is defined in a configuration file (see config layer).

Under Construction.

The System Wide keywords supported:
TCP Define a tcp port.   Must have logical port name, hostname, port, [encryption type, and encryption key]. See Io layer configuration.

BINDIR Directory where binaries can be found.


LOGDIR Directory where trace and error logs are written.


CAGSERVER Name or address of the CAG server.   If a logical port name is used, it must be defined using the TCP. directive.   See Io layer configuration.

CAGGROUP

CAGHOST

PROCPORT IO port for the (usually first) process. Other process ports will increment this value. If this appears anywhere but at the beginning of the config file, it will reset the process port number.

RETRYDLY When a process running under sysgo dies it is restarted unless NO_RESTART is set. When the process has died 6 times it is assumed to have a configuration error so it is not restarted after the 6th death. If RETRYDLY is set to non-zero, this is used as a count of seconds to wait before beginning the start/restart sequence again. This is so that if a sub-process is waiting for something like a remote server to be availble, a longer time may be provided between retrys.

STARTUPDELAY

CHILD

PROC

INCLUDE Include another config file at this point.

FOREGROUND Sysgo will remain in the foregroun instead of becomming a daemon. This is used for running under init.

BRUTEFORCEKILL

BOOTDELAY Delay this many milliseconds before starting processes.

The Individual Process keywords supported:

NO_RESTART If this process dies (or exits), don't automatically restart it.

NO_AUTOSTART Do not automatically start the process (infCtl may be used to start it).

CLONE_OK Enable cloning of a process.

CLONE N Manually (via config) clone a process N times.

RESTART_OK The default, restart any processes which dies.

RETRYDLY If a sub-process dies it is restarted up to 6 times within one minute. After these six restarts, it is not restarted again unless RETRYDLY is non-zero in which case RETRYDLY is used a a count of delay seconds until the six restarts are tried again.

HIDE_NAME For use on some unix systems (HP-UX) and some applications (Progress).

SOFT_KILL Use SIGTERM to kill the process. Normally SIGKILL is used.

SRVSYNC [arg] This allows the current process to get up and stabilize before starting other processes. Wait "arg" milliseconds for the process to "call-home" after start and before starting next process. If "arg" is ommitted, wait 9000 miliseconds (1 Sec). Minimum wait time is 100 MS.

TRCD

PORT

USER Run this process as the indicated user id.

PERMS Run this process with the indicated permissions.

UNIXENV

CAGPRIO The tool which initiates a system is "sysgo"


syDaemon syInit syMakPath syStart syStop

int syDaemon( )
Calling this will transmogrify the current process into a daemon.


int syInit( int argc, char* argv[] )
Initializes the system control layer, runs infInit (read config file).


int syMakPath( char* path )
Create all directories in path "path".


int syStart( )
Stars the sub-system, all process that are not prohibited are started. Processes from previous incarnations of the system will be re-acquired as children.


int syStop( )
All running sub-processes are stopped.