gagent

Overview of gagent

Definition

gagent is a utility communicating with glocator  by being executed with each member node in GOLDILOCKS cluster system.
When CLUSTER_SPLIT_BRAIN_RESOLUTION_POLICY server property value of the node to which gagent belongs is set to 1 or 2, and the connection between nodes is disconnected so the cluster failover is proceeding, then gagent enquires to glocator the validity of the node to which the gagent belongs.
For more information, refer to Cluster Failover.

Usage

gagent [options]

Options

help

Description

It outputs the help message.

Example

$ gagent --help

Usage:
 gagent [options]

Options:

-s  --start                        Start gagent
-t  --stop                         Stop gagent
-u  --status                       Get gagent status
-f  --conf                         Set configure file
-o  --home                         gmaster home path
-l  --silent                       Suppress display message
-r  --no-copyright                 Suppress display copy right and version
-h  --help                         Print help message

start

Description

It starts gagent. If gagent having the same home directory already has been started, then an error occurs.

Example

$ gagent --start

gagent is started.

stop

Description

It stops gagent which is in operation. The same home directory should be set to stop gagent in operation.

Example

$ gagent --stop

gagent is stopped.

status

Description

It outputs the status message of gagent which is in operation. The same home directory should be set to check the status of gagent in operation.

Example

$ gagent --status

gagent(31938) is running.

conf

Description

It sets the configure file when starting gagent.

Example

$ gagent --start --conf goldilocks.gagent.conf

gagent is started.

home

Description

It sets the server home directory of GOLDILOCKS when starting gagent.
When a relative path is used, it searchs for the home directory based on <GOLDILOCKS_DATA>.
<GOLDILOCKS_DATA> is replaced with the environment variable value of $GOLDILOCKS_DATA.

Example

$ gagent --start --home g1n1_home --conf goldilocks.gagent.conf  

gagent is started.

In the example above, gagent is started by setting <GOLDILOCKS_DATA>/g1n1_home to home.

silent

Description

It does not output the message of gagent about the execution.

Example

$ gagent --start --silent

no-copyright

Description

It does not output the message of gagent's copyright and version about the execution.

Example

$ gagent --start --no-copyright

gagent is started.

gagent Configuration

Configuration File and Environment Variable

gagent can use a file or environment variable to set the configuration.

An environment variable can be set by using the name of which 'AGENT_' is added as a prefix to a configuration property name. For example, setting HOST in the configuration file has the same effect as specifying $AGENT_HOST.

The contents of a configuration file takes precedence over the environment variable setting values.

gagent has $GOLDILOCKS_DATA/conf/goldilocks.gagent.conf file as its environment file. To alter the driving environment of gagent, the file contents should be altered, or gagent should start after setting the environment variables.

Configuration Properties

HOST

Item

Description

Name

HOST

Description

It is an IP address of which gagent binds.

Data type

ip address (ip v4)

Default value/ range

0.0.0.0

It is an IP address of which gagent binds for UDP communication.
It uses an IP address in IP v4 form.

REQUEST_PORT

Item

Description

Name

REQUEST_PORT

Description

It is a port which gagent uses for request.

Data type

INT

Default value/ range

43581 / 1024~49151

It is a port of which gagent uses to request to glocator during tcp communication.
The port from 1024 to 49151 can be used.

RESPONSE_PORT

Item

Description

Name

RESPONSE_PORT

Description

It is a port which gagent uses for response.

Data type

INT

Default value/ range

43582 / 1024~49151

It is a port of which gagent uses to receive the response from glocator during tcp communication.
The port from 1024 to 49151 can be used.

LOCATOR_HOST

Item

Description

Name

LOCATOR_HOST

Description

It is an IP address of glocator.

Data type

ip address(ip v4)

Default value/ range

0.0.0.0

It is an IP address of glocator.

LOCATOR_PORT

Item

Description

Name

LOCATOR_PORT

Description

It is a port of which glocator waits for Recv.

Data type

INT

Default value/ range

42581 / 1024~49151

It is the port of glocator of when gagent sends packets to glocator.
The port from 1024 to 49151 can be used.

SYSTEM_LOGGER_DIR

Item

Description

Name

SYSTEM_LOGGER_DIR

Description

It is the directory path of gagent trace log file.

Data type

String

Default value/ range

<GOLDILOCKS_DATA>/trc

It is the directory path in which system trace log file of gagent is stored. <GOLDILOCKS_DATA> of the default value is replaced with the environment variable value of $GOLDILOCKS_DATA.

SYSTEM_UDS_DIR

Item

Description

Name

SYSTEM_UDS_DIR

Description

It is the directory path of Unix Domain Socket file in gagent.

Data type

String

Default value/ range

/tmp (Maximum 50 bytes)

It is the directory path to store Unix Domain Socket file in gagent. The default value is /tmp. The maximum length of the directory should be set within 50 bytes.

ALTERNATE_LOCATORS

Item

Description

Name

ALTERNATE_LOCATORS

Description

It sets the alternate locators.

Data Type

String

Default value/ range

empty / 0 ~ 1024

If glocator set in gagent does not respond, then it proceeds to process the operation by replacing with an alternate locator.

The following is an example of a configure file which used ALTERNATE_LOCATOR.

[AGENT]
PORT=43581
LOCATOR_HOST=127.0.0.1
LOCATOR_PORT=42581
ALTERNATE_LOCATORS=(LOCATOR1,LOCATOR2)

[LOCATOR1]
HOST=127.0.0.1
PORT=42582

[LOCATOR2]
HOST=127.0.0.1
PORT=42583

KEEPALIVE_IDLE_TIME

Item

Description

Name

KEEPALIVE_IDLE_TIME

Description

tcp keepalive idle time for checking dead client session (sec)

Data type

INT

Default value/ range

1 / 1 ~ 16383

It is the (idle) duration which the TCP packet is not sent nor is received before sending a keep alive packet. In other words, if TCP packet is not exchanged during the time set in KEEPALIVE_IDLE_TIME, then it performs the keep alive mechanism to detect the dead connection.

KEEPALIVE_COUNT

Item

Description

Name

KEEPALIVE_COUNT

Description

tcp keepalive check count

Data type

INT

Default value/ range

5 / 1 ~ 10

It is the number of performing keep alive mechanism.

KEEPALIVE_INTERVAL

Item

Description

Name

KEEPALIVE_INTERVAL

Description

tcp keepalive packet interval (sec)

Data type

INT

Default value/ range

5

It is the time interval to send the keep alive packet.