c-treeRTG for isCOBOL : Configuring the c-tree Server
Configuring the c-tree Server
The c-tree Server looks for a file called ctsrvr.cfg located in the config directory. If this file is missing, the default settings are used.
It’s possible to use an alternate configuration file through the command line option CTSRVR_CFG.
Example for Windows:
faircom.exe CTSRVR_CFG C:\etc\customer1.cfg
Example for Unix/Linux:
./faircom CTSRVR_CFG /etc/customer1.cfg
Keywords in the configuration file must be followed by a value and are not case-sensitive.
Commented lines have a semicolon as first digit.
The table below lists configuration keywords included in the default ctsrvr.cfg file installed with c-tree..
CONNECTIONS
The maximum number of connections to the c-tree Server. Typically, servers are activated to support up to one of the following values for concurrent user connections: 8, 16, 32, 64, 128, 256, 512, or 1024. However your particular c-tree Server may be customized with a different value for connections.
COMM_PROTOCOL
Specifies a communications module loaded by the Server.
Possible values:
 
F_TCPIP
F_TCPIPV6
FSHAREMM
DISABLE
 
If no protocol is specified, then the default system communication protocol is used.
 
An application can override the default protocol by specifying the protocol in the connection string with the following syntax:
FAIRCOMS@myhost^F_TCPIP
or
FAIRCOMS@myhost^F_TCPIPV6
 
The c-tree Server can support TCP/IP and shared memory simultaneously. For example, the server could be communicating with some users locally through shared memory and others using TCP/IP over an Ethernet connection. Each protocol to be loaded by the c-tree Server requires a separate COMM_PROTOCOL line in the configuration script. The following example loads TCP/IP and Shared Memory Model protocols:
COMM_PROTOCOL F_TCPIP
COMM_PROTOCOL FSHAREMM
SUBSYSTEM COMM_PROTOCOL SSL
Enables SSL communication. The following entries are required:
SERVER_CERTIFICATE_FILE to specify the path to the pem file
SSL_CONNECTIONS_ONLY to specify if only SSL is accepted or standard connections are accepted as well.
 
Example:
 
SUBSYSTEM COMM_PROTOCOL SSL {
SERVER_CERTIFICATE_FILE ctree_ssl.pem
SSL_CONNECTIONS_ONLY YES
}
COMPATIBILITY TCPIP_CHECK_DEAD_CLIENTS
When this flag is present, the c-tree server recognizes when a connection between the client and the server, for some reason is lost.
The c-tree server can automatically remove the connection and release the files and records related with the lost connection. See also DEAD_CLIENT_INTERVAL <seconds>.
DAT_MEMORY
The memory allocated to the data cache, in bytes.
 
It’s possible to measure this settings in Kilobytes, Megabytes or Gigabytes by specifying the KB, the MB and the GB suffix respectively.
For example, the following values are equivalent:
200 MB
204800 KB
209715200
 
The maximum value is 1 GB.
 
The default value is 100 MB.
DELAYED_DURABILITY
When specified with a value greater than 0, the c-tree Server does not sync its log buffer simply because a transaction commits. Instead, it syncs the log buffer if it becomes full, or if a write to the data cache requires the log buffer to be flushed to disk, or if the maximum defer time in seconds specified by this keyword is exhausted.
LOG_SPACE
The size of the transaction log.
DEAD_CLIENT_INTERVAL <seconds>
The number of seconds of client idle time after which the server checks the connection for that client. The default nsec value is 1800 (30 minutes), with a minimum of 120 (2 minutes).
 
COMPATIBILITY TCPIP_CHECK_DEAD_CLIENTS is required to enable the checking. Otherwise, no check is made.
FILES
The maximum number of data files and indices where each index counts toward this total. For example, an index file which supports (i.e., contains as separate index members) three different keys counts as three files towards the FILES total.
 
Every time the c-tree server opens a new file, the counter is increased. If the c-tree server opens the same file for different clients, instead, the counter is not increased.
 
The default value is 1000.
IDX_MEMORY
The memory allocated to the index cache, bytes.
 
It’s possible to measure this settings in Kilobytes, Megabytes or Gigabytes by specifying the KB, the MB and the GB suffix respectively.
For example, the following values are equivalent:
200 MB
204800 KB
209715200
 
The maximum value is 1 GB.
 
The default value is 100 MB.
MAX_DAT_KEY
Maximum number of indices per data file.
 
The default value is 64.
MAX_KEY_SEG
Maximum number of key segments allowed per index.
 
The default value is 16.
MAX_FILES_PER_USER
The maximum number of data files and indices (where each index counts toward this total) per client connection.
 
The default value is 2048.
PAGE_SIZE
The number of bytes per buffer page in bytes. Only the following values are accepted (all other values generate an error):
1024
2048
4096
8192
16384
32768
65536
 
A file created with a larger PAGE_SIZE cannot be opened by a server with a smaller PAGE_SIZE.
 
The default value is 32768 in v12 and later (before v12, the default was 8192).
SERVER_NAME
A name assigned to c-tree Server, instead of the default name.
 
The default value is FAIRCOMS.
SERVER_PORT
A port assigned to c-tree Server, instead of the default port.
 
The default value is 5597.
SERVER_DIRECTORY
Working directory of the c-tree Server. This directory is used to resolve all relative paths of c-tree files. By default the working directory is the directory in which the c-tree Server has been started.
LOCAL_DIRECTORY
Base directory for c-tree files. This directory is used to resolve all relative paths of c-tree files. If LOCAL_DIRECTORY is a relative path, then it‘s appended to SERVER_DIRECTORY. If omitted, only SERVER_DIRECTORY is used to resolve relative paths of c-tree files.
CONSOLE NO_SHUTDOWN_PROMPT
If present, ctsrvr will not prompt for administrator password when closed (Windows only).
CONSOLE TOOL_TRAY
If present, ctsrvr will start minimized in the system tray (Windows only).
SQL_DATABASE
Name of the database. By default this entry is set to "ctreeSQL". Database files are automatically created during the first startup. This name must be used by ctutil -sql* op-codes and external SQL tools to connect and operate with isCOBOL ISAM Server.