Running the Gateway daemon as a background process

On UNIX and Linux you can run the Gateway daemon as a background process with preset options defined in ctg.ini or you can specify override options using the ctgd command.

If the Gateway daemon runs as a background process you can complete the following tasks:

To start the Gateway daemon as a background process use the ctgd command. For more information about ctgd see the ctgd command reference. ctgd must be run as the root user. To configure ctgd to be called during the startup and shutdown of your operating system, add a symbolic link to <install_path>/bin/ctgd in the appropriate directory, or edit /etc/inittab. For more information see your operating system documentation.

If the Client daemon is not already started, it is started automatically by the ctgd command before the Gateway daemon is started.

If a local administration port has not been explicitly configured, the Gateway daemon listens for administration requests on the default port. For more information see Port for local administration. The ctgd command does not use the port specified in the Gateway daemon configuration file.

Configuring the ctg.ini file

When the Gateway daemon is run in the background the Gateway daemon log destination must be set to file. For example:
log@info.dest=file
log@info.parameters=filename=/var/cicscli/cicstg.log;maxfiles=1;filesize=0;

log@error.dest=file
log@error.parameters=filename=/var/cicscli/cicstg.log;maxfiles=1;filesize=0;

Defining the ctgd.conf configuration file

Create a valid ctgd configuration file. Copy the sample file <install_path>/samples/configuration/ctgdsamp.conf and edit the file copy. For information about the configuration file parameters, see ctgd command reference.

The default location and name for the ctgd configuration file is <install path>/bin/ctgd.conf.

Use the environment variable CTGDCONF to specify an alternative configuration file for the ctgd process. For example:
export CTGDCONF=/etc/cicstg/cicstgd.conf

Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//ctgunx/unixservice.html