gagent

Overview of gagent

Definition

gagent is a utility communicating with glocator  by being executed with each member node in GOLDILOCKS cluster system.

gagent can provide location information of a local node to glocator. For the consistency of location information, glocator should be executed ahead of gagent.

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.

PORT

Item

Description

Name

PORT

Description

It is a port of which gagent waits for Recv.

Data type

INT

Default value/ range

43581 / 1024~49151

It is a port of which gagent receives a packet through UDP 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.

COMMAND_QUEUE_SIZE

Item

Description

Name

COMMAND_QUEUE_SIZE

Description

It is the queue size in which received packets are stored before processing them.

Data type

INT

Default value/ range

1048576 / 1048576~2147483648

It is the size of queue of which gagent stores packets received from glocator before processing them.
Packets are stored as an item of a command unit in a queue.

COMMAND_ALLOCATOR_SIZE

Item

Description

Name

COMMAND_ALLOCATOR+SIZE

Description

It is the size of an allocator which allocates an item to be stored in a command queue.

Data type

INT

Default value/ range

1048576 / 1048576~2147483648

It is the size of an allocator which is used to allocate an item (command) to be stored in a command queue.

PACKET_ALLOCATOR_SIZE

Item

Description

Name

PACKET_ALLOCATOR+SIZE

Description

It is the size of an allocator which allocates a packet when receiving packets through UDP communication.

Data type

INT

Default value/ range

1048576 / 1048576~2147483648

It is the size of an allocator for a buffer which is allocated for gagent to receive packets.

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.

UPDATE_LOCATION_TIME

Item

Description

Name

UPDATE_LOCATION_TIME

Description

It sets the cycle for gagent to update its location information to glocator.

Data type

Int

Default value/ range

120 / 30~2147483648 (second unit)

It sets the cycle for gagent to update its node location information to glocator.

SESSION_TIMEOUT

Item

Description

Name

SESSION_TIMEOUT

Description

It sets the maximum time for gagent to wait to receive packets.

Data type

Int

Default value/ range

60 / 0 ~2147483648 (second unit)

It sets the maximum time (seconds) for gagent to wait to receive packets. Packets exceeds the maximum time without being processed, are dumped.

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