Running the xgtd server

The server component of the xGT application is called xgtd. It is a linux daemon and is launched automatically at linux boot. You can examine and control the daemon using standard linux utilities:

sudo systemctl status xgtd
sudo systemctl stop xgtd
sudo systemctl start xgtd
sudo systemctl restart xgtd

Data considerations

The default location for xgtd to read and write data is the /srv/xgtd/data directory.

You can copy data to the this home directory or organize data into subdirectories. The load() method in the xgt python module will accepts a path name as one of the parameters.
When the path is a relative path, the server will look for the file name (or names, if wildcards are provided) in the default location.

The save() command uses the same default location.

To learn more about loading and saving, read the data management guide.

Configuring xgtd

Some parameters of xGT can be configured with a JSON-formatted configuration file xgtd.conf located in the computer where the user is running the server process.

The folowing variables for configuring xGT are supported:

Example xgtd.conf file:

{
  "worker_threads" : 4,
  "pin_threads" : false,
}

To configure xGT on AWS, login to the server and create the file /etc/xgtd.conf or the file /home/xgtd/.xgtd.conf. The system will first look for the file /home/xgtd/.xgtd.conf, and if unsuccessful, it will look for the file /etc/xgtd.conf.

Then you would restart xGT daemon:

sudo systemctl restart xgtd

S3 Credentials

When loading a file using the load method and an s3: protocol prefix, xGT will check the /home/xgtd/.aws/credentials file for the two variables aws_access_key_id and aws_secret_access_key. The online AWS Access Keys document explains what these keys are and contains references to learn how to create and manage them. (These values may also be specified at runtime in user code by passing them to a Connection object.)

When reading the /home/xgtd/.aws/credentials file, xGT also supports profile selection via the AWS_PROFILE environment variable. If no environment variable is found, xGT will use the default profile.