Table of Contents
This chapter describes how to set each environment variable.
The configuration file defines the environment of a single Tmax domain. A domain is a single independent Tmax system that can be made up of multiple nodes (machines). Domain settings include the maximum number of simultaneous users, time-out values, service processing times, etc.
Each node in the domain can be configured separately. Node settings include the maximum number of simultaneous users, the location of Tmax programs, the location where application programs are processed, etc.
Server groups can also be configured separately. A server group is made up of multiple server processes that provide application services, and it allows administrators to manage multiple server processes as a single unit. The server group settings include database access variables, load balancing variables, and fault tolerance variables.
Configuration is also required for application server processes (command line options and the number of servers) that actually process client requests, services (service priorities and service timeout values), and routing (distributed processing across a server group based on the type and range of data). Gateway settings that allow inter-domain service processing can also be configured.
The configuration file contains a total of nine elements:
DOMAIN
NODE
SVRGROUP
SERVER
SERVICE
GATEWAY
ROUTING
RQ
HMS
Elements are in hierarchical relationships of a tree structure. There is a domain at the root of the tree for the entire system environment. A domain contains one or more nodes, a node contains one or more server groups, a server group contains one or more servers, and an application server process contains one or more services.
The following figure shows the relationships.
The nine elements of the Tmax environment file include: DOMAIN, NODE, SVRGROUP, SERVER, SERVICE, GATEWAY, ROUTING, RQ, and HMS. The first five elements must be configured by the administrator, but GATEWAY, ROUTING, RQ, and HMS are optional.
The following is an example of an environment file.
*DOMAIN res1 SHMKEY = 77990, MINCLH = 1, MAXCLH = 3, MAXUSER = 100, TPORTNO = 8888, BLOCKTIME = 100 *NODE tmax1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/log/slog", TLOGDIR = "/home/tmax/log/tlog", ULOGDIR = "/home/tmax/log/ulog" *SVRGROUP svg1 NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc = P/tmax/tmax+SesTm = 60" svg2 NODENAME = tmax1 *SERVER svr1 SVGNAME = svg1, CLOPT ="-A -- -f aa -x bb" svr2 SVGNAME = svg2 *SERVICE SVC1 SVRNAME = svr1 SVC2 SVRNAME = svr2
The following is the syntax of an element and an item.
Element
Each element is defined as follows:
* Element Name Item 1 = .… , Item 2 = .… , Item 3 = ....
Item
An item of each element is defined as follows. An item must be defined in the form of 'Item Name = Value'.
Item = Type (default value) Range or Size Settings
Each item value must be one of the following four types (item names cannot be used as values).
Item Value | Description |
---|---|
numeric | Number |
string | abc type string |
literal | "abc" type string |
Y | N | Yes or No |
Y | B | N | Yes, Both, or No |
Configuration file must follow these guidelines:
Each element name must be capitalized and begin with an asterisk (*).
Each element name or item name must be placed in the first column.
Only the element and item names can be in the first column.
Each item of an element must be separated by a comma (,). If a comma is missing, it will indicate the end of the element and any subsequent items will be ignored.
The order of defining elements is not fixed, and the order of elements is not important. Each element can be divided and defined in different places. For example, each node's server groups, servers, and services can be defined separately. Note that a setting must be only defined once.
Empty spaces between items are ignored.
Default values are used for undefined items.
The environment file is accessed whenever Tmax starts or shuts down. The system will not operate if the configuration file is flawed or nonexistent. Thus, setting up the Tmax environment file is one of the most important responsibilities of the administrator.
The environment file is divided into nine sections:
Basic settings
Basic settings of Tmax system. Five most essential elements are DOMAIN, NODE, SVRGROUP, SERVER, and SERVICE. The user can additionally configure the GATEWAY element for inter-domain service processing, ROUTING element for routing options, etc.
Database, transaction, load balancing, fault tolerance, and security settings are based on the basic settings.
Database settings
Database related settings used for database management.
Distributed transaction settings
Transaction settings for distributed transaction processing in Tmax.
Load balancing settings
Settings that define load balancing between nodes. The element will also contain a detailed description of ROUTING.
Reliable queue settings
RQ settings for enabling uninterrupted processing of transactions after system recovery due to a system failure.
HMS settings
Settings for enabling delayed data processing by providing the ability to distinguish between the time the message is sent and received, and ensuring reliability for message transmission.
Fault tolerance settings
Settings for fault tolerance that allows service processing to be forwarded to another node when the current node fails.
Security settings
Security feature settings.
Multi domain settings
Inter-domain routing settings for a multi-domain system.
This section of the chapter will explain how to configure five of the nine elements (DOMAIN, NODE, SVRGROUP, SERVER, and SERVICE) described in the previous section, as well as the GATEWAY element for multi-domain service processing and the ROUTING element.
The DOMAIN element configures the basic settings for an independent domain. If the system contains multiple domains, the GATEWAY element of the file will be used to configure settings for inter-domain service processing.
The DOMAIN element consists of the following settings:
Shared-memory key value
Number of startup CLH processes, and the maximum number of simultaneous CLH processes allowed
Maximum number of clients that can simultaneously access the system
Port number of the domain
Period of time that a client waits for a response to a service request before being disconnected
The DOMAIN element settings are used by all the nodes of the system. Some of the settings can be redefined in the other four essential elements (e.g., NODE). If a setting is defined multiple times in the configuration file, the bottom-most setting takes precedence (e.g., NODE > DOMAIN).
The following is the basic outline of the DOMAIN element.
*DOMAIN [DEFAULT : ] Domain Name SHMKEY = shared-memory-segment-key, [MAXUSER = 1 ~ MAX_INT,] [MINCLH = 1 ~ 10,] [MAXCLH = 1 ~ 10,] [TPORTNO = port-number,] [RACPORT = port-number,] [BLOCKTIME = timeout-value,] [CPC = channel-number] [MAXFUNC = max-function-number,] [LOGOUTSVC = logout-service-name,] [CLICHKINT = interval-time-value,] [IDLETIME = idle-time,] [MAXSACALL = numeric,] [MAXCACALL = numeric,] [TXTIME = transaction-timeout-value,] [NLIVEINQ = alive-check-interval,] [NCLHCHKTIME = interval-time-value,] [MAXCONV_NODE = numeric,] [MAXCONV_SERVER = numeric,] [SECURITY = ("NO_SECURITY") | "DOMAIN_SEC" | "USER_AUTH" | "ACL" | "MANDATORY" ,] [OWNER = name,] [IPCPERM = mask,] [DOMAINID = numeric,] [CMTRET = literal,] [MAXNODE = numeric,] [MAXSVG = numeric,] [MAXSPR = numeric,] [MAXSVR = numeric,] [MAXSVC = numeric,] [MAXCPC = numeric,] [MAXTMS = numeric,] [MAXROUT = numeric,] [MAXROUTSVG = numeric,] [MAXRQ = numeric,] [MAXGW = numeric,] [MAXCOUSIN = numeric,] [MAXCOUSINSVG = numeric,] [MAXBACKUP = numeric,] [MAXBACKUPSVG = numeric,] [MAXTOTALSVG = numeric,] [MAXPROD = numeric,] [GWCHKINT = interval-time-value,] [GWCONNECT_TIMEOUT = interval-time-value,] [TMMLOGLVL = tmm-log-level,] [CLHLOGLVL = clh-log-level,] [TMSLOGLVL = tms-log-level,] [LOGLVL = server-log-level,] [CRYPT=Y|(N),] [MAXTHREAD = numeric,] [TDL = Y|(N),] [MAXSESSION = numeric] [TXPENDINGTIME = pending-transaction-timeout] [CLIENT_IPV6 = Y|(N)] [SYSTEM_IPV6 = Y|(N)] [EXTSVR_IPV6 = Y|(N)] [CLL_BIND_IP = (Y)|N] [FDL_VERSION = 1 | 2,]
Domain Name = string
Range: a string of up to 15 characters.
The DOMAIN element configures settings for the overall Tmax environment.
SHMKEY = numeric
Range: 32768 ~ 262143
Value of the pointer that points to a shared memory segment. Tmax has four main processes: Tmax Manager TMM that manages other processes, TMS that manages databases and resources, CLL that manages client connections, and CLH that processes requests and responses between clients and server processes.
SHMKEY configures shared memory key value for managing the information shared by the four processes. Tmax uses the four key values, SHMKEY, SHMKEY+1, SHMKEY+2, and SHMKEY+3, in the order listed.
Make sure to verify that the key values are not used for other applications. In order to prevent conflicts, all key values, whether used or not, must be defined.
DEFAULT
Can be used in all elements of the environment file. For details, refer to "DEFAULT in 3.2.2 NODE".
MAXUSER = numeric
Range: 1 ~ MAX_INT
The maximum number of clients that can be simultaneously connected to the domain. The actual number of connections allowed is MAXUSER +1.
MINCLH = numeric
Range: 1 ~ 10
Default: 1
The minimum number of startup CLH processes.
The CLH is used to forward client requests to the appropriate server process, and to return the results back to the client. Every client must be connected to CLH, but the number of clients that can connect to a single CLH is limited. Thus, a large domain with a large volume of clients should run more than one CLH instance by setting a suitable MINCLH value.
MAXCLH = numeric
Range: 1 ~ 10
Default: 10
The maximum number of active concurrent CLH processes allowed. When Tmax is started, MINCLH number of CLH processes are activated. Additional CLHs can be activated if the number of client requests exceeds the capacity of the active CLHs.
The total number of active CLH instances cannot exceed the MAXCLH value. Currently, Tmax does not automatically increase the number of MAXCLH processes according to the number of client requests.
TPORTNO = numeric
Default: 8888
Port number used by clients to connect with Tmax. Two port numbers are used: TPORTNO and TPORTNO+1.
The TPORTNO value will be used for connections between clients and servers, while TPORTNO+1 will be used for inter-node communication. In a client/server environment, clients need to know the server address as well as the port number of Tmax.
The address (TMAX_HOST_ADDR) and port number (TMAX_HOST_PORT) must be set on the client side. The port number must be set to TPORTNO. If the client and server are both on the same node, it is recommended to use the domain socket instead of the TCP/IP socket to achieve more efficient connections.
Servers are capable of receiving two types of client connections: TPORTNO is used for TCP/IP socket connections. If the client and server exist on the same node, stream pipe (cllrcad) is used according to the PATHDIR setting.
If the client and server are both on the same node, TMAX_HOST_PORT must be set to PATHDIR instead of TPORTNO. For example, set TMAX_HOST_PORT=/home/tmax/path in .profile or tmax.env.
TMAX_HOST_PORT=/home/tmax/path
TPORTNO+1 can also be used for inter-node communication.
Nodes in the Tmax system are connected in a peer-to-peer relationship. By using the port number TPORTNO+1, subsequent nodes will be checked in the order they are configured. Port numbers less than 1024 should not be used since they are reserved for system use.
Since the port numbers, TPORTNO and TPORTNO+1, are used for communication between a client and Tmax as well as between nodes, check that these values are not used anywhere else. In addition, for multi-node systems, the number of specified port numbers must match the number of CLHs. There must be a separate port number for each CLH.
To use the IPv6 protocol, CLIENT_IPV6 must be set to Y.
RACPORT = numeric
Default: 3333
Port number used by racd for inter-node communication and centralized node management in a multi-node domain. The port number must be same as the TMAX_RAC_PORT port number. Port numbers less than 1024 should not be used since they are reserved for system use.
If the values specified here and in TMAX_RAC_PORT are different, only the TMAX_RAC_PORT value will be used. It is recommended to use a lower value for RACPORT than TPORTNO. Make sure that the port numbers specified in RACPORT are not used anywhere else.
BLOCKTIME = numeric
Range: 1 ~ MAX_INT
Default: 0 (seconds)
If no value is set, by default requests will infinitely wait for a response.
Time-out value for service requests. If a service request issued by a client fails to receive a response within the specified time frame, the request will time-out on the client side. However, the server process will continue to process the request.
To terminate the service on the server side, set the desired time-out period in SVCTIME of the SERVICE element. BLOCKTIME is strongly linked to SVCTIME. The shorter time value between BLOCKTIME and SVCTIME is used as timeout for client tpcall. BLOCKTIME is the tpcall timeout value, and SVCTIME is the server process timeout value. In general, BLOCKTIME value is greater than SVCTIME value.
CPC = numeric
Range: 1 ~ 128
Default: 1
The number of channels of CLH processes on a node in multi-node systems. In systems with large volumes of inter-node service requests or that process large volumes of distributed transactions, too few number of channels may slow down service processing. For optimal system performance, use an adequate number of parallel communication channels.
MAXFUNC = numeric
Range: 1 ~ MAX_INT
Default: 0
If not specified, the default value is set, and the function is not used.
Size of the function table require for TopEnd system functions in Tmax system when converting a TopEnd system to a Tmax system.
LOGOUTSVC = service-name
Registers services to be processed in normal or abnormal state with the client logout process of Tmax server.
Used for normal client logouts when logging in or out of a service. Handles the case where clients are automatically logged out when a preset time (CLICHKINT, IDLETIME) expires.
Note that this variable only runs on Tmax clients. It does not run when using a general socket connection. For programs that use the service name, client IDs can be obtained by calling tpgetclid(). Refer to CD of tpsvcinfo structure to determine the cause of the logout.
Value | Description |
---|---|
TPNOAUTH(0) | Normal client logout |
TPSYSAUTH(1) | Logout detected by Tmax (e.g., network, etc.) |
TPAPPAUTH(2) | Abnormal logout (e.g., data reception failure, etc.) |
CLICHKINT = numeric
Range: 1 ~ MAX_INT
Default: 0
If not specified, the default value is set, and the function is not used.
The time interval at which clients are monitored. CLICHKINT must be used in conjunction with IDLETIME to minimize resource waste.
If CLICHKINT is configured in the DOMAIN element, all clients connected to the domain are monitored. However, if it is configured in the NODE element, only those clients that are connected to the node are monitored.
IDLETIME = numeric
Range: 1 ~ MAX_INT
Default: 0
If not specified, the default value is set, and the function is not used.
Time period that clients can remain idle before being automatically disconnected from the system. If CLICHKINT is set to 5 and IDLETIME is set to 30, clients will be monitored every 5 seconds (CLICHKINT) and if they do not issue any service requests within 30 seconds (IDLETIME), they will be disconnected from Tmax system.
Clients will be monitored from the time tpstart() is called to make a connection, or when tpcall()/tpacall() is requested. The value of IDLETIME must be set to a value greater than BLOCKTIME and SVCTIME. If IDLETIME is set to a value less than either BLOCKTIME or SVCTIME value, clients will automatically be disconnected before they receive a response.
MAXSACALL = numeric
Range: 1 ~ 1024
Default: 8
The number of times tpacall() can be requested by a server process without a tpgetrply() call. Since the server library follows each tpacall() call, the table needs to be created in the initial MAXSACALL that configures the table size.
MAXCACALL = numeric
Range: 1 ~ 1024
Default: 16
The number of times tpacall() can be requested by a client process without a tpgetrply() call. Since the client library follows each tpacall(), the table needs to be created in the initial MAXCACALL that configures the table size.
TXTIME = numeric
Range: 1 ~ MAX_INT
Default: 0 (seconds)
If not specified, by default requests will infinitely wait for a response.
Time-out period for service processing in a transaction (in seconds). When the time-out period is exceeded, the transaction is cancelled.
Internal time-out setting that is applied to prevent infinite blocking that can be caused by DB or network failure during XA processing before/after service processing.
NLIVEINQ = numeric
Range: 1 ~ MAX_INT
Default: 30 seconds
Node monitoring interval (in seconds) for a multi-node Tmax system. To ensure reliable inter-node communications at all times, the nodes of a domain are connected in a peer-to-peer relationship, and each node regularly monitor the subsequent node in the order they are configured.
If the interval period is short, nodes are monitored frequently and node failures are detected quickly, but inter-node traffic may increase to an unacceptable level. On the other hand, if the interval period is long, nodes are monitored less frequently but inter-node traffic is reduced. Select an appropriate value by considering both the network traffic and need for quick error detection.
NCLHCHKTIME = numeric
Range: 1 ~ MAX_INT
Default: 0 (seconds)
Time-out period (in seconds) with no data flow that triggers CLHs of each node to send a monitoring signal to each other.
This feature must be used with care since after a time-out period with no data flow, the firewall will terminate all processes and this will affect CLH processes of Tmax.
MAXCONV_NODE = numeric
Range: 1 ~ 2048
Default: 16
Maximum number of interactive services that can be simultaneously executed for each CLH. If all clients and server processes can simultaneously call up to 100 interactive services, use a value that is greater than or equal to 100.
If the number of services exceeds this value, a TPELIMIT error will occur.
MAXCONV_SERVER = numeric
Range: 1 ~ 256
Default: 8
Similar to MAXCACALL and MAXSACALL, this variable specifies the maximum number of interactive services that can be simultaneously executed by a client or a server process.
If the number of services exceeds this value, a TPELIMIT error will occur.
SECURITY = "NO_SECURITY" | "DOMAIN_SEC" | "USER_AUTH" | "ACL" | "MANDATORY"
Default: "NO_SECURITY"
Security setting whose value is one of "NO_SECURITY" | "DOMAIN_SEC" | "USER_AUTH".
For more details about Tmax security settings, refer to "3.9. Security Settings".
OWNER = user_name
Range: string within 15 characters
For details, refer to "3.9. Security Settings".
IPCPERM = numeric
Range: 0600 ~ 0777
Default: 0600 (If undefined, the default value for file access control is 600.)
IPCPERM (Inter-Process Communication Permission Mask) specifies the control unit of the pipe file located in $(TMAXDIR)/path and in shared memory segment. It also sets the control unit of the system log file ($(TMAXDIR)/log/slog).
In a UNIX environment, the administrator can assign file access control (to read/record/execute files) to each individual, group, etc. Read and write accesses can be assigned to individuals, but not to groups.
This value can be used to grant users the permission to start and terminate server processes. Without IPCPERM, users cannot start or terminate server processes.
DOMAINID = numeric
Range: 0 ~ 255
Default: 0
Key value that identifies the domain in a multi-domain environment. Required setting for multi-domain systems.
CMTRET = Y | N
Default: Y
Refer to "3.4. Distributed Transaction Settings".
MAXNODE = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum number of nodes allowed per domain.
MAXSVG = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum number of server groups allowed per node.
MAXSPR = numeric
Range: 1 ~ MAX_INT
Default: 64
Maximum number of server processes that can be started on the node. It is calculated by taking the sum of maximum values of each server processes.
MAXSVR = numeric
Range: 1 ~ MAX_INT
Default: 64
Maximum number of servers that can be registered per node.
For example, if there are three servers (svr1, svr2, and svr3) assigned to the node and the MAX value for each server is 50 (each server can generate up to 50 server processes), the MAXSPR is 150 and MAXSVR is 3.
MAXSVC = numeric
Range: 1 ~ MAX_INT
Default: 512
Maximum number of services that can be assigned to each domain.
This value may be different from the result of executing "cfg -d" in tmadmin because this includes space reserved for dynamically adding services and nodes later.
MAXCPC = numeric
Range: 0 ~ 65535
Default: 32
Maximum number of CPCs allowed per node.
MAXTMS = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum number of active TMSs allowed per node.
MAXROUT = numeric
Range: 1 ~ MAX_INT
Default: 16
Maximum number of services that can configure the ROUTING setting.
For example, if 10 out of 30 services can configure the ROUTING setting, then set MAXROUT to 10.
MAXROUTSVG = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum total number of groups (server groups or domain gateways) configured in the ROUTING setting of the SERVICE element.
For instance, assume that the ROUTING setting of Service A is RT1 and that of Service B is RT2. If the number of groups set in RANGES of RT1 is 2, and that of RT2 is 4, the total number of ROUT SVGs is 6. In this case, MAXROUTSVG should be set to at least 6.
*SERVICE A ROUTING = RT1 B ROUTING = RT2 *ROUTING RT1 RANGES = "'a':svg1,*:DGW1" RT2 RANGES = "'a':svg1,'b':svg2,'c':DGW2,*:DGW1"
MAXRQ = numeric
Range: 1 ~ MAX_INT
Default: 2
Maximum number of active RQs per node.
MAXGW = numeric
Range: 1 ~ MAX_INT
Default: 2
Maximum number of active gateways per node.
MAXCOUSIN = numeric
Range: 1 ~ MAX_INT
Default: 16
Maximum number of server groups that can configure the COUSIN setting. For example, if 10 out of 30 server groups can configure the COUSIN setting, set MAXCOUSIN to 10.
MAXCOUSINSVG = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum total number of server groups that can configure the COUSIN setting of SVRGROUP element. For example, if the MAXCOUSIN value is 10 and COUSIN setting can be configured in two server groups, set MAXCOUSINSVG to 20.
MAXBACKUP = numeric
Range: 1 ~ MAX_INT
Default: 16
Maximum number of server groups that can configure the BACKUP setting. For example, if 10 out of 30 server groups can configure the BACKUP setting, set MAXBACKUP to 10.
MAXBACKUPSVG = numeric
Range: 1 ~ MAX_INT
Default: 32
Maximum total number of the server groups that can configure the BACKUP setting of SVRGROUP element. For example, if the MAXBACKUP value is 10 and each BACKUP setting can include two server groups, set MAXBACKUPSVG to 20.
MAXTOTALSVG = numeric
Range: 1 ~ MAX_INT
Default: 64
Maximum number of server groups that can be configured.
MAXPROD = numeric
Range: 1 ~ MAX_INT
Default: 0
If not set, the default value is used, and this function is not used.
This item indicates the maximum value of product name that can be specified as the item that is used to convert a system, which was made for TopEnd system, into the Tmax system. (for TopEnd use)
GWCHKINT = numeric
Range: 1 ~ MAX_INT (seconds)
If a gateway to a backup node is available within a multi-domain system, service requests will be transferred to the backup node if a fault occurs in the original remote node. Service requests will maintain their connection to the backup node even after the original node has been recovered. The gateway to the backup node must be shut down before the service request can re-connect to the original node. However, if the GWCHKINT variable is properly configured, service requests will automatically reconnect to the original node after recovery.
Note
If no value is specified in GWCHKINT, service requests will not attempt to reconnect to the original node even after the original node has recovered.
If a value is specified in GWCHKINT, a connection to the backup node will be automatically disconnected once the gateway to the main remote node recovers and a connection to it is re-established. If a request is transferred to the backup node's channel before a connection is established to the main node's channel and no response is received, the backup node's channel will not be automatically disconnected. Instead, the request will be transferred to the main node. If a response is received from the backup node some time later, the connection to the backup node's channel will be automatically closed at the GWCHKINT interval.
GWCONNECT_TIMEOUT = numeric
Range: 1 ~ MAX_INT (seconds)
The domain gateway tries to connect to the remote gateway at system startup.
If the GWCHKINT item is not specified in the DOMAIN element of the configuration file and the machine where the remote gateway is set is currently not running, then it takes a long time to show a connection failure message to the user who requested the service.
If the domain gateway does not attempt to reconnect when there are no requests, it will attempt to reconnect upon a service request, which will take a long time if the remote gateway is not ready. Such issue can be prevented by specifying the connection timeout.
Starting from Tmax v5.0 SP2, the domain gateway uses the non-blocking method to establish a connection. Since the interval to check connection timeout is determined according to environment settings such as NLIVEINQ and GWCHKINT, timeout can occur after the GWCONNECT_TIMEOUT.
If the GWCONNECT_TIMEOUT is not specified, default procedures will be used.
TMMLOGLVL = string
Default: DETAIL
Specifies the logging level for the TMM. (COMPACT, BASIC, (DETAIL), DEBUG1, DEBUG2, DEBUG3, or DEBUG4)
Level | Description |
---|---|
COMPACT | E + F |
BASIC | E + F + W |
DETAIL | E + F + W + I |
DEBUG1 ~ DEBUG4 | Low internal debug log level (DEBUG4 gives the most detail). DEBUG1 ~ DEBUG4 are only available for debugging binary and library. (clh.dbg, tmm.dbg, libsvrd, libtmsd, libtmsthrd) |
CLHLOGLVL = string
Range: Same as that of the TMM
Specifies the logging level for the CLH.
TMSLOGLVL = string
Range: Same as that of the TMM
Specifies the logging level for the TMS.
LOGLVL = string
Specifies the logging level of the servers.
CRYPT = Y | N
Default: N
Tmax v4.0 and later is capable of encrypting data transmitted between clients and the Tmax system to ensure extra protection. For this feature to be used, it must be configured for both the client and Tmax system.
To set this encryption function for Tmax system, set CRYPT to Y. To not use the encryption function, set CRYPT to N, default value. Refer to element "2.2.2. Tmax Client Environment Variables" TMAX_SEMANTICS environment variables for an explanation of how to set the encryption function for a client.
Note
Encryption key information is exchanged when the client connects with the system and the encryption/decryption is performed as each service is processed. This, of course, will increase performance overhead.
To enable encryption function, /dev/random must first be installed. This '/dev/random' provided by the kernel will generate random keys for exchange when the client connects to the system. To use the encryption function, use the ‘ls’ command to check whether /dev/random has been installed. Refer to the system manual if it has not yet been installed.
Encryption is not supported for inter-node data exchange.
Encryption will not be supported in cases where the client accesses the system though $PATHDIR.
A TPECLOSE error will occur if an encryption-enabled client attempts to access an non-encryption-enabled server, and the client will be blocked.
MAXTHREAD = numeric
Range: 1 ~ MAX_INT
Default: 0
If not specified, the default value is set, and the function is not used.
In Tmax version v4.0 and later, TMS can be configured as a multi-thread transaction manager to improve transaction processing efficiency. To enable this feature, set this value to the maximum number of threads for TMS. Additionally, the TMSTYPE, TMSTHREAD, and TMSOPT variables of the SVRGROUP element must also be configured in conjunction with this variable.
For a description of each variable, refer to "3.2.3 SVRGROUP" TMSTYPE, TMSTHREAD, and TMSOPT.
Note
To use this feature, the DBMS must also support multi-threading. (Currently, only ORACLE provides the support)
When using ORACLE, "Thread=true" must be added to the OPENINFO variable of the SVRGROUP element.
OPENINFO="Oracle_XA+Acc=P/scott/tiger+SesTm=60+Thread=true"
To use this feature, 'libtmsthr' or 'libpthread' library, instead of "libtm," must be linked and compiled.
TDL = Y | N
Default: N
Option to use (Y|N) the TDL (Tmax Dynamic Library) Implicit Version Protection will be used.
For details about TDL, refer to "Tmax Programming Guide (Dynamic Library).
MAXSESSION = numeric
Range: 1 ~ 65535
Default: 1024
Maximum number of sessions that HMS can create per node. For details, refer to "3.7. HMS Settings".
TXPENDINGTIME = numeric
Range: 1 ~ MAX_INT
Default: 0
Time-out value for pending transactions. If no response is issued from a pending transaction for this time period, the transaction will be rolled back. If no value is set, no checks are performed.
CLIENT_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for client connections.
Settings | Description |
---|---|
Y | Use IPv6 protocol to wait for client connection requests, and the client can connect to the system from either IPv4 or IPv6 environment. |
N | Use IPv4 protocol to wait for connection requests. A client can connect to the system only through IPv4. Setting can be configured per node. |
SYSTEM_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for inter-node communication in a multi-node environment.
Settings | Description |
---|---|
Y | Use IPv6 protocol. A client can connect to the Tmax system in either IPv4 or IPv6 environment. |
N | Use IPv4 protocol to wait for connection requests. Setting can be configured per node. |
EXTSVR_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for connection to the Extern Server from Tmax system.
Settings | Description |
---|---|
Y | Use IPv6 protocol. |
N | Use IPv4 protocol. Setting can be configured per node. |
CLL_BIND_IP = Y | N
Default: Y
Option to use the interface of ip address configured in IP setting of the NODE element when creating a port for client connection.
If set to N, or no IP is specified, connections from all interfaces are allowed.
FDL_VERSION = numeric
Default: 1
Range: 1 ~ 2
If set to 2, it uses the version with enhanced search performance and is not compatible with existing Tmax system.
This setting affects server applications and the CLH scheduling that follows the ROUTING configuration section. When using fb* API, it returns the FBESETVER error if FDL_VERSION setting does not match with its environment.
The following is an example of the DOMAIN element.
*DOMAIN res1 SHMKEY = 77990, MAXUSER = 300, MINCLH = 2, MAXCLH = 3, TPORTNO = 8889, RACPORT = 3334, BLOCKTIME = 60, CLICHKINT = 5, IDLETIME = 30, LOGOUTSVC = logout, CLHLOGLVL = DEBUG2
The DOMAIN element defines variables used by the entire Tmax system, while the NODE element defines variables for each node.
The NODE element includes the following settings.
Tmax home directory
Directories that contain server application program executable files (server files)
Directories for inter-process communication
Directories where system messages are stored
Directories where user messages are stored
Directories where transaction information is stored
Variables required to execute server application programs
Some settings in the NODE element can be redefined in the DOMAIN element. For details about these settings, refer to "Re-definable Items".
The startup processes in Tmax system include TMM, CLL, CLH, TMS for database related systems, GATEWAY for multi-node domains, and server processes that actually process service requests. To start the processes, the system needs to find the directories with the executables. The NODE element should be configured with the directory paths of the executables. It also needs to configure directory paths needed for communication of Tmax processes and for information about various errors and warning messages.
Basic configuration of the NODE element is as follows:
*NODE [DEFAULT: ] Node Name TMAXDIR = tmax-home-path , APPDIR = application-path, [HOSTNAME = HOST_NAME,] [TMAXHOME = tmax-home-path,] [NODETYPE = SHM_RACD|(SHM_USER),] [PATHDIR = stream-pipe-path,] [SLOGDIR = system-log-path,] [TLOGDIR = transaction-log-path,] [ULOGDIR = user-log-path,] [DOMAINNAME = domain-name,] [CLHQTIMEOUT = 1 - MAX_INT,] [ENVFILE = environment-file-name,] [SHMKEY = shared-memory-segment-key,] [MAXUSER = 1 ~ ,] [MINCLH = 1 ~ 10,] [MAXCLH = 1 ~ 10,] [TPORTNO = port-number,] [TPORTNO2 = port-number,] [TPORTNO3 = port-number,] [TPORTNO4 = port-number,] [TPORTNO5 = port-number,] [RACPORT = port-number,] [IPCPERM = mask,] [IP = IP address,] [CLICHKINT = interval-time-value,] [IDLETIME = idle-time,] [TMMOPT = TMM-log-path,] [TLMOPT = TLM-transaction-log-file-size,] [CLHOPT = CLH-log=path,] [REALSVR = server-name,] [RSCPC = 1 ~ 128,] [MAXSVG = 1 ~ MAX_INT,] [MAXSPR = 1 ~ MAX_INT,] [MAXSVR = 1 ~ MAX_INT,] [MAXTMS = 1 ~ MAX_INT,] [MAXCPC = 0 ~ 128,] [MAXGWSVR = 1 ~ MAX_INT,] [MAXRQSVR = 1 ~ MAX_INT,] [MAXGWCPC = 1 ~ MAX_INT,] [AUTOBACKUP = (Y)|N,] [LOGOUTSVC = logout-service-name,] [TMAXPORT = port num1, ..., port number5,] [COMPRESSPORT = port num1, ..., port number5,] [COMPRESSSIZE = compress_size,] [RESTART = (Y)|N,] [MAXRSTART = numeric,] [GPERIOD = numeric,] [TMMLOGLVL = tmm-log-level,] [CLHLOGLVL = clh-log-level,] [TMSLOGLVL = tms-log-level,] [LOGLVL = server-log-level,] [EXTPORT = port number,] [EXTCLHPORT = clh port number,] [SMSUPPORT = Y | (N),] [SMTBLSIZE = num,] [CLLBLOCK = Y|(N),] [CLLUNBLKPORT = Portno1, Portno2, ...,] [CLLBLOCKTIME = num] [CLLCONNLB=(RR)|LC,] [CRYPTPORT=literal,] [TRB = nodename,] [MAXSESSION = 1 ~ MAX_INT,] [SQKEY = 32768~262143 ,] [SQSIZE = 4 ~ 4000000,] [SQMAX = 2~MAX_INT-1,] [SQKEYMAX = 1 ~ MAX_INT,] [SQTIMEOUT =1 ~ MAX_INT] [CLIENT_IPV6 = Y|(N)] [SYSTEM_IPV6 = Y|(N)] [EXTSVR_IPV6 = Y|(N)] [CLL_BIND_IP = (Y)|N]
Node Name = string
Size: Up to 15 characters
Name of the physical machine. This value must match the name returned by the UNIX command, uname -n.
Node name must be configured in the "/etc/hosts" file. Since a domain consists of one or more nodes, there must be at least one node configured in the NODE element.
TMAXDIR = literal
Size: Up to 255 characters
Full path of the directory where Tmax is installed. The path must be the same as the value of TMAXHOME. If TMAXHOME is not specified, all Tmax related tasks are performed from the TMAXDIR directory.
APPDIR = literal
Size: Up to 255 characters
Full directory path for server application program executable files.
Tmax system processes as well as application processes for client requests start and terminate with the system.
APPDIR is also used as a working directory of the server. Core files created in a server program is stored in the APPDIR.
Default: item = value, …
This variable can be defined in all elements of the configuration file (NODE, DOMAIN, etc.).
In the NODE element, it is useful for configuring items with the same value for all nodes in a multi-node configuration. When a default value is set using this label, it takes effect until the end of the element is reached or is overridden by another default setting.
If the default settings defined for "DEFAULT:" are not reconfigured in a NODE element, they are applied to all the nodes.
If a default setting is reconfigured in a NODE element, the new value is applied to that node.
HOSTNAME = literal
Size: Up to 255 characters
This item is used to assign an actual hostname when the hostname is different from the configured node name. By setting the HOSTNAME, multiple logical nodes can be configured on a single machine. Multiple node names can be used per hostname.
TMAXHOME, NODETYPE, RACPORT, TPORTNO, and SHMKEY items must be configured in the NODE element. For details, refer to the following "Example" of the NODE element.
TMAXHOME = literal
Size: Up to 255 characters
This item can be used to separately configure the Tmax installation and working directories. TMAXHOME is the absolute path of the directory where Tmax is installed, and must be same as the value of the TMAXHOME environment variable. If TMAXHOME is configured, TMAXDIR is the working directory path. Otherwise, TMAXDIR is the path for both directories.
The following is description of Tmax installation and working directories.
Item | Description |
---|---|
TMAXHOME | Installation directory that contains the following sub directories: bin, lib, usrinc, tuxinc, topinc, cblinc, and license. |
TMAXDIR | Working directory that contains the following sub directories: config, path, log, and svct. |
If HOSTNAME is also configured, each TMAXDIR becomes a single logical node, and TMAXHOME is Tmax installation directory shared by all logical nodes. Thus, TMAXDIR, SHMKEY, and TPORTNO must be separately configured for each logical node of the physical node.
NODETYPE = SHM_RACD | SHM_USER
Default: SHM_RACD
Method for managing individual nodes when there are multiple logical nodes on a single machine. Each local node of a machine must have a different RACPORT value. Where there are multiple local nodes, each local node must be set to a different RACPORT value.
Note that this setting is only used for managing nodes that are on the same host node as the logical node that executes tmboot/tmdown/tmadmin/cfl. Nodes on another host node will be managed by using RACPORT setting regardless of the NODETYPE setting.
This setting is used to determine whether to use RACD when executing tmboot/tmdown/tmadmin/cfl on node B, which is on the same host node as the logical node (node A) that has already started executing tmboot/tmdown/tmadmin/cfl.
Management options are:
Value | Description |
---|---|
SHM_RACD | All of the logical nodes are managed using the RACPORT setting. |
SHM_USER | Each logical node is managed separately without using the RACPORT setting. |
PATHDIR = literal
Size: Up to 255 characters
Default: (TMAXDIR)/path
The directory path of the named stream pipe used for communication between Tmax processes. Communication methods include using a pipe (unnamed/named pipe), message queue, or shared memory.
Tmax uses a shared memory and stream pipe for inter-process communication (refer to the description in "3.2.1 DOMAIN" SHMKEY). A pathname is required to use a stream pipe.
PATHDIR is the directory path where pathnames, which are required for communication between Tmax processes through stream pipes, are created. Named pipes are created in this directory. If PATHDIR is not defined, pipes will be created in a new directory inside the directory configured in TMAXDIR.
If PATHDIR is set to another(not $TMAXDIR/path) directory, the system may not terminate properly when Tmax system shuts down. This is because the system uses the stream pipe(named pipe) in $TMAXDIR/path directory when the system terminates. In order to resolve this problem, the user should configure the environment variable, TMAX_PATHDIR, with the PATHDIR value in the configuration file. Now if the system terminates, it will shut down properly by referencing the environment variable, TMAX_PATHDIR.
export TMAX_PATHDIR = /home/tmax/path_new
When Tmax system starts, previous configuration file in the config directory is copied to PATHDIR of the configuration file. This will prevent the system from not terminating properly when the configuration file is modified after Tmax system starts. If you set the previous PATHDIR (the one that was referenced at startup) in the TMAX_PATHDIR, the previous configuration file will be created under this directory. This configuration file will not be modified even if the configuration file is modified after system startup.
SLOGDIR = literal
Size: Up to 255 characters
Default: (TMAXDIR)/log/slog
The absolute path of directory where system messages are logged. The logged messages include those generated by TMM, TMS, CLL, and CLH, as well as those generated internally by the system. The slog.date file for each date is created in this directory, and messages are saved to a file according to the date they are created.
If no directory is specified in SLOGDIR, a log/slog folder will be created inside the directory configured in TMAXDIR.
The directory path must exist in the system.
TLOGDIR = literal
Size: Up to 255 characters
Default: (TMAXDIR)/log/tlog
The absolute path where TXLOG file is created. The TXLOG file is used to log information about XA transactions. It is created as an unreadable binary file that is used to manage transaction information of Tmax engine. The file is created with a file system and TXLOG file logging is supported depending on the raw file.
If TLOGDIR is not defined, transaction information will be logged in the log/tlog folder inside the TMAXDIR directory.
The directory path must exist in the system.
During system boot, if a log file from the previous boot exists, the file is backed up as '.old', and a new transaction log file is created. The file cannot be larger than 16 MB, and the size can be modified by using the -l option of TLMOPT.
The size for a single xid in txlog is about 32 bytes. (txlog file size does not expand infinitely.)
ULOGDIR = literal
Size: Up to 255 characters
Default: (TMAXDIR)/log/ulog
The absolute path where user messages are logged.
Users, or developers, can use the userlog() function to log debugging or various error and warning messages.
The messages generated by userlog() function are saved in the ULOGDIR directory. The ulog _date file for each date is created in this directory, and messages are saved to a file according to the date they are created. For more details about userlog(), refer to "Tmax Application Development Guide".
If no directory is set to ULOGDIR, messages will be logged in the log/ulog directory inside the TMAXDIR directory.
The directory path must exist in the system.
DOMAINNAME = string
Size: Up to 15 characters
Since the system can consist of multiple domains, the domain that the node belongs to must be specified. The domain name must be configured in the DOMAIN element of the configuration file.
CLHQTIMEOUT = numeric
Range: 1 ~ MAX_INT
Maximum amount of time that a message can wait in a queue before being removed from the queue. This helps to prevent the messages from accumulating indefinitely in the queue due to problems with the host, network, etc. by notifying the client to take an appropriate action.
ENVFILE = literal
Size: Up to 255 characters
Configuration file that contains UNIX environment variables used to configure an appropriate environment for executing server application programs. The server application programs run in the environment configured with the settings in the ENVFILE.
TPORTNO[2-5] = numeric
Tmax system port number that clients can use to connect to servers. The port number is used as an alternative to TPORTNO.
A total of five ports can be used for connection if all ports from TPORTNO2 to TPORTNO5 are configured. Port numbers less than 1024 should not be used since they are reserved for system use.
TPORTNO and the next consecutive port number (TPORTNO+1) are reserved for communication between clients and Tmax or for inter-node communication. The port numbers must be unique, and the port number in TPORTNO should be different from those already configured.
TMMOPT = literal
Size: Up to 255 characters
Command options that can be sent to the TMM process when it starts. Options before '--' are used by Tmax system, and those that come after '--' can be used by general users.
The following are the most commonly used options. For more information, refer to Tmax. "3.2.2. _tmax_event_handler".
Option | Description |
---|---|
-e [file name] | Logs standard error that occurs during TMM operation to a file. |
-o [file name] | Logs standard output that occurs during TMM operation to a file. |
- i | w | e | f | Logging level of the callback function of SLOG event when the server process type(SVRTYPE) is EVT_SVR. (Default: e)
If set to -f, the callback function is called only when a fatal error occurs in slog, and if set to -i, the function is called for all events below the info level. |
-t [second(s)] | Access timeout value of a server process started by ASQCOUNT. (Default: 10 seconds, Unit: second) e.g., TMMOPT = "-t 20" |
-B [backlog value] | Backlog value of the listener port that handles connections with the server processes. A value between 1 and SOMAXCONN can be used. (Default: 1023) If the value is too small, multiple servers may fail to concurrently connect to TMM. |
-A [Number of executions] | Number of connection requests from server processes that can be concurrently processed. This value can be dynamically configured during execution by using the setopt command in tmadmin. (Default: 100) |
-F [Maximum number of concurrent executions] | Maximum number of processes that can be handled concurrently when creating new processes to execute additional processes or restart processes in TMM. This option can be used to make adjustments when the system performance or load conditions affect starting new processes. Use a value between 0 and the specified backlog value. The default value is 0.75 * backlog value. If set to 0, any number of new processes can be started immediately. This value can be dynamically configured during execution by using the setopt command in tmadmin. If set to 0, all waiting processes will be started. Calculate the number of running processes as follows: When a process is created upon execution request, add 1 to the number of currently running processes. Subtract 1 when the process connects with TMM and becomes registered. If exec() call fails in the running process or before it is registered, subtract 1 after checking the boottime of the -t option. If a certain process cannot start due to a missing execution file or dependent library error, the number of running processes remains the same during boottime. If there is a request to start a process when the number of running processes has reached -F option value, the request waits until the active process is registered and the count falls below the maximum. |
-r [Interval for reconnection notification] -k [Number of processes that receive reconnection notification] | When a CLH process restarts or newly starts, all running server processes will simultaneously attempt to connect to the CLH. Since a lock is used for a CLH connection, normally running server processes may be temporarily blocked waiting for the lock. These options control the reconnection notifications to prevent all server processes from attempting to connect to CLH simultaneously.
Both options must be set to enable this function. If these options are set, each server process does not use the LOCK to connect to CLH. If the options are not set, all processes attempt to connect to CLH using the LOCK. These options are not applied to extern servers so that a reconnection notification is immediately sent to the extern servers. An administrator can handle reconnections using the nrc command in tmadmin. For details, refer to "5.2. tmadmin". |
-g -m [Maximum number] | TMM records logs such as SLOG, userlog, and tracelog to a file. Since logging can cause a delay in processing other TMM jobs, use this option to create a dedicated logging thread to record logs. If this option is not set, the main TMM thread handles logging.
The [-m] option must be set together with the [-g] option. If the number of logging requests in a queue reaches the value set in [-m] because logging performance is slow or there are too many logging requests, any subsequent logging requests are discarded. The size of memory used by TMM increases as the value of [-m] is increased. If the memory size grows too big, TMM may fail to fork a process to restart an abnormally terminated process or newly start a process according to the ASQCOUNT setting. |
TLMOPT = literal
Size: Up to 255 characters
Command options that can be sent to the TLM process when it starts.
The following is the most commonly used option.
Option | Description |
---|---|
-l log file size | Default transaction log file size is 16 MB. Size is in MB. (Maximum value: 2048 MB) |
CLHOPT = literal
Command options that can be sent to the CLH process when it starts. Detailed options are same as that of TMMOPT.
Option | Description |
---|---|
-e file name | Logs standard error that occurs during CLH operation to a file. |
-o file name | Logs standard output that occurs during CLH operation to a file. |
-h i | w | e | f | Logging level for the callback function of SLOG event when the server process type(SVRTYPE) is EVT_SVR. If set to -f, the callback function is called only when a fatal error occurs in slog, and if set to -i, the function is called for all events below the info level.
|
-L service name | If a service or a client that called the service terminates or reboots, the response message from service called by CLH is discarded, and a user designated service (loss service) can be called. (tpacacall with TPNOREADY | TPNOTRAN) Name of the loss service that is called when a response message is discarded. The service receives additional information through cltid of TPSVCINFO.
|
-r count | This option is used to specify the maximum number of times read is attempted while CLH performs non-blocking I/O with a server or client. It is recommended that the value is set to a number greater than or equal to the default value and less than 1000. (Default: 100) |
-w count | This option is used to specify the maximum number of times write is attempted while CLH performs non-blocking I/O with a server or client. It is recommended that the value is set to a number greater than or equal to the default value and less than 1000. (Default: 100) |
-x 1 | TPENOENT error, caused by an operation issue, cannot be detected from the system operating environment and can only be checked from the client using tperrno. If set, the error log is recorded in SLOG, which allows a system administrator to rapidly check and respond to the error. If not set, TPENOENT errors are not recorded in SLOG. The following is the error log. (W)CLH3017 no such svc : svcname |
The following conditions are required to transmit a message to a service designated by CLH.
1. The message must be a response to tpcall() or tpacall().
2. Data must be included whether it is a normal response or an error response.
3. The message may not be transmitted if CLH is terminated abnormally.
REALSVR = literal
The name of the RDP server process, if using one.
There must be one real server per node. Clients can access all services of a node through the RDP server processes. The RSCPC value must be set to the number of channels that are used to receive results from other server processes. The number of CLH and RDP server processes must remain constant and the MIN and MAX values must be the same. In general, the ratio of the number of processes of RDP to CLH should be 2 to 1. The number of RDP processes must always be greater than that of CLH.
RSCPC = numeric
Range: 1 ~ 128
Number of channels used by RDP processes to communicate with other servers.
MAXSVG = numeric
Range: 1 ~ 128
Default: 32
Maximum number of server groups per node.
MAXTMS = numeric
Range: 1 ~ 128
Default: 32
Maximum number of TMSs that can be invoked on the node.
MAXGWSVR = numeric
Range: 1 ~ 128
Default: 2
While MAXGW is the maximum number of gateways that can be used on the node, MAXGWSVR is the maximum number of gateway server processes that can be invoked on the node. The default value is 2, which means that there are two gateways and each gateway can have one gateway server.
MAXRQSVR = numeric
Range: 1 ~ 128
Default: 2
Maximum number of RQ server processes that can be invoked on the node. The default value is 2, which means that there are two RQs and each RQ can have one RQ server.
MAXGWCPC = numeric
Range: 1 ~ 128
Default: 8
Maximum number of connections between a gateway and a CLH.
CPC with a server is basically composed of a pair of channels (input/output). If CPC and the number of gateways are both set to 2, MAXGWCPC must be set to at least eight connections. The sum of MAXGWCPC must also be less than the value of MAXCPC.
To increase the MAXGWCPC value, the MAXCPC value must also be increased.
AUTOBACKUP = Y | N
Default: Y
Option to automatically activate the backup server in the event of server failure.
TMAXPORT = "port num1, … , port num5"
Alternate port number for TPORTNO and TPORTNO[2-5]. It is recommended to use TMAXPORT instead of TPORTNO[2-5] when multiple port numbers are used.
COMPRESSPORT = "port num1, … , port num5"
Port numbers used by clients to communicate with Tmax system using the data compression function. If no port numbers are set, the data compression function is not used during communication. Note that the port numbers must be those that are managed by Tmax.
If TMAXPORT of the NODE element is specified, use one of the port numbers of TMAXPORT setting. If TMAXPORT is not specified, use the TPORTNO value of the DOMAIN element. Only the clients who are connected to the specified port can use the data compression function.
This feature is not recommended for use in a general network environment since overhead for data compression is greater than network transmission delay. Data compression is usually used when sending a relatively large volume of data under poor network conditions.
For example, data compression can be used when a client is exchanging tens of KB of data via a modem.
The following tables display the amount of time required for transmitting 1.5 MB of data using a 100 Mbps Local LAN (first two tables) and a 56 KB modem (third table). The results show that it is best to use the compression function when transmitting a large volume of text data via a modem.
Local network client
Compressed | Uncompressed | |
---|---|---|
mp3 download | 10 | 3 |
10 | 3 | |
10 | 4 | |
10 | 3 | |
Text data download | 8 | 1 |
8 | 0(0.85) | |
8 | 0(0.85) | |
8 | 0(0.85) |
Modem client
Compressed | Uncompressed | |
---|---|---|
mp3 download | 352 | 350 |
309 | 307 | |
328 | 331 | |
349 | 351 | |
Text data download | 80 | 137 |
89 | 153 | |
77 | 154 | |
77 | 154 |
<Transmitted data size>
Actual | Compressed | |
---|---|---|
mp3 | 1,459,095 bytes | 1,442,869 bytes |
txt | 1,445,184 bytes | 313,057 bytes |
1. To use compression, the link libz.a(so) file must be linked to client programs during compilation.
2. The current version of Tmax does not support data compression when transmitting data between real servers, between nodes, or between domains.
COMPRESSSIZE = numeric
Minimum size (Byte) of data that can be compressed when using the compression function.
Must be used in conjunction with COMPRESSPORT.
In the following example, Tmax system uses data compression when communicating with the client through port 9999. In the example, data compression will only be used if the data size is larger than 10000 bytes. If the data size is smaller than this value or the client is connected to port 8888, data will not be compressed.
TMAXPORT = "8888, 9999", CompressPort = "9999" CompressSize = 10000
RESTART = Y | N
Default: Y
Option to reload CLH, CAS, CLL, and TLM upon abnormal termination.
MAXRSTART, GPERIOD
Settings for fault tolerance features. For details, refer to "3.8. Fault Tolerance Settings".
EXTPORT = numeric
Tmax supports EXTERN server functions to use functions of Tmax configuration file from an external process, a non-Tmax process.
The server process TYPE must be set to EXTSVR. Two additional variables, EXTCLHPORT and EXTPORT, must be configured in the NODE element of the configuration file. Configure the listen port number of TMM in EXTPOT.
EXTCLHPORT = literal
Listen port number of CLH. If not specified by the system administrator, the system will assign a value.
The following is an example of configuring EXTERN SERVER.
*NODE tmaxh3 ... EXTPORT = 9000, EXTCLHPORT = 9010 *SERVER alinkjmapp SVGNAME = svg1, MIN = 1, MAX = 1, CPC = 10, SVRTYPE=EXTSVR *SERVICE JMAPPER SVRNAME = alinkjmapp, SVCTIME = 30
SMSUPPORT = Y | N
Default: N
Option to use SysMaster Trace function. If set to Y, trace function will be used. If set to N, the function will not be used. SysMaster Trace function uses the GID of a running service to trace system tasks.
The following describes the GID structure (12 bytes).
Size | Description | |
---|---|---|
GID0 | 4Byte | Unique id for each client in the system. ('cli id' for WebtoB) Identifies clients through domain id, node id, hth #, slot id, etc. |
GID1 | 4Byte | First three bytes indicate the seq # and the last byte is for a unique product ID. |
SEQNO | 4Byte | First two bytes indicate the branch # for synchronous messaging, and the last two bytes indicate the seq # for all messages. |
SMTBLSIZE = numeric
Range: 1024~MAX_INT
Default: 50000
Maximum number of SysMaster traces that can be stored per CLH. Only required if SMSUPPORT has been set to Y.
CLLBLOCK = Y | N
Default: N
Option to use the CLL Block. If set to Y, CLL will be blocked when a client connects to the Tmax system.
If there is a client request when Tmax service is not completely started up, the client is allowed to access the Tmax system if CLL is running, but it will receive the TPENOREADY error.
In order to prevent such problem, the administrator must have the client request blocked in CLL. This will prevent CLL from receiving service requests before the service is ready.
When the service is running and ready, you can cancel the CLL blocking function by using the tmadmin command.
CLLUNBLKPORT = "Portno1, Portno2 …"
Exception port numbers for the CLL Block. Select among the port numbers set in TMAXPORT.
Even if the CLL Block is set, you can specify exception ports for the CLL Block in the Tmax configuration file, and the clients that connect through these port numbers will not be blocked.
CLLBLOCKTIME = numeric
Default: 0
CLL Block time (seconds) for if CLLBLOCK=Y. If the block time expires, the CLL Block is released.
If this value is not set when the block time is less than 0 or CLLBLOCK=Y, the CLL Block must be released using tmadmin.
CLLCONNLB = RR | LC
Default: RR
Method used by CLL to send a client connection to CLH.
If set to CLLCONNLB = LC, Least Connection method is used to make the next connection to the CLL with the least number of connections.
If CLLCONNLB is not set or is substituted by some other value, the default method (Round Robin) is used to make the next connection.
CRYPTPORT= Port number list
If this value is set in the NODE element, only the client data that were accessed through these ports are encrypted. This allows encryption at the session level which provides a more flexible encryption function.
Note:
Each port number item must be one of the TMAXPORT items.
Encryption can only be used when CRYPT=Y is set in the DOMAIN element.
If this setting is not configured in the NODE element after setting CRYPT=Y in the DOMAIN element, CRYPTPORT is set to all port numbers in TMAXPORT.
Multiple ports can be assigned.
TRB = string
A Back-up Node (TRB Node) that can process transaction recovery when a node is temporarily unavailable due to machine failure in a Multi-Node & Multi-Domain environment. This setting can help with the low availability problem caused by pending transactions.
As in the following figure, preconfigure TRB Node A' for the Node A.
When machine A fails, the TRB Node A' will start up and automatically recover any pending transaction.
TRB item and Primary Node name must be configured in the Back-up Node (TRB Node).
TRB Node must have one server group. Database information and one TMS must be configured in the server group. To use a Gateway, the TRB item must also be configured in the GATEWAY element.
Note:
Before starting up the TRB Node, you must copy the tlog (TXLOG, GWTXLOG) of the failed Primary Node to the TRB Node.
TXLOG and GWTXLOG are in a binary format that is dependent on the machine in use and compatible only with its kind. It is not compatible if the CPU (Little endian / Big Endian) or binary mode (32bit / 64bit) is different.
TRB Node must be able to access the Database accessed by the failed Node.
Since IP/PORT of the failed Node and TRB Node will be different, the EAI must be able to accept both.
TRB Node only executes transaction recovery function. Services are not processed.
Basically, startup & termination of TRB Node must be controlled manually. An APM Solution can be used to automate node failure detection and startup/termination of the TRB Node.
Startup/Termination of TRB Node
The –B option is used to start up and terminate TRB Node in a way that is different from other nodes.
$tmboot –B <nodename>
TRB is configured as follows:
*NODE #Primary node NODE1 TMAXDIR = /data/tmax #TRB node NODE2 TMAXDIR = /data2/tmax, TRB = NODE1
MAXSESSION = numeric
Range: 1 ~ 65535
Default: 1024
Maximum number of sessions that can be created in an HMS of the node. For details, refer to "3.7. HMS Settings".
SQKEY=numeric
Range: 32768~262143
Key value that refers to the shared memory segment used as Tmax Session Queue repository.
SQSIZE=numeric
Range: 4 ~ 4000000 (Unit : KB)
Size of the shared memory segment used as SQ repository.
SQMAX=numeric
Range: 2 ~ MAX_INT-1 (Unit: KB)
Maximum number of SQs that can be created in the node. Must be an even number. If you use an odd number, it will be automatically decreased by 1.
SQKEYMAX=numeric
Default: 1~ MAX_INT
Maximum number of keys that can be saved in each SQ.
SQTIMEOUT=numeric
Default: 1~MAX_INT (seconds)
Timeout for SQ data keeping. When timeout is reached, data will be automatically deleted.
IP = literal
Size: Up to 255 characters
IP address of the node.
Can be used if the IP address cannot be deduced from the host name when attempting to connect to another node.
SYSTEM_IPV6 must be set to Y to use an IPv6 address.
Used as IP address of an interface to bind to when creating a port for client connection (related setting: CLL_BIND_IP).
CLIENT_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for client connection.
Value | Description |
---|---|
Y | Use IPv6 protocol. A client can connect to the Tmax system in either IPv4 or IPv6 environment. |
N | Use IPv4 protocol. A client can connect to the system only through IPv4. |
SYSTEM_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for inter-node communication in a multi-node environment.
Value | Description |
---|---|
Y | Use IPv6 protocol when creating a port used for connection requests from other nodes. |
N | Use IPv4 protocol. |
EXTSVR_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when creating a port for connection to the extern server from Tmax system.
Value | Description |
---|---|
Y | Use IPv6 protocol. |
N | Use IPv4 protocol. |
It is recommended to use EXTSVR_PROTOCOL instead of this option for Tmax v5.0 SP3 or later.
CLL_BIND_IP = Y | N
Default: Y
Option to use an interface of the IP address set in the NODE element when creating a port for client connection.
Value | Description |
---|---|
N | Connections from all interfaces are allowed. |
Some of items of the NODE element can be defined in the DOMAIN element, and redefined in the NODE element of each node. If they are not redefined in the NODE element, values specified in the DOMAIN element are applied to all the nodes. Otherwise, the value redefined in the NODE element will be applied to the node and its syntax and content are the same as the DOMAIN element.
Item name = Value
Item name | Value | Default value |
---|---|---|
SHMKEY | numeric | |
MINCLH | numeric | 1 |
MAXCLH | numeric | 10 |
TPORTNO | numeric | 8888 |
RACPORT | numeric | 3333 |
MAXUSER | numeric | |
IPCPERM | numeric | 0600 |
MAXSPR | numeric | 64 |
MAXSVR | numeric | 64 |
MAXCPC | numeric | 32 |
LOGOUTSVC | string | |
TMMLOGLVL | string | DETAIL |
CLHLOGLVL | string | DETAIL |
TMSLOGLVL | string | DETAIL |
LOGLVL | string | DETAIL |
TDL | Y|N | N |
CLIENT_IPV6 | Y|N | N |
SYSTEM_IPV6 | Y|N | N |
EXTSVR_IPV6 | Y|N | N |
CLL_BIND_IP | Y|N | Y |
The following are examples of using the NODE element.
Example 1 (a physical node)
*NODE DEFAULT: MINCLH = 2, MAXCLH = 3 tmax1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/log/slog", TLOGDIR = "/home/tmax/log/tlog", ULOGDIR = "/home/tmax/log/ulog", TMMOPT = "-o /home/tmax/log/slog/tmmo.log –e /home/tmax/log/slog/tmme.log", CLHOPT = "-o /home/tmax/log/slog/clho.log –e /home/tmax/log/slog/clhe.log", ENVFILE = "/home/tmax/server/start", TMAXPORT = "8850, 9000, 9001, 9002, 9003", CompressPort = "9000, 9001", CompressSize = 10240, RESTART = Y, MAXRSTART = -1, GPERIOD = 100
Example 2 (logical nodes on a single machine)
*NODE Default: HOSTNAME = "tmaxs1", TMAXHOME = "/user/QA/tmax", NODETYPE = SHM_USER tmaxs1 TMAXDIR = "/user/QA/tmax", APPDIR = "/user/QA/tmax/appbin", PATHDIR = "/user/QA/tmax/path", TLOGDIR = "/user/QA/tmax/log/tlog", ULOGDIR = "/user/QA/tmax/log/ulog", SLOGDIR = "/user/QA/tmax/log/slog" NODE1 TMAXDIR = "/user/QA/proj1", APPDIR = "/user/QA/proj1/appbin", PATHDIR = "/user/QA/proj1/path", TLOGDIR = "/user/QA/proj1/log/tlog", ULOGDIR = "/user/QA/proj1/log/ulog", SLOGDIR = "/user/QA/proj1/log/slog", TPORTNO = 8952, SHMKEY = 76995, RACPORT = 3334 NODE2 TMAXDIR = "/user/QA/proj2", APPDIR = "/user/QA/proj2/appbin", PATHDIR = "/user/QA/proj2/path", TLOGDIR = "/user/QA/proj2/log/tlog", ULOGDIR = "/user/QA/proj2/log/ulog", SLOGDIR = "/user/QA/proj2/log/slog", TPORTNO = 8993, SHMKEY = 76999, RACPORT = 3335, NODETYPE = RACD
In the previous example, the name of the machine (or host) is given as tmaxs1 (HOSTNAME), and the three logical nodes of the host are named tmaxs1, NODE1, and NODE2. TMAXHOME is the Tmax installation directory shared by all three logical nodes, and it contains the bin, lib, usrinc, tuxinc, topinc, and cblinc folders. TMAXDIR is the working directory for each node and contains the config, path, license, log, and svct folders. If tmboot is executed for tmaxs1, tmboot (as well as tmdown/tmadmin) can be directly executed on NODE1 without using RACD since its node type is SHM_USER. However, NODE2 must execute tmboot through RACD since its node type is SHM_RACD.
Each logical node uses TMAXDIR to find its node number, and connects with TMM to execute "tmboot/tmdown/tmadmin/cfl/gst" or read or write from/to a file.
To compile the configuration file, cfl references config ($TMAXDIR/config) of the $TMAXDIR directory. To create a service table in the local node, gst references "$TMAXDIR/svct".
Example 3 (logical nodes on multiple machines)
*NODE Default: HOSTNAME = "tmaxs1", TMAXHOME = "/user2/QA/tmax32", NODETYPE = SHM_USER tmaxs1 TMAXDIR = "/user2/QA/tmax32", APPDIR = "/user2/QA/tmax32/appbin", PATHDIR = "/user2/QA/tmax32/path", TLOGDIR = "/user2/QA/tmax32/log/tlog", ULOGDIR = "/user2/QA/tmax32/log/ulog", SLOGDIR = "/user2/QA/tmax32/log/slog" NODE1 TMAXDIR = "/user2/QA/proj1", APPDIR = "/user2/QA/proj1/appbin", PATHDIR = "/user2/QA/proj1/path", TLOGDIR = "/user2/QA/proj1/log/tlog", ULOGDIR = "/user2/QA/proj1/log/ulog", SLOGDIR = "/user2/QA/proj1/log/slog", TPORTNO = 8952, SHMKEY = 76995, RACPORT = 4335 Default: HOSTNAME = tmaxc1, TMAXHOME = "oracle/QA/tmax", NODETYPE = SHM_RACD tmaxc1 TMAXDIR = "/oracle/QA/tmax", APPDIR = "/oracle/QA/tmax/appbin", PATHDIR = "/oracle/QA/tmax/path", TLOGDIR = "/oracle/QA/tmax/log/tlog", ULOGDIR = "/oracle/QA/tmax/log/ulog", SLOGDIR = "/oracle/QA/tmax/log/slog", TPORTNO = 8893, SHMKEY = 76980, RACPORT = 4335 NODE3 TMAXDIR = "/oracle/QA/proj1", APPDIR = "/oracle/QA/proj1/appbin", PATHDIR = "/oracle/QA/proj1/path", TLOGDIR = "/oracle/QA/proj1/log/tlog", ULOGDIR = "/oracle/QA/proj1/log/ulog", SLOGDIR = "/oracle/QA/proj1/log/slog", TPORTNO = 9984, SHMKEY = 76999, RACPORT = 4336
In the previous example there are two hosts (machines), tmaxs1 and tmaxc1, set to the HOSTNAME. There are four logical nodes on the two hosts. Tmaxs1 and NODE1 are on host tmaxs1, and tmaxc1 and NODE3 are on host tmaxc1.
The NODETYPE defined for the nodes tmaxc1 and NODE3 on host tmaxc1 is SHM_RACD. This will cause tmboot/tmdown/tmadmin to execute through the RACD between tmaxc1 and NODE3 on tmaxc1. If the NODE executing tmboot is NODE1 on host tmaxs1, then RACD is used for communication regardless of the NODETYPE of tmaxc1 and NODE3 on tmaxc1 host.
The RACD is initiated by using TMAXDIR and RACPORT. To bypass the inconvenience of changing these two items every time you need to initiate the RACD, use the -i and –l option commands with racd to easily identify the node the RACD belongs to. This is because if the NODETYPE is SHM_RACD, then each logical node has to execute one RACD.
The following are examples of using the TRB Node.
Multi node
*DOMAIN dom1 SHMKEY =78755, RACPORT = 3366, . . . *NODE tmaxh4 TMAXDIR = "/data1/tmaxqas/tmax", APPDIR = "/data1/tmaxqas/tmax/appbin", tmaxi1 TMAXDIR = "/data/tmaxqas/tmax", APPDIR = "/data/tmaxqas/tmax/appbin", tmaxh4b TMAXDIR = "/data/QA/tmax", APPDIR = "/data/QA/tmax/appbin", HOSTNAME = "tmaxi1", SHMKEY = 78630, TPORTNO = 8630, TRB = tmaxh4, RACPORT = 3155 tmaxi1b TMAXDIR = "/EMC01/QA/tmax", APPDIR = "/EMC01/QA/tmax/appbin", HOSTNAME = tmaxh4, SHMKEY = 78950, TPORTNO = 8520 TRB = tmaxi1, RACPORT = 3355 *SVRGROUP svg1 NODENAME = tmaxi1, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_ora1 svg5 NODENAME = tmaxh4, DBNAME = ORACLE, OPENINFO = "..." TMSNAME = tms_ora5 #TRB NODE svgb1 NODENAME = tmaxh4b, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_orab1, MINTMS = 1, MAXTMS = 1 #only 1 tms needed svgb2 NODENAME = tmaxi1b, DBNAME = ORACLE, OPENINFO = "..." TMSNAME = tms_orab2, MINTMS = 1, MAXTMS = 1 *SERVER svr2301TX SVGNAME = svg1, MIN = 5, MAX = 5, MAXRSTART = -1 svr2305TX SVGNAME = svg5, MIN = 5, MAX = 5, MAXRSTART = -1
Multi domain example (2 Domains)
<Multi domain (Dom1)>
*DOMAIN dom1 SHMKEY =78351, DOMAINID = 10, ... *NODE tmaxh4 TMAXDIR = "/data1/tmaxqas/tmax", APPDIR = "/data1/tmaxqas/tmax/appbin", tmaxh4b TMAXDIR = "/data/QA/tmax", APPDIR = "/data/QA/tmax/appbin", TRB = tmaxh4, HOSTNAME = tmaxi1, ... *SVRGROUP svg5 NODENAME = tmaxh4, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_ora5 #TRB NODE svgb NODENAME = tmaxh4b, DBNAME = ORACLE, OPENINFO = MINTMS=1, MAXTMS=1, # only 1 tms needed TMSNAME = tms_orab1 *SERVER svr2305TX SVGNAME = svg5, MIN = 5, MAX = 5, MAXRSTART = -1 *SERVICE SVC2301TX_1 SVRNAME = gw2301X SVC2305TX_1 SVRNAME = svr2305TX *GATEWAY gw2301X GWTYPE = TMAX, PORTNO = 4789, NODENAME = tmaxh4 # Domain B's gw2301TX RGWADDR = "192.168.1.13", RGWPORTNO = 4789, # Domain B's gw2302TX (TRB) BACKUP_RGWADDR = "192.168.1.43", BACKUP_RGWPORTNO = 5789, gw2302X GWTYPE = TMAX, PORTNO = 5789, NODENAME = tmaxh4b, # Domain B's gw2301TX RGWADDR = "192.168.1.13", RGWPORTNO = 4789, # Domain B's gw2302TX (TRB) BACKUP_RGWADDR = "192.168.1.43", BACKUP_RGWPORTNO = 5789, TRB = gw2301X
<Multi domain (Dom2)>
# Nodeno 1 *DOMAIN domB SHMKEY = 78651, DOMAINID = 20, ... *NODE tmaxi1 TMAXDIR = "/data/tmaxqas/tmax", APPDIR = "/data/tmaxqas/tmax/appbin", tmaxi1b TMAXDIR = "/EMC01/QA/tmax", APPDIR = "/EMC01/QA/tmax/appbin", TRB = tmaxi1, HOSTNAME = tmaxh4 *SVRGROUP svg1 NODENAME = tmaxi1, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_ora1 # TRB NODE svgb1 NODENAME = tmaxi1b, DBNAME = ORACLE, OPENINFO = "..." , TMSNAME = tms_orab1, MINTMS = 1, MAXTMS = 1 *SERVER svr2301TX SVGNAME = svg1, MIN = 5, MAX = 5, MAXRSTART = -1 *SERVICE SVC2301TX_1 SVRNAME = svr2301TX SVC2305TX_1 SVRNAME = gw2301X *GATEWAY gw2301X GWTYPE = TMAX, PORTNO = 4789, NODENAME = tmaxi1, # Domain A's gw2301X RGWADDR = "192.168.1.43", RGWPORTNO = 4789, # Domain A's gw2302X (TRB) BACKUP_RGWADDR = "192.168.1.13", BACKUP_RGWPORTNO = 5789, gw2302X GWTYPE = TMAX, PORTNO = 5789, NODENAME = tmaxi1b, # Domain A's gw2301X RGWADDR = "192.168.1.43", RGWPORTNO = 4789, # Domain B's gw2302X (TRB) BACKUP_RGWADDR = "192.168.1.13", BACKUP_RGWPORTNO = 5789, TRB = gw2301X
Multi domain example (3 Domains)
<Multi domain (Dom1)>
*DOMAIN dom1 SHMKEY = 78351, RACPORT = 3155, DOMAINID = 10, #------------------------------------------------------------------------ *NODE tmaxh4 TMAXDIR = "/data1/tmaxqas/tmax", APPDIR = "/data1/tmaxqas/tmax/appbin", tmaxh4b1 TMAXDIR = "/data/QA/tmax", APPDIR = "/data/QA/tmax/appbin", TRB = tmaxh4, SHMKEY = 86655, TPORTNO = 8450, HOSTNAME = tmaxi1 tmaxh4b2 TMAXDIR = "/user1/tmaxqam/tmax", APPDIR = "/user1/tmaxqam/tmax/appbin", TRB = tmaxh4, SHMKEY = 86655, TPORTNO = 8450, HOSTNAME = ibm5l *SVRGROUP svg1 NODENAME = tmaxh4, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_ora1 # TRB NODE svgb1 NODENAME = tmaxh4b1, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_orab1, MINTMS = 1, MAXTMS = 1 svgb2 NODENAME = tmaxh4b2, DBNAME = ORACLE, OPENINFO = "...", TMSNAME = tms_orab2, MINTMS = 1, MAXTMS = 1 *SERVER svr2301TX SVGNAME = svg1, MIN = 5, MAX = 5, MAXRSTART = -1 *SERVICE SVC2301TX_1 SVRNAME = svr2301TX SVC2305TX_1 SVRNAME = gw2301X SVC2309TX_1 SVRNAME = gw2302X *GATEWAY # Gateway for Damain B gw2301X GWTYPE = TMAX, PORTNO = 4010, NODENAME = tmaxh4, #Domain A's gw2301X RGWADDR = "192.168.1.13", RGWPORTNO = 4010, # Domain B's gw2301Xb (TRB) BACKUP_RGWADDR = "192.168.1.31", BACKUP_RGWPORTNO = 5010, # Domain B's gw2302Xb (TRB) BACKUP_RGWADDR2 = "192.168.1.43", BACKUP_RGWPORTNO2 = 6010, gw2301Xb GWTYPE = TMAX, PORTNO = 5010, NODENAME = tmaxh4b1, #192.168.1.13 RGWADDR = "192.168.1.13", RGWPORTNO = 4010, BACKUP_RGWADDR = "192.168.1.31", BACKUP_RGWPORTNO = 5010, BACKUP_RGWADDR2 = "192.168.1.43", BACKUP_RGWPORTNO2 = 6010, TRB = gw2301X gw2301Xb2 GWTYPE = TMAX, PORTNO = 6010, RGWADDR = "192.168.1.13", RGWPORTNO = 4010, BACKUP_RGWADDR = "192.168.1.31", BACKUP_RGWPORTNO = 5010, BACKUP_RGWADDR2 = "192.168.1.43", BACKUP_RGWPORTNO2 = 6010, NODENAME = tmaxh4b2, #192.168.1.31 TRB = gw2301X # Gateway for Domain C gw2302X GWTYPE = TMAX, PORTNO = 4020, #Domain C's gw2302X RGWADDR = "192.168.1.31", RGWPORTNO = 4020, # Domain C's gw2302Xb (TRB) BACKUP_RGWADDR = "192.168.1.43", BACKUP_RGWPORTNO = 5020, # Domain C's gw2302Xb2 (TRB) BACKUP_RGWADDR2 = "192.168.1.13", BACKUP_RGWPORTNO2 = 6020, NODENAME = tmaxh4, gw2302Xb GWTYPE = TMAX, PORTNO = 5020, RGWADDR = "192.168.1.31", RGWPORTNO = 4020, BACKUP_RGWADDR = "192.168.1.43",인 BACKUP_RGWPORTNO = 5020, BACKUP_RGWADDR2 = "192.168.1.13", BACKUP_RGWPORTNO2 = 6020, NODENAME = tmaxh4b1, #192.168.1.13 TRB = gw2301X gw2302Xb2 GWTYPE = TMAX, PORTNO = 6020, RGWADDR = "192.168.1.31", RGWPORTNO = 4020, BACKUP_RGWADDR = "192.168.1.43", BACKUP_RGWPORTNO = 5020, BACKUP_RGWADDR2 = "192.168.1.13", BACKUP_RGWPORTNO2 = 6020, NODENAME = tmaxh4b2, #192.168.1.31 TRB = gw2301X
Tmax manages servers that process client requests in groups. Servers can be grouped based on their location, the type of database they use, or their logical relationships. A SVRGROUP is a basic unit of Tmax system used in transaction processing, load balancing, fault tolerance functions, and routing.
SVRGROUP element configures the following:
Node that each server group belongs to.
Database access information for the server group.
Options for distributed transaction processing.
Some items of SVRGROUP are configured in the NODE element of the configuration file, but can be redefined in the SVGROUP element. For details about such items, refer to "Re-definable Items".
The following are the basic settings of the SVRGROUP element.
*SVRGROUP [DEFAULT :] SVRGROUP Name NODENAME = node-name [APPDIR = path,] [ULOGDIR = path,] [SVGTYPE = TMAX|EXTSVG ,] [COUSIN = group-name,] [BACKUP = group-name,] [LOAD = numeric,] [DBNAME = name-of-database,] [OPENINFO = string,] [CLOSEINFO = string,] [MINTMS = numeric,] [MAXTMS = numeric,] [TMSNAME = name-of-tms,] [ENVFILE = path,] [XAOPTION = xaoption,] [CPC = numeric,] [RESTART = (Y)|N,] [MAXRSTART = numeric,] [GPERIOD = numeric,] [TMSLOGLVL = tms-log-level,] [LOGLVL = server-log-level,] [TMSRECOVERY = (Y)|N,] [TMSDEP = tms_name,...,] [TMSRANGE = (DOMAIN)|NODE,] [TMSTYPE = (STD) | STD_MT,] [TMSTHREAD = numeric,] [TMSOPT = arguments,] [TMSXATIME = numeric,] [DUMMY = Y | (N),] [HMSNAME = string,] [HMSINDEX = numeric,] [HMSMAXTHR = numeric,] [HMSMAXDBTHR = numeric,] [HMSMAXBULKTHR = numeric,] [HMSMAXBULKSIZE = numeric,] [HMSOPT = literal,] [HMSSUBSCFG = string,] [HMSMSGLIVE = numeric,] [HMSPORT = numeric,] [HMSHEARTBEAT = numeric,] [HMSGQINT = numeric]
SVRGROUP Name = string
Size: Up to 15 characters
Logical name of the server group. Must be unique in the SVRGROUP element.
This variable will be referred to from the SVGNAME item of the SERVER element.
NODENAME = string
Size: Up to 15 characters
Node where the server group exists. Must be a node that is defined in the NODE element. If the node name includes a hyphen (-), it must be enclosed in double quotation marks.
Default: item = value, …
Refer to DEFAULT of "3.2.2 NODE".
SVGTYPE = string
Default: TMAX
Server group type. One of TMAX, RQMGR, EXTSVG, and TXRQMGR. The default value is TMAX. Refer to "Tmax Programming Guide(MultipleRM) for detailed information about MTMAX and STMAX.
EXTSVG is same as EXTERN SERVER. It is selected when using the EXTERN TMS to support WAS(Web Application Server) and 2PC. When using EXTSVG, the OPENINFO item must also be configured. Even though its value is not significant, set the OPENINFO element to " ".
<Example of using EXTSVG Server Group>
*NODE tmaxh3 ... EXTPORT = 9000, EXTCLHPORT = 9010 *SVRGROUP Extsvg NODENAME = "tmaxh4", SVGTYPE = "EXTSVG", TMSNAME = TMSWAS OPENINFO = " " *SERVER alinkjmapp SVGNAME = Extsvg1, MIN = 1, MAX = 1, CPC = 20, SVRTYPE = EXTSVR *SERVICE JMAPPER SVRNAME = alinkjmapp, SVCTIME = 30
COUSIN = literal
Size: Up to 8000 characters
Groups that can share a process or perform routing with. These sever groups can exist on a same node or on different nodes. Both COUSIN and BACKUP items can be configured, but they must be set to different server groups.
The server groups set in COUSIN are in charge of routing, and the server groups set in BACKUP handle failures. Gateway servers can also be included in COUSIN.
BACKUP = literal
Size: Up to 8000 characters
Backup group name used to provide seamless services even in case of a failure.
LOAD = numeric
LOAD = -1
Use Static Routing. Client service requests will only be routed to the server groups of the node to which they are connected. If LOAD is set to -1 (for local use only), the domain gateways in COUSIN are not called. Thus, LOAD cannot be set to -1 in the domain gateway's COUSIN.
This option cannot be used for transaction and non-transaction gateways.
Example
*SVRGROUP svg1 NODENAME = tmaxh4, COUSIN = "svg2, gw1, gw2", LOAD = -1 svg2 NODENAME = tmaxh2, LOAD = -1 *GATEWAY gw1 NODENAME = tmaxh4, LOAD = -1 gw2 NODENAME = tmaxh2, LOAD = -1
LOAD = -2
Configure each gateway in a multi node environment and create a separate client connection to each node. Then, by having the initial node, to which the client connects, process the requested service can help decrease the work load.
When you use the process local first function in a multi-node environment grouped by COUSIN, the server group of the node that the client is connected to will process the request one-on-one. The gateway of the node is used to make a request to another domain.
When you make a call to a certain server group using tpcallsvg and tpacallsvg, the request can be processed by all server groups even if the local node first function(LOAD=-2) is set. Moreover, if the server group is terminated, the service is not replaced by another server. Instead, the user receives a TPENOREADY error.
For a transaction gateway, XA server group must be used as general server group (dummy server group) for configuring COUSIN. LOAD must be set to -2 for all server groups and gateways grouped as COUSIN.
Example of setting a non-transaction gateway
*SVRGROUP
svg1 NODENAME = tmaxh4,
COUSIN = "svg2, gw1, gw2", LOAD = -2
svg2 NODENAME = tmaxh2, LOAD = -2
*GATEWAY
gw1 NODENAME = tmaxh4, GWTYPE = TMAXNONTX, LOAD = -2
gw2 NODENAME = tmaxh2, GWTYPE = TMAXNONTX, LOAD = -2
Example of setting a transaction gateway
*SVRGROUP svg1 NODENAME = tmaxh4, DBNAME = ORACLE, OPENINFO = "Oracle_Xa+Acc=P/scott/tiger+SesTm=60+LogDir= /data1/tmaxqam/tmax/log/tlog/xalog", TMSNAME = tms_ora, COUSIN = "svg2, gw1, gw2", LOAD = -2 svg2 NODENAME = tmaxh2, DBNAME = ORACLE, OPENINFO = "Oracle_Xa+Acc=P/scott/tiger+SesTm=60+LogDir= /data1/tmaxqam/tmax/log/tlog/xalog", TMSNAME = tms_ora, LOAD = -2 *GATEWAY gw1 NODENAME = tmaxh4, GWTYPE = TMAX, LOAD = -2 gw2 NODENAME = tmaxh2, GWTYPE = TMAX, LOAD = -2
LOAD = -3
Use when a backup is required between server groups in COUSIN.
The BACKUP item of the SVRGROUP element is not a backup configuration for server groups set in COUSIN but a backup configuration for the server group. For instance, let's assume that a server group A is configured with COUSIN="B,C" and BACKUP="D". If all the nodes where A, B, and C belong to are terminated, backup scheduling to D is attempted only when the node that A belongs to fails. LOAD=-3 can be used to failover to server group D when all servers that belong to A, B, and C server groups are disabled.
Example
A COUSIN = "B,C,D", LOAD = -2 B LOAD = -2 C LOAD = -2 D LOAD = -3
With the previous configuration, scheduling is attempted only to A, B, and C. If A, B, and C all fail, scheduling is attempted to D. Normally, scheduling uses server groups with a LOAD value other than -3, but when there is failure scheduling uses server groups with LOAD=-3. In this case, the scheduling follows the local first load balancing (LOAD=-2).
LOAD = 0
Use dynamic routing for load balancing. Tmax routes client requests to the server group with the required service and the lowest work load at the time.
LOAD > 0
Use Rule based routing. Client service requests are distributed on the target server group based on the specified LOAD ratio. Can only be used for a group specified in COUSIN. Load balancing for Tmax server group can be configured in the LOAD and ROUTING settings, and both must be set to the same value. If the service is configured in the ROUTING element, it can only be scheduled through ROUTING and the LOAD setting is ignored. Thus, it is impossible to perform scheduling by grouping the server groups of each ROUTING in the COUSIN setting.
Example
*SVRGROUP svg1 NODENAME = tmaxh4, COUSIN = "svg2, gw1, gw2", LOAD = 1 svg2 NODENAME = tmaxh2, LOAD = 1 *GATEWAY gw1 NODENAME = tmaxh4, LOAD = 1 gw2 NODENAME = tmaxh2, LOAD = 1
DBNAME = string
Size: Up to 63 characters
Unique DB name required if TMS is configured.
OPENINFO = literal
Size: Up to 255 characters
Used to connect the server group to the database through TMS. Initializes the DB connection and must be defined by using the syntax required by each DB.
To encrypt some settings, use ***** (5 asterisks) in place of the setting. When using cfl, a password will be prompted for the encrypted parts.
Partial encryption
OPENINFO = "ORACLE_XA+Acc=P/scott/*****+SesTm=100"
Full encryption
OPENINFO = "*****"
CLOSEINFO = literal
Size: Up to 255 characters
Required if TMS, which is a group that integrates to the DB, is configured. Used to terminate the connection with the DB. Must be defined by using the syntax required by each DB. This item is not required by most DBs except for Informix.
MINTMS = numeric
Range: 1~16
Default: 2
Number of TMS processes that will be loaded in the server group when Tmax system starts up if TMS is configured.
MAXTMS = numeric
Range:1~16
Default: 3
Maximum number of active TMS processes in the server group at any one time.
TMSNAME = string
Size: Up to 15 characters
Name of the TMS process that will manage the database for the server group if TMS is configured.
ENVFILE = literal
Size: Up to 255 characters
Required to pass values using environment variables to servers that are part of the server group. It can also be used to connect to multiple homogeneous databases on the same node.
XAOPTION = literal
Only required for a limited number of DBMSs. For DBMSs like DB2 that only support dynamic registration, set it to 'Dynamic'.
If the DBMS is similar to Sybase or earlier versions of Informix and uses 'int' (not 'long') for the xaswitch field even though it has a 64 bit engine, set it to 'XASWITCH32'.
CPC = numeric
Range: 1 ~ 128
Number of channels with CLH processes. Used only when SVGTYPE is RQMGR. For details, refer to "3.6. Reliable Queue Settings".
RESTART = Y | N
Default: Y
Option to reload TMS processes if they are abnormally terminated.
MAXRSTART, GPERIOD
Options to configure Tmax fault tolerance feature. For details, refer to "3.8. Fault Tolerance Settings".
TMSRECOVERY = Y | N
Default: Y
Option to use transaction recovery. To use transaction recovery, set to Y. Otherwise, set to N.
Tmax v4.0 and later use the Transaction Recovery Function defined in X/OPEN DTP. When TMS is restarted, Tmax obtains an XID list of pending transactions from the RM and performs transaction recovery on the list. Transaction recovery function is supported in a single node or multi node environment, or a multi-domain system that uses Tmax Domain Gateways for communication.
Since recovery is performed when the entire group is started/terminated, recovery can be performed by each TMS group. A command option is added to tmboot/tmdown to start/terminate a specific TMS. For more details about the command, refer to "Tmax Reference Guide".
Permissions to query the Pending list must be given to RM to use this feature.
TMSDEP = "tmsname1,…"
When different server groups of a single node share a database, dependencies can be established to prevent recovery from executing while TMS is running.
As in the following example, if three server groups share one DB, tms1 can be configured to perform recovery for both tms2 and tms3 to prevent duplicate recovery processing. For stable recovery, recovery is not performed while tm2 or tm3 is running.
svg1 TMSNAME = tms1, TMSDEP = "tms2, tms3" svg2 TMSNAME = tms2, TMSRECOVERY = N svg3 TMSNAME = tms3, TMSRECOVERY = N
TMSRANGE = DOMAIN | NODE
Default: DOMAIN
When server groups on different nodes share a single database, TMSRANGE can be set to NODE so that recovery is performed separately for each node. This will reduce inter-node traffic and increase stability of the recovery function.
TMSTYPE = STD | STD_MT
Default: STD
TMS type used.
Value | Description |
---|---|
STD | To use general TMS, set TMSTYPE to STD. Must use libtms.so library. |
STD_MT | To use multi-threaded TMS, set TMSTYPE to STD_MT. Must use libtmsthr.so library. |
TMSTHREAD = numeric
Number of working threads per TMS process.
TMSOPT = "arguments"
Location and name of the TMS log file. Usage is same as TMMOPT and CLHOPT.
TMSXATIME = numeric
Unit: seconds
XA processing that takes longer than TMSXATIME is logged.
If XA processing, such as xa_prepare, xa_commit, xa_rollback, etc., takes unusually long time in TMS, this may indicate a DB failure. Logging is provided for cause analysis of the failure in the future.
Log format:
CLH2160 XA function name(xid) processing was delayed (elapsed time) by tms(server group no.) : Return value of XA function CLH2161 XA function name(xid) processing may be stopped due to closed tms(server group no.)
DUMMY = Y | N
Default: N
Option to temporarily use a server group name as "__dummy".
If set to Y, TMS of the group is not started up when executing tmboot.
The DUMMY setting of the SVRGROUP element is not inherited by the SERVER element, and so DUMMY must be separately configured for each SERVER element.
Can be useful when a dummy server group setting, such as Domain Gateway Cousin, is needed. For details, refer to "B.2. Domain Gateway COUSIN Setting".
If not set, the following error occurs during tmboot.
(F) BOOT0014 exec error : /data1/tmaxkjh/tmax/appbin/tms_tbr [BOOT0029]: No such file or directory
HMSNAME = string
Size: Up to 15 characters
Name of HMS process. To use HMS, SVGTYPE must be set to HMS.
For more details about the HMS setting, refer to "Tmax HMS User Guide".
HMSINDEX = numeric
Range: 0 ~ 65535
Unique value in the domain that is required for processing an HMS message.
HMSMAXTHR = numeric
Range: 0 ~ 65535
Number of threads that do not perform storage processing for HMS messages.
HMSMAXDBTHR = numeric
Range: 0 ~ 65535
Number of threads that perform storage processing for HMS messages.
HMSMAXBULKTHR = numeric
Range: 1 ~ 65535
Number of threads that perform batch storage processing for HMS messages.
HMSMAXBULKSIZE = numeric
Range: 2 ~ 65535
Maximum number of HMS messages that can be simultaneously processed for batch storage processing.
HMSOPT = literal
Size: Up to 255 characters
Command options transmitted to an HMS process when HMS starts up.
Option | Description |
---|---|
-e file name | Write standard errors occurrences during HMS operation to the file. |
-o file name | Write standard output occurrences during HMS operation to the file. |
HMSSUBSCFG = string
Size: Up to 255 characters
Path and name of a configuration file where Durable Subscriber is defined. The durable subscriber is automatically registered when HMS starts up.
HMSMSGLIVE = numeric
Range: 0 ~ 65535 (unit: hours)
An interval to delete persistent messages that HMS accumulates in a storage.
HMSPORT = numeric
Port number used by HMS to communicate with other HMSs in a cluster.
HMSHEARTBEAT = numeric
Range: 0 ~ 65535 (seconds)
Heartbeat check interval. Clustered HMSs regularly exchange heartbeat messages to detect any network failure among them.
HMSGQINT = numeric
Range: 0 ~ 65535 (unit: milliseconds)
Interval for updating status information required for HMS queue clustering.
Must be set to use a clustered queue. Data is more evenly distributed in the queue if the interval is shorter, but network load is heavier. Set a value accordingly.
APPDIR = literal
Size: Up to 255 characters
Paths of the directories that contain the executable files for server application programs.
APPDIR of the NODE element sets the paths of all applications running on the node, and it can be redefined in the SVRGROUP to set application file paths for the server group.
ULOGDIR = literal
Size: Up to 255 characters
Paths of the directories where user messages are logged. Can be redefined for each server group. The method of logging user messages is same as ULOGDIR of the NODE element.
The specified path must exist in the system.
TMSLOGLVL = string
Log level of TMS.
LOGLVL = string
Log level of the server.
The following is an example of using the SVRGROUP element.
*SVRGROUP svg1 NODENAME = tmax, APPDIR = "/home/tmax/appbin", ULOGDIR = "/home/tmax/appbin/svg1_log" svgora NODENAME = tmax, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm = 60, DbgFl = 0x01 + LogDir=/tmp", TMSNAME = svg1_tms svginfx NODENAME = tmax, DBNAME = INFORMIX, OPENINFO = "stores7; USER = {userid}; PASSWD = {password}", TMSNAME = info_tms
LogDir in svgora specifies the path where xa log is saved. With INFORMIX, if the account for booting Tmax system is same as the one for logging in Informix, you may omit the USER, PASSWD as in OPENINFO="stores7".
Verification of server group setting that is set as COUSIN
You can output the errors during the cfl stage to prevent the following configuration of server groups that are configured as COUSIN.
Reconfigured as the BACKUP of another server group (Complex setting)
*SVRGROUP svg1 NODENAME = "tmaxh4", COUSIN = "svg2, svg3" svg2 NODENAME = "tmaxh4", BACKUP = "svg3" svg3 NODENAME = "tmaxh2"
The following compilation error occurs:
(E) CFL3008 server group svg3 is defined as both COUSIN and BACKUP [CFL0309]
Reconfigured as a COUSIN of another server group (Multiple inheritance)
*SVRGROUP svg1 NODENAME = "tmaxh4", COUSIN = "svg3" svg2 NODENAME = "tmaxh4", COUSIN = "svg3" svg3 NODENAME = "tmaxh2"
The following compile error occurs:
(E) CFL3008 server group svg3 is defined as duplicate COUSIN [CFL0310]
Multi Backup Setting
The Multi Backup function is provided by expanding backup functions that are provided as fault tolerance measures.
svg1 NODENAME = @HOSTNAME@, BACKUP = "svg2,svg3,svg4" svg2 NODENAME = @RMTNAME@ svg3 NODENAME = @RMTNAME2@ svg4 NODENAME = @RMTNAME3@
To provide a more stable recovery function, Multi Backup function enables failover to another backup server when the original backup server fails.
One or more server group(s) can be specified in the Backup item. To set multiple backup servers, use a comma(,) as separator. If there is a failure on the original server node, the transactions will failover to the first backup node. And if there is a failure on the first backup node, the transactions will failover to the second backup node.
When the original node recovers while the backup node is processing, the fail back function can be used to allow the original node to process the transactions again. When the first backup node recovers while the second backup node is processing, the transactions will fail back to the first backup node, and when the main node recovers, the transactions will be processed by the original node.
The DOMAIN, NODE, and SVRGROUP elements of the configuration file contain variables that are referenced internally by Tmax system. The SERVER and SERVICE elements on the other hand contain definitions and settings for the services that are requested by clients. The application servers and the services that they process must be configured in these two elements of the configuration file to provide information about them.
Since Tmax cannot process new services until they are defined in the configuration file, they must be added to both the SERVER and SERVICE elements.
All server application programs managed by Tmax system will have to be registered in the SERVER element. The servers defined in the SERVER element will be loaded into memory when Tmax starts up and removed from memory when Tmax shuts down.
The following are defined in the SERVER element:
Server group that the server belongs to.
Commands used to launch server processes.
Maximum and minimum number of allowed server processes.
The number of queues required for the dynamic management of server processes.
Option to use interactive mode.
Option to use automatic restart and allowed number of restarts (Refer to "3.8. Fault Tolerance Settings".)
Maximum and minimum number of threads of Multi Thread/Multi Context server process, and thread stack size.
Some items defined in the SVRGROUP element can be re-defined in the SERVER element. For information about the items, refer to "Re-definable Items".
The following is the basic syntax of the SERVER element.
*SERVER [DEFAULT : ] Server Name SVGNAME = server-group-name [CLOPT = literal,] [MIN = numeric,] [MAX = numeric,] [CONV = Y | (N) | B ,] [ASQCOUNT = numeric,] [MAXQCOUNT = max-queue-count,] [SVRTYPE = (STD) | UCS | CUSTOM_GATEWAY | STD_DYN | UCS_DYN | REALSVR | REALSVR_MT | EXTSVR,] [CPC = channel-number,] [MINTHR = numeric,] [MAXTHR = numeric,] [STACKSIZE = numeric,] [ULOGDIR = user-log-path,] [RESTART = (Y) | N,] [MAXRSTART = numeric,] [GPERIOD = numeric,] [TARGET = string,] [AUTOTRAN = Y | (N) | B ,] [SCHEDULE = (FA)/RR,] [LIFESPAN = (IDLE_DOWN) | IDLE_0 | IDLE_sec,] [LOGLVL = server-log-level,] [DUMMY = Y | (N)] [MAX_USE_COUNT = Y | (N)] [CTX_EREPLY = (Y) | N] [MULTICLH = (Y) | N] [AUS = Y | (N)] [TMAPM = (Y) | N] [MAC = Y | (N)] [ROC = Y | (N)]
Server Name = string
Size: Up to 15 characters
Server name and also the executable name of the server application program. Each server name must be unique and must be defined only once in the SERVER element of the configuration file. In multi-domain systems, a server name must be unique in each domain.
SVGNAME = string
Size: Up to 15 characters
Server group that the server belongs to.
The server group must already be defined in the SVRGROUP element. By mapping a server to a server group, the node it runs on and the resource manager (database) that it uses are also known. It can also be used to acquire parameters necessary for opening the resource manager.
When operating in XA mode, Tmax manages all database transactions and oversees 2PC processing. To facilitate this, the OPENINFO field must be properly configured in the SVRGROUP element as previously described.
When Tmax is operating in XA mode, users are not involved when the server connects to the database. However, if Tmax is not operating in XA mode, OPENINFO must not be included in the SVRGROUP element and the individual users must manage server-database connections.
Default: item = value, …
Refer to DEFAULT of "3.2.2 NODE".
CLOPT = literal
Size: Up to 255 characters
Command options that are passed to the server processes when they start up. Options that are defined before "--" are used by the system, and options that are defined after "--" can be used by users.
Major system options include:
Option | Description |
---|---|
-e file name | Log standard errors that occur while server process is running by creating a file named 'server process name_file name'. Standard errors use the fprintf(stderr, format, args) function. |
-o file name | Log standard output that occurs while server process is running by creating a file named 'server process name_file name'. Similar to the general printf() function and the standard error output option, this option uses the fprintf(stdout, format, args) function. |
-u uid | uid registered in the user file. The three-level security function (service access control) ensures that services will be available if a non-Tmax client such as UCS usermain or gateway requests for an ACL service and its user_id is specified in the CLOPT setting of the SERVER element. For example, if svr_usc in usermain sends a request for an ACL service (SVC_ACL), the user can set the CLOPT setting of svr_ucs to CLOPT="-u user_id" in the SERVER element. |
-r | Option to prevent the RESTART value from increasing when a server process is forced to restart after a service times out. Applied only when RESTART is set to Y. In a UNIX platform, the parameter of tpreturn() in tpsvctimeout() must be set to TPEXIT. |
-l -L value | For possible values that can be used with the -L option, refer to the description following this table. -L <value> can be set regardless of -l option, but logs are not written to svclog if -l option is not used. |
- l | Log service performance results. Log will be saved in the '$ULOGDIR svclog.mmddyyyy' file every 5 minutes. Tmax provides a program named svcrpt for analyzing the log. |
- B | In versions earlier than Tmax v4.0 SP3 Fix#2, if requests were scheduled to one server process simultaneously in a multi CLH environment, CLH Queue Timeout does not occur which delays request processing. This issue has been resolved. However, an exception must be implemented for batch processing. Also note that if the [–B] option is specified in the CLOPT setting of the SERVER element and requests are scheduled to the server process, Queue Timeout is ignored. |
- X | The ORA-24761 error occurs when processing a query for a previously rolled back transaction in Oracle. If the user ignores the error and continues processing the query, it is processed as a local transaction resulting in an integrity issue. This problem is caused by user code, but the [–X] option can be used to restart the server process if the result of xa_end() is not XA_OK. The XA server resets an XA channel if xa_end() fails in tpreturn(). The [–X] option can be used to terminate the server process after outputting a fatal error message (service code: CSC5608) when xa_end() fails. |
- c | In the previous versions of Tmax, if a date is modified while the server is running, a standard output file of userlog is not deleted even if the delete command is executed. In the current version, the [-c] option can be used to close and delete a log file by checking for date changes. |
- q | Used for RDPMT server (SVRTYPE=REALSVR_MT) to move data from the TPSENDTOCLI queue to the WRITE queue when executing tpflush(). It is not recommended for use because it has no memory limit. |
- m | If the memory used by user server program exceeds the size set in the -m option, terminate and restart the server program. (unit: Byte) When the server restarts, TMM outputs "sever closed due to MAX_USE_COUNT or MEM_USAGE(CLOPT:-m)". |
-x | Used with the TARGET option to request for a service using a substitute service name by using "-x existing service name: the service name to replace". Use a comma (,) to replace multiple service names. If an undeclared service name or duplicate service names are configured, an error can occur while a server is starting up. |
The following is an example of using the -x option.
*SERVER svr2 SVGNAME = svg1, MIN = 1 svr2_1 SVGNAME = svg1, MIN = 1, TARGET = "svr2", CLOPT="-x TOUPPER:TOUPPER1,TOLOWER:TOLOWER1" *SERVICE TOUPPER SVRNAME = svr2 TOLOWER SVRNAME = svr2 TOUPPER1 SVRNAME = svr2_1 TOLOWER1 SVRNAME = svr2_1
The following is an example of using the -e and -o options.
CLOPT = "-e err1 –o out1 -- abc"
Option | Description |
---|---|
-e err1 | Save standard errors, which occur while server process(tpcals) is running, to the tpcals_err1 file in the ULOGDIR directory. |
-o out1 | Save standard output, which occur while server process(tpcals) is running, to the tpcals_out1 file in the ULOGDIR directory. |
The following shows how to set the value with -L option of the CLOPT setting.
*SERVER svr1 CLOPT = "-l –L SL_DFLT", ULOGDIR = "/EMC01/tmax/log/ulog" svr2 CLOPT = "-l –L SL_NODE", ULOGDIR = "/EMC01/tmax/log/nlog" svr3 CLOPT = "-l –L SL_SVG", ULOGDIR = "/EMC01/tmax/log/glog" svr4 CLOPT = "-l –L SL_SVR", ULOGDIR = "/EMC01/tmax/log/slog"
Value | Description |
---|---|
SL_DFLT | Same as default. |
SL_NODE | Create svclog in the ULOGDIR of NODE element. |
SL_SVG | Create svclog in the ULOGDIR of SVRGROUP element. If there's no ULOGDIR setting, it is created in the ULOGDIR of NODE element. |
SL_SVR | Create svclog in the ULOGDIR of SERVER element. If there's no ULOGDIR setting, it is created in the ULOGDIR of NODE element. |
If the -r option is set, the following log is recorded in SLOG, and the server restart count is not affected.
(W) SVR3032 service timeout error : SVC25 [SVR0403] (I) SVR3022 SVR (svr25) is down due to tpreturn(TPEXIT) at svc timeout handler. [SVR0305] (I) TMM0211 General Information : server closed due to TIMEOUT : SVR, pid = 15040 [TMM0161] (I) TMM3004 SVR (svr25) is restarted the 5th time [TMM0149]
MACRO Commands1
If the following macro is defined in the SERVER element, the file name is determined at server startup.
MACRO | Description |
---|---|
$(SVR) | Server name |
$(SVRI) | Server index |
$(SPRI) | Server process index |
$(SPRMIN) | MIN field of the SERVER element |
$(SPRMAX) | MAX field of the SERVER element |
$(SPRN) | Server process sequential number ( 0 - $(SPRMAX)) |
$(DATE) | Date of the MMDDYYYY format |
$(TIME) | Time of the HHMMSS format |
$(PID) | Process ID |
MACRO Commands2
If the following macro is defined in the SERVER element, the file name is determined immediately before tpsvrinit(), tpsvrdone() and the service functions are called for TCS server. For UCS server, It is determined immediately before tpsvrinit() and tpsvrdone() are called and tpschedule() is returned.
MACRO | Description |
---|---|
$(CDATE) | Date in MMDDYYYY format |
$(CTIME) | Time in HHMMSS format |
$(CYEAR) | Year in YYYY format |
$(CMONTH) | Month in MM format (01 ~ 12) |
$(CMONTHS) | Month in "Jan, Feb, ... Dec" format |
$(CDAY) | Day of the month, DD format (01 ~ 31) |
$(CWDAY) | Day of the week, D format (1 ~ 7) |
$(CWDAYS) | Day of the week, "Mon, Tue, ... Sun" format |
$(CYDAY) | Day of the year, DDD format (001 ~ 366) |
$(CHOUR) | Current hour, HH format (00 ~ 23) |
$(CMINUTE) | Current minute, MM format (00 ~ 59) |
$(CSECOND) | Current second, SS format (00 ~ 59) |
This MACRO is used to generate different types of log files (e.g., by date).
Example MACRO setting:
CLOPT="-o $(SVR).$(DATE).out –e $(SVR).$(DATE).err"
A log file will be created in the directory specified by the ULOGDIR field of [server name].03312001.out and [server name].03312001.err files. To modify a file name of standard error or standard output, use an absolute path name like '-e /usr/tmax/log/ulog/test.log'. The 'abc' option after '--' is passed to the tpsvrinit() function of the server program as argv[1] for the user.
MIN = numeric
Range: 1 ~ MAX_INT
Default: 1
Number of server processes that is created when Tmax starts up.
Unlike the conventional client/server model where one server process is loaded per client, Tmax manages and maintains a set number of active server processes. The CLH checks the status of server processes whenever a client issues a request and assigns the request to idle server processes to maximize system performance.
Since this value determines the default number of active server processes, it is important that the administrator sets MIN to a value appropriate for the system. If the number of server processes available for handling frequently requested services is too low, the wait time for processing the request will increase and system performance will decrease. On the other hand, if an excessive number of server processes are idle, system resources will be wasted and the performance of the system will decrease.
MAX = numeric
Range: 1 ~ MAX_INT
Default: 1
Maximum number of server processes that can be generated on the server.
While MIN specifies the number of server processes that are initially loaded, MAX sets the maximum number of server processes that can be loaded to handle requests. This value includes the total number of active server processes at any one time.
Initially as many server processes as MIN are loaded, and additional processes can be added up to the MAX value if load increases as client requests increase. Since this value has a strong impact on the system performance, care must be taken in setting the value. If a forked server process is used, set MAX to 0.
CONV = Y | N | B
Default: N
Option to use a conversational communication method.
There are three types of server communication methods in Tmax: synchronous, asynchronous and conversational. Services that use conversational communication must be registered with a server that is set to conversational communication. If set to a value other than “Y”, the server can only facilitate synchronous or asynchronous communication.
If set to CONV=B, the server process becomes the scheduling process. B represents BOTH, which supports both conversational (Y) and non-conversational (N) types. It can also be used for inter-domain communication through the domain gateway.
ASQCOUNT = numeric
Range: 1 ~ MAX_INT
Default: 0
Number of accumulated requests in the queue that automatically activates new server processes.
When the number of queued requests exceeds this value, additional server processes will be activated, up to the value set in MAX. If not set, additional server processes are not automatically activated.
If the number of server processes exceeds the MIN value, the status of the server processes are monitored and those that have been idle a given period of time are terminated to reduce the count. This option is not applied to POD type server processes.
MAXQCOUNT = numeric
Range: 1 ~ MAX_INT
Default: -1
If not set, the default value is used and MAXQCOUNT is not used.
Maximum number of requests that can be queued before additional requests are rejected by the server.
If the number of requests exceeds the value set in MAXQCOUNT, incoming requests will not be placed in the queue and an error message (tperrno = 26) is sent immediately to the requesting client. MAXQCOUNT is useful for systems that process large volumes of service requests at peak times, such as banks and public offices.
SVRTYPE = STD | UCS | CUSTOM_GATEWAY | STD_DYN | UCS_DYN | REALSVR | REALSVR_MT | EXTSVR | STD_MT
Default: STD
The following are the service types processed by the server.
Value | Description |
---|---|
UCS | While general service processes handle requests and send result when they occur, UCS server processes implement main() so that data can be sent to each user without a request. The stock quote service is an example of a UCS server process. |
REALSVR | REALSVR processes outperform UCS servers in terms of process usage and processing speed when small amounts of data are frequently sent to a large number of clients (more than 10 times per second). Only one RDP server can exist on each node. |
REALSVR_MT | Supports multithreading. |
CUSTOM_GATEWAY | Use with gateways for an external link such as Hostlink or TN3270 gateway. |
EXTSVR | Non-Tmax processes can use server functions registered in the Tmax configuration file. For details about the configuration file, refer to EXTPORT of "3.2.2 NODE" and EXTCLHPORT of the NODE element. |
STD_DYN, UCS_DYN | Can dynamically increase a MAX value specified in CFL of the SERVER element. Set STD_DYN in TCS, and UCS_DYN in UCS. Only these server types can dynamically modify a MAX value by using the set command of tmadmin. Set to STD_DYN or UCS_DYN in SVRTYPE of the SERVER element. If change in SPRI is checked using the si command after modifying MAX, SPRI order will be out of sequence. When the MAX value is modified, a SPRI that was already used on a server can be used on a different server. <Limitation> This option is not supported in FD_SET = 16384 version. MAX cannot be less than MIN. To reduce the MAX value, SPRs that will be removed must be in the down state. Example) If initially SPRIs are 8193, 8194, 8195, and 8192, then 8195 and 8192 must be shut down in order to reduce MAX to 2. |
STD_MT | Supports Multi Thread/Multi Context functions. A thread pool is configured internally and each thread provides services. Hence, a server process can handle multiple service requests concurrently. Also, a user can create additional threads at the application level in addition to the thread pool provided by the library. Service thread context can be shared in the newly created thread. Requires MINTHR, MAXTHR, STACKSIZE, and CPC configuration. |
CPC = numeric
Range: 1 ~ 128
Default: 1
Number of parallel communication channels between a UCS server and a CLH process. In situations where a single channel cannot handle the amount of requests, multiple communication channels can be used in parallel to increase processing speed.
Only applies to UCS, UCS_DYN, CUSTOM_GATEWAY, REALSVR, REALSVR_MT, STD_MT server types.
Required for STD_MT server type.
This value is related to the MAXCLH and MAXTHR items. MAXCLH x CPC value must be equal to or greater than the MAXTHR.
For instance, if MAXCLH is 1 and MAXTHR is 8, CPC must be at least 8, and if MAXCLH is 2 and MAXTHR is 8, CPC must be at least 4. This is because the maximum number of service requests that can be processed simultaneously by one server process is CPC x MAXCLH. Hence, MAXTHR does not need to be greater than CPC x MAXCLH.
If not set, the value, MAXTHR / MAXCLH, is used.
MINTHR = numeric
Range: 0 ~ MAXTHR
Default: 0
Minimum number of service threads that are initially created when a STD_MT server process starts. Required for STD_MT server.
If set to 0, a service request from CLH is processed after a thread is created.
MAXTHR = numeric
Range: 1 ~ 1000
Default: 1
Maximum number of service threads managed by a thread pool of the STD_MT server process. Required for STD_MT server.
Creating and adding threads whenever there is a service request can degrade performance. Create threads only up to the maximum number, which must be set after careful consideration.
A total of MAXTHR + 1 threads including the main thread can be running. The main thread does not handle service requests but manages service threads and requests. If the value is 1, it is recommended to use a general server library since only one service thread is created.
The MAXTHR item is related to the CPC and MAXCLH items. Refer to the 'CPC' item for detailed information.
STACKSIZE = numeric
Range: 0 ~ MAX_INT
Default: 0 (Unit: KB)
Stack size of the service threads in the STD_MT server process. If not set, the default size of the OS is used.
RESTART = Y | N
Default: Y
Option to reload the server if it is terminated abnormally.
MAXRSTART, GPERIOD
Fault tolerance related options. For more information, refer to "3.8. Fault Tolerance Settings".
TARGET = literal
A server name is a name of a server executable file, and TARGET is used to redefine a server process name. Server process refers to a process that executes the server executable file in APPDIR.
By setting TARGET as in the following, tmadmin can check for the actual server name and server process name by using ps.
Example) SVGNAME = svrgrp, MIN =1, MAX = 1, TARGET = svr2
/user1/starbj/tmax/sample/server> tmadmin --- Welcome to Tmax Admin (Type "quit" to leave) --- $$1 tmaxs1 (tmadm): st -p CLH 0: --------------------------------------------------- svr_name svgname spr_no status count avg svc --------------------------------------------------- SVR svrgrp 32 RDY 0 0 .00 -1 /user2/starbj/tmax/sample/server> ps starbj 28702 1 0 11:13:03 pts/8 0:00 cll -b 28700 starbj 28704 1 0 11:13:03 pts/8 0:00 svr2 -b 28700 -S SVR -s SVR -d -1 starbj 28701 1 0 11:13:03 pts/8 0:00 tmm -b 28700 starbj 28703 1 0 11:13:03 pts/8 0:00 clh -b 28700
Example configuration file for TARGET.
*SERVER original SVGNAME = svg0, copied1 SVGNAME = svg0, TARGET = "original", CLOPT = "-e $(SVR).err -o $(SVR).out -x ORIGINAL:COPIED1" copied2 SVGNAME = svg0, TARGET = "original", CLOPT = "-e $(SVR).err -o $(SVR).out -x ORIGINAL:COPIED2" *SERVICE ORIGINAL SVRNAME = original COPIED1 SVRNAME = copied1 COPIED2 SVRNAME = copied2
On copied1 and copied2 servers, server processes are initiated with the name 'original'. In general, a server name and a server process name are the same in Tmax, but if TARGET is used, the names are different. Thus, when Tmax starts up, three processes named 'original' starts.
If a service request is sent to COPIED1 and COPIED 2, the target is changed to original by [-x] option in the CLOPT setting. A client can request a service to COPIED1 and COPIED2 separately. The server and service count are also incremented when checking in tmadmin.
TARGET is useful when checking a separate COUNT for each object that calls the tpcall within the same program.
If using the tmdown -S command to modify the original server, only the original server shuts down and its version may not match with versions of the copied servers. Thus, it is recommended to shut down all servers that use the TARGET when executing tmdown.
AUTOTRAN = Y | N | B
Default: N
If a service is dynamically added to Tmax system using 'mksvr' while it is running, by default this value is set to 'N'.
The AUTORAN setting in the SERVER element will automatically load the transactions for services that have been added dynamically. This affects the setting of dynamically added service. Please refer to AUTOTRAN of the SERVICE element.
If AUTORAN is defined in both the SERVICE and SERVER elements, the SERVICE element setting is used.
Option B is used for compatibility with AUTOTRAN in old versions (~3.8.8). It works in the same way as Y, except that the transaction operates as a local transaction instead of a global transaction.
Versions that use outdated AUTOTRAN: Versions earlier than 3.8.9
If the XA server is called without tx_begin, a transaction is automatically started (Default: AUTOTRAN=Y), and it operates as a local transaction.
For an external call, transactions are not linked to each together, and it works like a TPNOTRAN call.
Versions that use current AUTOTRAN: 3.8.9 version or later
If AUTOTRAN is set to Y, global transactions are automatically started, and if there is an external call, they are automatically linked. Since the default value has been changed to 'N', the value must be explicitly set after an upgrade.
SCHEDULE = FA | RR
Default: FA
Processing order of transactions among server processes when the MIN value of the server is greater than 2.
Setting SCHEDULE
Value | Description |
---|---|
FA(First Available) | Allocate tasks to the process with the smaller number (higher priority). |
RR(Round-Robin) | Allocate tasks evenly among the processes. |
LIFESPAN = IDLE_DOWN | IDLE_0 | IDLE_sec
Default: IDLE_DOWN
Lifespan of the following additional server processes (more than MIN value).
POD server processes
Additional server processes that have been activated through ASQCOUNT
Additional server processes that have been manually activated by the tmboot -s command
Server processes started by POD (when MIN=0)
MIN = 0, MAX >= 1, or LIFESPAN=IDLE_DOWN
No server processes are loaded (MIN=0) when Tmax starts. If a client issues a service request, a server process is loaded (count=1) and it remains active until a user terminates it.
MIN=0, MAX>=1, LIFESPAN=IDLE_0
When a client issues a service request, a server process is loaded (count=1). After processing the request, the server process is automatically terminated if there are no requests to process.
MIN=0, MAX>=1, LIFESPAN=IDLE_sec
When a client issues a service request, a server process is loaded. After processing the request, it waits for further requests for the specified time period (sec). If no new requests are issued during the time period, the server process is terminated.
Server processes started through ASQCOUNT:
MIN=1, MAX>=2, ASQCOUNT=2, LIFESPAN=IDLE_DOWN
One server process is loaded (MIN=1) when Tmax starts. If there are 2 or more client requests in the queue, another server process is started to handle the next request. The newly added server process remains active until a user terminates it.
MIN=1, MAX>=2, ASQCOUNT=2, LIFESPAN=IDLE_0
If there are 2 or more client requests in the queue, another server process is started to handle the next request. This additional server process is immediately terminated if there are no requests waiting to be processed which leave just one active server process.
MIN=1, MAX>=2, ASQCOUNT=2, LIFESPAN=IDLE_sec
If there are 2 or more client requests in the queue, another server process is started to handle the next request. After processing the request, it waits for further requests for the specified time period (sec). If no new requests are issued during the time period, the server process is terminated.
DUMMY = Y | N
Default: N
Temporarily uses "__dummy" as the server name.
If DUMMY is set to Y in the SERVER element, the server process is not started during tmboot.
This item is useful when a dummy server setting, such as Domain Gateway Cousin, is required. For more details, refer to "B.2. Domain Gateway COUSIN Setting".
If not set, the following error occurs during tmboot.
(F) BOOT0014 exec error : /data1/tmaxkjh/tmax/appbin/tbrtest [BOOT0029]: No such file or directory
AUS = Y | N
Default: N
Allow Unregistered Services
When a server is started after a service has been deleted from the configuration but not from the application (not rebuilt), the server is restarted as many times as MAXRSTART.
If set to AUS=Y in the SERVER element, the server is started ignoring this setting.
CTX_EREPLY = Y | N
Default: Y
Only used for a UCS server. Other server types cannot use this option.
If a server process is terminated by tmdown -s, tmdown -s -i, or abnormal shutdown before tprelay() is called and after the UCS server calls tpsavectx() and saves the client information, the caller does not receive a response for the request. If set to 'Y', when the server process is being terminated an error message is sent to the client for requests that have not been handled by tprelay().
If the CTX_EREPLY option is set to default, when the server process is being terminated an error response is sent to the caller for requests that are being processed. This way, other processes on the server are not affected. This setting operates normally when the client information (CTX_T) created by tpsavectx() call is only managed internally in the server process.
But in an environment where multiple processes share the client information through IPC, when a specific process is abnormally terminated an error message may still be sent even if another process can execute tprelay(). Set to 'N' to prevent an error message from being sent.
MULTICLH = Y | N
Default: Y
If set to Y, a server process can concurrently receive requests from multiple CLHs when MINCLH >= 2. A server process handles concurrent service requests on a first-come-first-served basis. After the process completes the current request with the tpreturn call, it processes a request from another CLH.
If set to N, each server process can receive and handle service requests from a CLH. This prevents multiple CLHs from simultaneously requesting services to one server process. Each server process receives requests from an assigned CLH even though overload occurs on other CLHs which is inefficient in terms of performance.
Precautions if set to N
If the MIN value of the server is set, the value must be MINCLH or greater.
If the MAX value of the server is set, the value must be MAXCLH or greater. The MAX value does not need to be a multiple of the MAXCLH value.
Each server process is assigned a clh number, which it will be responsible for, in the ascending order of SPRI number. In other words, the first server process is responsible for the first CLH, the second one for the second CLH, etc. If the server process order number exceeds MAXCLH, the assignment restarts from the first CLH.
If the MINCLH and MAXCLH settings are different and CLH has not started when MAXCLH is reached, the server processes assigned to the inactive CLHs cannot receive any requests. Hence, when a server process is started through tmboot or tmm, server processes with SPRI assigned to an inactive CLH are not started. To start server processes with SPRI assigned to a CLH, the CLH must be running.
If the MINCLH and MAXCLH settings are different and an additional CLH is started, the tmboot command must be issued to start the server processes assigned to the CLH. Otherwise, the TPENOREADY error is returned when a service is requested from a client connected to the CLH.
When this setting is changed from the default value to 'N', the MIN and MAX settings must also be checked and adjusted to appropriate values. If MULTICLH is set to 'N' without changing the MIN and MAX settings, the number of processes that each CLH can schedule is reduced and may cause requests on a particular CLH to accumulate in the queue.
TMAPM = Y | N
Default: Y
Option to use tmapm for each service.
As a user function, it is recommended not to use tmapm when using a user defined function (tpsetsvctimeout()) to readjust the timeout value.
MAC = Y | N
Default: N
MAC(Master Alive Check) is used to terminate a server when TMM is terminated to prevent it from becoming a zombie process.
If set to MAC=Y, the server is terminated when TMM is terminated abnormally.
ROC = Y | N
Default: N
ROC(Reconnect Outbound CPC) is used to reconnect to CPC when a server is disconnected from CLH.
If set to ROC=Y, reconnection is attempted when CLH is alive and the socket is disconnected.
MAX_USE_COUNT = Y | N
Default: N
Number of times that the server calls a service before restarting the server.
If this setting triggers a server restart, TMM outputs "sever closed due to MAX_USE_COUNT or MEM_USAGE(CLOPT:-m)."
LOGLVL = string
Log level of the server.
ULOGDIR = literal
Path name of the directory where user messages are stored.
Users like Tmax application programmers can easily log messages for debugging and error and warning messages by using the userlog() function. The messages that are outputted by the userlog() function are stored in the ULOGDIR directory. Files called 'ulog_date' are created in the directory, and the messages are logged by date in each file.
If not set, messages are stored in the log/ulog directory under the directory specified in TMAXDIR. The system must exist in the specified path.
For details about the userlog function, refer to "Tmax Application Development Guide".
The following is an example of using the SERVER element.
*SERVER svr1 SVGNAME = svg1, CLOPT = "-e err1 -o out1 -- svr1 1", MIN = 1,MAX = 10, CONV = N svr2 SVGNAME = svg1, CLOPT = "-e err1 -o out1 -- svr1 2", MIN = 1, MAX = 10, CONV = N, SVRTYPE = UCS, CPC = 5
Services supported by Tmax must be registered in the SERVICE element. Even if the servers and services have been properly configured and are running, services cannot be processed until they have been added to the configuration file.
The following items can be defined for each service:
Server(s) that process the service
Priority level of the service
Timeout value for service processing
Routing information
The following is the syntax for the SERVICE element.
[DEFAULT : ] Service Name SVRNAME = server-process-name or gateway-name [FUNCTION= module-name,] [PRIO = priority-value,] [ROUTING = rout-name,] [SVCTIME = timeout-value,] [EXPORT = (Y) | N,] [AUTOTRAN = Y | (N) | B ,] [TXTIME = transaction-timeout-value]
Service Name = string
Size: Up to 15 characters
Function name (service routine name) of the service. The name must be unique within the SERVICE element. In a multi-domain environment, the Service Name must be unique across all domains in the system.
SVRNAME = string / literal
Size: Up to 15 characters
Name of the server that processes the service.
Use the executable file name of the server program that contains the service routine. The server must be defined in the SERVER element. If the server name includes any special characters, this must be wrapped in double quotes as in "Server Process Name". If multiple services are provided by a single server process, the same server process name can appear in the SERVICE element multiple times.
Default: item = value, …
Refer to DEFAULT of "3.2.2 NODE".
FUNCTION = string
File name of the module when the service name is different from the module name.
PRIO = numeric
Range: 1 ~ 100
Default: 50
Priority level of the service. A service with a higher number is given higher priority. For example, a service with a PRIO value of 100 has the highest priority.
ROUTING = string
Data routing setting. For more information, refer to "3.5. Load Balancing Settings".
SVCTIME = numeric
Range: 1 ~ MAX_INT
Default: 0
If not set, services wait indefinitely (default value).
Max time allowed for service processing. The service processing must be finished within this time period.
If the processing time exceeds SVCTIME, the server process will stop processing the service and will send an error message to the client. While BLOCKTIME in the DOMAIN element starts from the time that the client issues the requests (e.g., through tpcall() or tpacall()), SVCTIME starts from the time when the CLH passes the request to the server process and the server process begins to process the service. If SVCTIME is set to 0, time limit is infinite.
If service times out while using a database session, the next service cannot be processed since the session cannot be forced to disconnect from the database. Tmax resolves such problem in the following way. If service timeout occurs, a user can restart the server by using TPRETURN(TPEXIT, ...) in the tpsvctimeout routine which causes the MAXRSTART count in the SERVER element to be incremented.
It is also recommended to use the XA mode on Windows for application development. To use non-XA mode, set a sufficient number for RESTART count. SVCTIME only includes the processing time and excludes the time in the queue.
For more information about tpsvctimeout, refer to "Tmax Reference Guide".
EXPORT = Y | N
Default: Y
Option to process service requests from another domain in a multi domain environment.
If EXPORT is set to N and a request is sent from another domain via a gateway, a TPESECURITY error occurs.
AUTOTRAN= Y | N | B
Default: N
Option to automatically launch a global transaction for a service request that is received while in non-transaction mode.
It is different from AUTOTRAN in versions earlier than Tmax 3.8.8.
In the old versions, AUTOTRAN is set to Y by default, and a local transaction begins without executing tx_begin. In the new version, Tmax 3.8.8, AUTOTRAN is set to N by default, and a transaction is not automatically started.
If not set, tx_begin must be used to start a transaction. If set to Y, when the current service requests for another service they are grouped into a global transaction. If set to Y, and tx_begin is used to start a transaction, the TPESVCERR error occurs.
The following is an example of the configuration file and the tmadmin tool:
< config.m>
*SVRGROUP svg2 NODENAME = "tmax1" ### tms for Oracle ### svg3 NODENAME = "tmax1", DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60", TMSNAME = tms_ora *SERVER svr2 SVGNAME = svg2 ### servers for Oracle sample program### fdltest SVGNAME = svg3 *SERVICE ### services for fdltest ### FDLINS SVRNAME = fdltest FDLSEL SVRNAME = fdltest FDLUPT SVRNAME = fdltest FDLDEL SVRNAME = fdltest TOUPPER SVRNAME = svr2
<tmadmin>
tmax@tmax1;/user/tmax/tmax/config>tmadmin --- Welcome to Tmax Admin (Type "quit" to leave) --- $$1 tmax1 (tmadm): cfg -s ------------------------------------------------- svc_name prio(pr) autotran svctime(st) routno svrname svgno ------------------------------------------------- FDLINS 50 YES 0 -1 fdltest 2 FDLUPT 50 YES 0 -1 fdltest 2 FDLSEL 50 YES 0 -1 fdltest 2 FDLDEL 50 YES 0 -1 fdltest 2 TOUPPER 50 NO 0 -1 svr2 0 $$2 tmax1 (tmadm): q ADM quit for node (tmax1)
TXTIME = numeric
Range: 1 ~ MAX_INT
Default: 0
For more information, refer to TXTIME of "3.2.1 DOMAIN".
The following is an example of using the SERVICE element.
* SERVICE TOUPPER SVRNAME = svr1, PRIO = 1, SVCTIME = 60 TOLOWER SVRNAME = svr1, PRIO = 2
Unlike the DOMAIN, NODE, SVRGROUP, SERVER, and SERVICE elements, which must be configured, the GATEWAY element is optional and is only required for multi-domain systems.
If a system consists of multiple nodes in a single domain, it can be difficult to manage the system and the large volume of inter-node communication may degrade system performance. In this situation, it would be preferable to divide the nodes into separate domains and link the domains together into a single system through a gateway. Multiple GATEWAY elements can be defined in a domain, but each node can only access one gateway.
The gateway allows a client request to be passed to domains that it is not directly connected to. Multiple nodes can be assigned to a single domain in the GATEWAY element. A gateway can be assigned to only one node. Once a GATEWAY element has been configured, appropriate processes (based on gateway type) are loaded into the system.
The following items must be configured in the GATEWAY element.
Node where the gateway process runs on
TCP/IP information for gateway communications
Gateway type
The following is the syntax for the GATEWAY element.
[DEFAULT : ] Gateway Name NODENAME = node-name, PORTNO = port-number, RGWADDR = remote-ip-addr, RGWPORTNO = remote-port-number, GWTYPE = {TMAX | TMAXNONTX | SNACICS | OSITP | JEUS | JEUS_ASYNC | TUXEDO | TUXEDO_ASYNC | WSGW | XAGW } [MAXINRGW = numeric(32),] [CPC = channel-number,] [COUSIN = gateway-name,] [BACKUP = gateway-name,] [BACKUP_RGWADDR = remote-ip-addr,] [BACKUP_RGWPORTNO = remote-port-number,] [BACKUP_RGWADDR2 = Backup-Tuxedo-ipaddr2,] [BACKUP_RGWPORTNO2 = Backup-Tuxedo-domaingw-portno2,] [BACKUP_RGWADDR3 = Backup-Tuxedo-ipaddr3,] [BACKUP_RGWPORTNO3 = Backup-Tuxedo-domaingw-portno3,] [LOCAL_IPV6 = Y|(N),] [RGW_IPV6 = Y|(N),] [RGW_B1_IPV6 = Y|(N),] [RGW_B2_IPV6 = Y|(N),] [RGW_B3_IPV6 = Y|(N),] [TIMEOUT = second,] [DIRECTION = (BIDIR) | IN | OUT,] [CLOPT = string,] [RESTART = (Y)|N,] [MAXRSTART = numeric,] [GPERIOD = numeric,] [LOAD = numeric,] [PTIMEOUT = 1~MAXINT/2,] [PTIMEINT = 1~MAXINT/2,] [GWCHKINT = numeric,] [GWCONNECT_TIMEOUT = numeric,] [NLIVEINQ = numeric,] [TRB = nodename]
Gateway Name = string
Size: Up to 15 characters
Logical name of the gateway. Must be unique within the GATEWAY element.
NODENAME = literal
Size: Up to 255 characters
Name of the node where the gateway process runs on.
Node name must already be defined in the NODE element.
PORTNO = numeric
'listen' port number used by local gateway processes. Enables a remote gateway process to connect to a local gateway process. The port number must be configured in the RGWPORTNO item. Port numbers less than 1024 must not be used since they are reserved for system use.
Since port numbers are essential for communication between gateways, make sure not to use the port numbers that are used by other system functions.
RGWADDR = literal
Size: Up to 255 characters
Name or IP address of the node where the remote gateway process, to which the local gateway wants to connect, is running on.
If using the node name, it must be registered in the "/etc/hosts" file. The local gateway processes use both the IP address in RGWADDR and the port number in RGWPORTNO to connect to a remote gateway.
RGWPORTNO = numeric
Port number through which the local gateway process connects to a remote gateway process.
This number is a listen port number of a remote gateway process. Port numbers less than 1024 must not be used since they are reserved for system use.
Check that the RGWPORTNO is available for gateway communication.
GWTYPE = string
Type of the remote gateway to which the local gateway process is to connect.
Currently, the following nine types are supported.
Type | Description |
---|---|
TMAX | Tmax is the remote system. |
TMAXNONTX | Use multiplexing on inter-domain channels to enhance the efficiency of CPC in situations where the remote system is Tmax and inter-domain transactions are used. This improves the response time and decreases the overhead since processes occupy the gateway while waiting for results. |
TUXEDO | Tuxedo is the remote system. Communicates with a domain gateway of Tuxedo through a synchronous channel. |
TUXEDO_ASYNC | Tuxedo is the remote system. Communicates with a domain gateway of Tuxedo through an asynchronous channel. |
JEUS | JEUS is the remote system. |
JEUS_ASYNC | Used for asynchronous I/O communication with Async WebT on WAS(Web Application Server). While a remote system must be JEUS if GWTYPE is set to JEUS, it can connect to other Web Application Servers if set to JEUS_ASYNC. For more information, refer to "Tmax WebtAsync User Guide". |
WSGW | Can use Tmax services as Web services through bi-directional communication. |
XAGW | Used to process data from Tmax XA Library (libtxa.so). Guarantees 2PC between heterogeneous systems. |
SNACICS | Available for SNA LU6.2. It is a Hostlink gateway for transaction communication. |
Default: item = value, …
Refer to DEFAULT of "3.2.2 NODE".
MAXINRGW = numeric
Range: 1 ~ 128
Default: 32
Number of channels that can be used concurrently in the gateway.
This is only used when TMAXNONTX is configured in GWTYPE. If not set, the gateway will only connect to and receive service requests from up to 32 domains.
LOCAL_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when local gateway listens.
RGW_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when a local gateway uses IPV6 to connect to a remote gateway.
For Tmax v5.0 SP3 and later, RGW_PROTOCOL is recommended for use instead of this setting.
CPC = numeric
Range: 1 ~ 128
Default: 1
Number of parallel communication channels between CLH process of both domains when using the gateway.
In situations where high volumes of data need to be passed through the gateway process, parallel communication using multiple channels can speed up the processing. For gateways set as TMAXNONTX, it is sufficient to set CPC to 2 or 3.
TIMEOUT = numeric
Range: 1 ~ MAX_INT
Default: 0
If not set, services wait indefinitely (default value).
Max time allowed for inter-domain tpcall / tpacall.
If set to the default value, time limit is infinite. If the delay is less than 30 seconds, TIMEOUT does not occur since the gateway checks timeout every 30 seconds which is different from a server.
COUSIN = literal
Size: Up to 800 characters
Names of related gateways when a service needs to be distributed through multiple gateways (load balancing). Can use the names of gateways on the same node or different nodes. Both COUSIN and BACKUP items can be configured, but they must be set to different gateways.
The gateways set in COUSIN are in charge of routing, and the gateways set in BACKUP handle failures.
Can only use the gateway names registered in the GATEWAY element. Server groups cannot be used.
The following is an example of the environment file.
< config.m>
*SERVICE GWSVC1 SVRNAME = gw1 GWSVC2 SVRNAME = gw1 GWSVC3 SVRNAME = gw1 *GATEWAY gw1 NODENAME = node1, GWTYPE = TMAXNONTX, PORTNO = 10001, RGWADDR = "192.168.1.1", RGWPORTNO = 10002, LOAD = 1, CPC = 5, CLOPT = "-i", COUSIN = "gw1" gw2 NODENAME = node2, GWTYPE = TMAXNONTX, PORTNO = 10001, RGWADDR = "192.168.1.2", RGWPORTNO = 10002, LOAD = 1, CPC = 5, CLOPT = "-i"
The gateways, gw1 and gw2, are set to COUSIN. If there is a GWSVC1 service request, it is distributed and processed according to the LOAD configuration.
LOAD = numeric
Refer to "3.2.3. SVRGROUP Element" LOAD.
BACKUP = "gateway name"
Size: Up to 7999 characters
Name of the backup gateway to be used in the event of main gateway failure. It must be a gateway set in the GATEWAY element of the Tmax configuration file.
BACKUP_RGWADDR = "remote address"
Size: Up to 255 characters
IP address or node name of the backup remote gateway.
If using a node name, it must also be defined in the /etc/hosts file.
BACKUP_RGWPORTNO = "remote-port-no"
Port number of the backup remote gateway.
Used for listening. Port numbers less than 1024 must not be used since they are reserved for system use.
BACKUP, BACKUP_RGWADDR, and BACKUP_RGWPORTNO settings are all used for fault tolerance purposes.
Since the port number, BACKUP_RGWPORTNO, is used for communication between gateways, check that it is not used anywhere else.
RGW_B1_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol when local gateway connects to a backup remote gateway.
Used when connecting to a remote gateway whose address is BACKUP_RGWADDR and the port is BACKUP_RGWPORTNO.
BACKUP_RGWADDR2, BACKUP_RGWPORTNO2 = "remote address"
Size: Up to 255 characters
Used only for Tuxedo gateways (GWTYPE = TUXEDO | TUXEDO_ASYNC). Up to three backup Tuxedo gateways can be assigned by using BACKUP_RGWADDR2-BACKUP_RGWPORTNO2 and BACKUP_RGWPORT3-BACKUP_RGWPORTNO3.
RGW_B2_IPV6, RGW_B3_IPV6 = Y | N
Default: N
Option to use the IPv6 protocol to connect to second or third backup remote gateway. Used only for Tuxedo gateways (GWTYPE = TUXEDO | TUXEDO_ASYNC)
Used when connecting to a remote gateway whose address and port number are BACKUP_RGWADDR2 and BACKUP_RGWPORTNO2 or BACKUP_RGWADDR3 and BACKUP_RGWPORTNO3 respectively.
DIRECTION = BIDIR | IN | OUT
Default: BIDIR
Only used when GWTYPE is set to TMAX or TMAXNONTX.
Options are:
Value | Description |
---|---|
BIDIR | Bi-directional request processing. |
IN | Only incoming requests into the domain are processed through the gateway. A TPESECURITY error will be generated if an outgoing request attempts to use the gateway. |
OUT | Only outgoing requests from the domain are processed through the gateway. A TPESECURITY error will be generated if an incoming request attempts to use the gateway. |
CLOPT = string
Size: Up to 255 characters
Gateway command options that can be sent to the gateway when it starts up. Options preceding '--' are used by the system, and options following '--' can be used by the users.
Common user options are:
[-h Tmax Version Number]
This option is used to enable connection between a domain using Tmax v4.0 and later and a domain using older versions of Tmax. The version number of Tmax used by the target domain must be specified in the configuration file of the domain for Tmax 4.0 and later (this must be in the format: ‘xxxyyzz’).
The gateway communicates with the target domain according to the version specified in the configuration file. If the Tmax version of the target domain is set incorrectly, various errors will occur such as service block error. When TYPE=JEUS (JEUSGW), CLOPT must be set to "–h 1".
For Tmax 3.14.4, use the following setting.
CLOPT = "-h 031404"
[-c checktime]
Regularly check the checktime and attempt to reconnect if disconnected from CLH. If the blocktime is 5 seconds, the connection to CLH is checked every 5 seconds (if there is no request from RGW or CLH) even if -c option is used to set the checktime in GW to 15 seconds.
In the TUXEDO and TUXEDO_ASYNC gateways, this option is used to check whether the Tuxedo channel is alive. A service named "dus$%@tjq" is periodically called. If no response or request is received from Tuxedo during checktime (in seconds) * 2, it is determined that the channel is disconnected and the connection is terminated. The connection to Tuxedo can be reestablished when a new service request is received, or a partner gateway attempts to reconnect. If the connection terminates, the following log is recorded in slog.
This option can be used starting from Tmax v5.0 SP2 Fix#1.
(E) GATEWAY2062 remote gateway closed: 192.168.1.2 [TUXGW0307] (E) GATEWAY3030 failed to check rgw alive: rgw closed [TUXGW0027]
[-C svcname]
If the [-c] option is set for a TUXEDO or TUXEDO_ASYNC gateway, the service named "dus$%@tjq" is called by default when checking to see if the channel is alive. If set, a service with the name specified here is called for alive check.
[-i]
Connect to a channel independent from the service request. If not set, it operates as before. The gateway will attempt to reconnect to the remote domain when it is disconnected because of system or network failure in the remote domain.
In the past version, the gateway waits for GWCONNECT_TIMEOUT and tries to reconnect when there is a request. The new function separates the reconnection attempt from the service request. The gateway does not attempt to reconnect when a request made, but instead it sends a response according to the current status. This option provides faster error response to service requests that occurs when the gateway is disconnected from the remote domain.
If the gateway is disconnected from the remote domain when a request is made, it immediately sends the TPENOREADY error. After checking that the gateway is disconnected from the remote domain, the TPESYSTEM error is sent for requests that have already been sent to the remote domain. In the past versions, TPETIME error is sent in such situations. When connected to the remote domain, a request is sent. Reconnection is attempted independent of the service request and the smaller value between NLIVEINQ and BLOCKTIME is used as the retry interval. If GWCHKINT is set, it is used as the retry interval.
For fast response to service requests, it is important to set the value of BLOCKTIME according to the NLIVEINQ. If the BLOCKTIME is too short, the user may receive the TPETIME error before detecting the channel disconnection. And if the NLIVEINQ is too short, connection to the Gateway is attempted too frequently, which may cause the TPETIME error to occur instead of the TPENOREADY or TPESYSTEM error for most requests during network failure.
Reversely, if NLIVEINQ is too long, it will send the TPENOREADY error for most requests, but it will take too much time to detect the network failure. For IRT Gateway, this option must be used to independently connect to a channel. This is because when the IRT COUSIN setting is used, reconnection attempts cannot be made since the service request is not sent to the problematic Gateway.
IRT COUSIN is supported for TMAXNONTX, TMAX, JEUS, JEUS_ASYNC, TUXEDO, and TUXEDO_ASYNC gateways only.
IRT function is supported starting from Tmax v5.0 SP2 Fix#1 for the TUXEDO, TUXEDO_ASYNC gateways.
[-R]
Transaction Recovery function is not supported in Tmax v3.x versions and JTmax, and hence pending transactions may not be processed. To resolve this issue in Tmax v5.0, the processing method for pending transactions must be configured in advance.
Options are:
Value | Description |
---|---|
IGN | Does not commit/rollback pending transactions. Thus, DB must process commit/rollback. |
COM | Commit all pending transactions. |
RBK | Rollback all pending transactions. |
[-r]
Transaction Recovery function support.
Description | |
---|---|
GWTYPE=JEUS or JEUS_ASYNC | Use the Transaction Recovery function for transaction between WebT-JEUSGW and also between JEUSGW-JTmax. This option is only available for WebT version with Transaction Recovery function support. |
GWTYPE=TUXEDO or TUXEDO_ASYNC | Tuxedo domain ID that is transmitted when connecting to Tmax for authentication. If a gateway with a different domain ID tries to connect, an error occurs and access is denied. |
GWTYPE = TMAX or TMAXNONTX | This option is used to enable connection between domains that use different 3.x versions of Tmax. The Tmax version of the target domain must be specified as 'xxxyyzz'. (e.g., Tmax 3.8.15 : 030815) If set, gateway function varies depending on the Tmax engine version used by the target domain. XA related operations are different for each of the following Tmax version divisions. The -r option must be used if the Tmax version of the target domain is in a different division from the current version.
|
[-a]
Domain ID that is transmitted when connecting to Tuxedo. The ID must be configured in the Tuxedo configuration file.
[-p configuration file path]
The results and messages of handling a domain gateway requests are logged for each case defined in the specified configuration file. To use this option, LOGLVL of the gateway must be set to DEBUG4. LOGLVL can be dynamically changed using the chlog command in tmadmin. Since the log is output to stdout, the log file name must be specified using the -o option.
Configure each line with a type [on | off] in the specified configuration file. Each type is a number between 0 and 7 representing the following cases. Set a type to ON to enable logging for the case.
Type | Description |
---|---|
0 | When receiving a request (call/acall) message from clh |
1 | When receiving a response (call/acall) message from clh |
2 | When receiving a request (call/acall) message from a remote gateway |
3 | When receiving a response (call/acall) message from a remote gateway |
4 | When sending a request (call/acall) from clh |
5 | When sending a response (call/acall) from clh |
6 | When sending a request (call/acall) from a remote gateway |
7 | When sending a response (call/acall) from a remote gateway |
The following is an example of a configuration file that enables logging for all cases.
0 on 1 on 2 on 3 on 4 on 5 on 6 on 7 on
The following is the log format.
If a request is processed successfully, 0 is recorded. If it fails, 1 is recorded. Other items are set to an appropriate value, and the message is recorded in hexadecimal format on the subsequent line.
time [service_name] call type(0~7):success(0 or 1):data type(xx):data size(xx):errno(xx):urcode(xx) message
Note
If TMAXGW -h is specified to Tmax 3.x (e.g., 031404), and the -R option is not set, it is set to the default value, RBK.
If the -R option is not set while JEUSGW -h1 is set, it is set to the default, RBK.
JEUSGW -r (recovery support) and the -R option cannot be set together.
RESTART = Y | N
Default: Y
Option to restart the gateway if it is terminated abnormally.
MAXRSTART, GPERIOD
These two items are used to configure fault tolerance. Refer to "3.8. Fault Tolerance Settings".
PTIMEOUT = numeric
Range: 1 ~ MAX_INT/2
Default: -1
Maximum time that GW keeps the pending list. The maximum time must be less than or equal to the value of TIMEOUT divided by 2. (TIMEOUT >=PTIMEOUT)
Retransmit the pending transaction (prepare-done/commit/rollback) from the Domain Gateway to prevent any pending transactions even when a decision has not been received.
When Gateway1 and Gateway2 are connected through 2pc, if Gateway2 receives a prepare() and then does not receive a commit() or rollback(), Gateway2 will send prepare-done() to Gateway1. In this case, the PTIMEOUT and PTIMEINT settings can be used to prevent having a pending transaction when a decision is not received due to a network problem (or abnormal termination) between Gateways.
PTIMEINT = numeric
Range: 1 ~ MAX_INT/2
Default: -1
Specify the time interval for GW to retransmit a pending transaction (prepare-done, commit, rollback).
Maximum time must be less than or equal to the value of PTIMEOUT.
GWCHKINT = numeric
Range: -1 ~ MAX_INT
Default: -1
Interval for making a re-connect attempt to the main sever for failback while the gateway is connected to a backup.
Value | Description |
---|---|
-1 | Refer to the DOMAIN element configuration. |
0 | Failback is not used. |
GWCONNECT_TIMEOUT = numeric
Range: -1 ~ MAX_INT
Default: -1
Maximum waiting time for GW to connect to a remote gateway.
Value | Description |
---|---|
-1 | Refer to GWCONNECT_TIMEOUT item of the DOMAIN element setting. |
0 | Default value of 5 seconds. |
NLIVEINQ = numeric
Range: -1 ~ MAX_INT
Default: -1
Interval for sending a message to check if the channel that connects a gateway to a remote gateway is available.
Value | Description |
---|---|
-1 | Refer to the DOMAIN element setting. |
0 | Not used. |
TRB = string
For details, refer to TRB of "3.2.2 NODE".
The following is an example of using the GATEWAY element.
*GATEWAY gw1 NODENAME = "tmax1", PORTNO = 2222, RGWADDR = "192.168.23.1", RGWPORTNO = 2225, GWTYPE = TMAX, CPC = 10, CLOPT = "-r 030815"
The following is an example of using the VIEW type of Tuxedo.
*DOMAIN … *NODE ibm5l TMAXDIR = "…", APPDIR = "…", *SVRGROUP svg1 NODENAME = "ibm5l" *SERVER svr_sdl SVGNAME = svg1 *SERVICE TOUPPER_SDL SVRNAME = svr_sdl #svc for tuxedo TUX_TOUPPERSDL SVRNAME = TUXGW *GATEWAY TUXGW GWTYPE = TUXEDO, PORTNO = 9521, RGWADDR = "192.168.1.43", RGWPORTNO = 9511, CLOPT = "-a TUXGW1 -v", NODENAME = ibm5l, CPC = 20, TIMEOUT = 30
The following is an example of using GATEWAY to give processing priority to local nodes.
*DOMAIN tmax1 SHMKEY = @SHMEMKY@, MINCLH = 1, MAXCLH = 3, TPORTNO = @TPORTNO@, BLOCKTIME = 25, RACPORT = @TRACPORT@ *NODE @HOSTNAME@ TMAXDIR = "@TMAXDIR@", . . . @RMTNAME@ TMAXDIR = "@RMTDIR@", . . . *SVRGROUP svg1 NODENAME = "@HOSTNAME@", COUSIN = "svg2, svg3, svg4, gw1, gw2", LOAD = -2 svg2 NODENAME = "@HOSTNAME@", LOAD = -2 svg3 NODENAME = "@RMTNAME@", LOAD = -2 svg4 NODENAME = "@RMTNAME@", LOAD = -2 *SERVER svr2 SVGNAME = svg1 *SERVICE TOUPPER SVRNAME = svr2 *GATEWAY gw1 GWTYPE = TMAXNONTX, PORTNO = 7788, RGWADDR = "@GATENAME@", RGWPORTNO = 6688, NODENAME = @HOSTNAME@, CPC = 2, LOAD = -2 gw2 GWTYPE = TMAXNONTX, PORTNO = 7788, RGWADDR = "@GATENAME2@", RGWPORTNO = 6688, NODENAME = @RMTNAME@, CPC = 2, LOAD = -2
As you can see in the previous example, when client connects to HOSTNAME and calls TOUPPER service, the servers that belong to svg2, gw1, and svg1 will process the request in a round robin manner. (1st request: svg2, 2nd request: gw1, 3rd request: svg1, 4th request: svg2, …) If there is a failure with the server for svg1, svg2 and gw1 will process the request in order. When all three servers fail, the server group of another node specified as a COUSIN will process the request. When client connects to the RMTNAME, the servers in svg3, svg4, and gw2 will process the request in a round robin manner.
Local-first load balancing function of the domain gateway is only supported by gateways for non-XA connections.
The ROUTING element defines the routing settings used between the nodes of a domain, or between the domains in a multi-domain system. It is an optional element. For more information, refer to "data dependent routing" of "3.5. Load Balancing Settings".
This is an optional element. For more information, refer to "3.6. Reliable Queue Settings".
This is an optional element. For more information, refer to "3.7. HMS Settings".
The following is an example of a basic Tmax configuration file.
*DOMAIN res SHMKEY = 77990, MAXUSER = 300, MINCLH = 3, MAXCLH = 5, TPORTNO = 8899, BLOCKTIME = 60 *NODE tmax1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/slog", ULOGDIR = "/home/tmax/ulog", ENVFILE = svr_env tmax2 TMAXDIR = "/system/tmax", APPDIR = "/system/tmax/server", SLOGDIR = "/system/tmax/slog", ULOGDIR = "/system/tmax/ulog", ENVFILE = app_env *SVRGROUP svg1 NODENAME = tmax1 svg2 NODENAME = tmax2 svg3 NODENAME = tmax2, cousin = svg4 svg4 NODENAME = tmax2 *SERVER svr1 SVGNAME = svg1, CLOPT="-e err1 -- apple", MIN = 3, MAX = 5 svr2 SVGNAME = svg2, MIN = 4, MAX = 5 svr3 SVGNAME = svg3, CLOPT = "-e $(SVR).$(DATE).err –o $(SVR).$(DATE).out" *SERVICE svc1 SVRNAME = svr1, PRIO = 100, SVCTIME = 40 svc2 SVRNAME = svr2 svc3 SVRNAME = svr3
To process database related services, the appropriate database settings must be added to the configuration file. Once this information has been properly registered, connecting to and disconnecting from the resource manager, as well as opening and closing the database, will be managed by Tmax, and distributed transaction processing will be enabled.
Server groups play an important role in database configuration. A server group is defined by both the nodes where the servers of the group exist as well as the database type that they will access.
Servers in the same server group all use the same DBMS. Two servers that use different DBMSs cannot belong to the same server group. Thus, the server group is the basic unit for database management.
Databases are managed by the TMS (Transaction Management Server), a functional process of Tmax. When required, the TMS will be loaded into each server group to perform database management functions and manage transaction processing. The TMS will be further explained in "3.4. Distributed Transaction Settings".
Database information must be configured in the SVRGROUP element.
To properly enable Tmax’s database management features, the configuration file must be modified to include information about opening and closing the database used by each server group, as well as other information about the TMS of each server group.
To enable the database management features, the following items must be specified for each server group within the SVRGROUP element.
*SVRGROUP SVRGROUP Name [DBNAME = DBMS-name,] [OPENINFO = DBMS-open-information,] [CLOSEINFO = DBMS-close-information,] [TMSNAME = TMS-process-name,] [MINTMS = TMS-process-min-number,] [MAXTMS = TMS-process-max-number]
DBNAME = string
Size: Up to 63 characters
Name of the database to be used by the server group. Use standard DBMS names, such as ORACLE, INFORMIX, and SYBASE.
OPENINFO = string
Size: Up to 255 characters
Database information related to server group.
If using the same resource manager, e.g., database, using one server group for management can raise resource efficiency and enable distributed transaction processing. The OPENINFO syntax for this item will vary depending on the resource manager vendor (Oracle, Informix, etc.). If you are unsure of what to enter, refer to the relevant database manual.
Oracle database
OPENINFO="Oracle_XA+Acc=P/scott/tiger+SesTm=60"
"Oracle_XA" represents the Oracle database and XA interface, and "Acc=P/scott/tiger" represents the account and password for database access.
Informix database
OPENINFO for Informix database only requires the database name.
OPENINFO= Database Name
CLOSEINFO = literal (NULL)
Size: Up to 255 characters
Default: NULL
Must include information required by the resource manager to close the database of the server group.
This item is usually omitted or set to NULL. Informix database requires that CLOSEINFO be set to a null character ("") and it may be omitted for Oracle databases.
<Server group that uses Oracle>
*SVRGROUP svg1 NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc = P/scott/tiger+SesTm= 60"
<Server group that uses Informix>
*SVRGROUP svg2 NODENAME = tmax2, DBNAME = INFORMIX, OPENINFO = "test", CLOSEINFO = ''''
TMSNAME = string
Size: Up to 15 characters
Name of the TMS that will manage database transactions for the server group.
If OPENINFO for the database has been configured, the TMSNAME setting must also be set. The TMS process is required for managing the database of the server group from the systems that use the database. In order for Tmax to manage a database, the database open/close information must be configured, and TMSNAME must be defined for each server group to start the TMS process. The TMS process is a transaction manager that processes transactions through XA linked to the database. It is created by linking the libtms.a file in the $TMAXDIR/lib directory to the database library of the DBNAME defined in the SVRGROUP element.
MINTMS = numeric
Range: 1 ~ 32
Default: 2
Number of TMS processes that can be started for the server group. This setting will influence transaction processing management more than database management. The default value is two TMS processes per server group, which is enough for only database management.
MAXTMS = numeric
Range: 1 ~ 32
Default: 3
Number of additional TMS processes that can be loaded dynamically as needed. For more information, refer to "3.4. Distributed Transaction Settings".
The following is an example of a basic Tmax configuration file containing both the basic settings and database management settings.
*DOMAIN res SHMKEY = 77990, MAXUSER = 300 , MINCLH = 3 , MAXCLH = 5 , TPORTNO = 8899, BLOCKTIME = 60 *NODE tmax1 TMAXDIR = "/home/tmax" , APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/slog", ULOGDIR = "/home/tmax/ulog", TLOGDIR = "/home/tmax/tlog" tmax2 TMAXDIR = "/system/tmax", APPDIR = "/system/tmax/server", SLOGDIR = "/system/tmax/slog", ULOGDIR = "/system/tmax/ulog", TLOGDIR = "/system/tmax/tlog", ENVFILE = app_env *SVRGROUP svg1 NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60", TMSNAME = ora_ tms, MINTMS = 3, MAXTMS = 5 svg2 NODENAME = tmax2, DBNAME = INFORMIX, OPENINFO = "infodb",TMSNAME = info_tms, CLOSEINFO = "" *SERVER svr1 SVGNAME = svg1 , CLOPT="-e err1 -- apple", MIN = 3, MAX = 5 svr2 SVGNAME = svg2 , MIN = 4 , MAX = 5 svr3 SVGNAME = svg2, CLOPT = "-e $(SVR).$(DATE).err –o $(SVR).$(DATE).out" *SERVICE svc1 SVRNAME = svr1 , PRIO=100, SVCTIME = 40 svc2 SVRNAME = svr2 svc3 SVRNAME = svr3
One of the main functions of a TP Monitor (Transaction Processing Monitor) is enabling distributed transaction processing. This is when several transactions involving several heterogeneous database systems are grouped and processed as a single global transaction. To enable distributed transaction processing, database management settings must be properly configured. TMS processes must be started for each server group as shown in the following figure.
The CLH manages commit and rollback of sub-transactions within each distributed transaction. Distributed transactions will only be committed once all sub transactions have been committed. If any one of the sub-transactions is rolled back, the entire transaction will also be rolled back.
The management of commit and rollback statements for updating the database is conducted by the TMS within each server group. Items required to properly enable distributed transactions must be set within the DOMAIN, NODE and SVRGROUP elements.
The DOMAIN element contains items for specifying the two-phase commit (2PC) and transaction time-out values of distributed transactions.
Additionally, the following database related items are included within the DOMAIN element.
*DOMAIN Domain Name [CMTRET = (Y) | N,] [TXTIME = transaction-timeout-value]
CMTRET = Y | N
Default: Y
Setting for the two-phase commit process (2PC) for transaction processing. 2PC transactions consist of two phases, preparation and commit/rollback. Tmax supports 2PC for distributed transaction implementation.
Phase 1 (preparation): The transaction's processing state is verified with each DBMS to determine whether it has committed or rolled back.
Phase 2 (commit / rollback): Depending on the result of phase 1, the transaction is committed if all related transactions have been committed, or rolled back if any related transaction has been rolled back.
There are two modes for 2PC. In the complete return mode, the service returns after completing all transactions using 2PC protocol and logging all rollbacks. In the return immediately mode, for faster processing the service returns immediately after issuing a commit/rollback command in Phase 2. Either mode can be selected according to the system environment.
CMTRET determines whether to do a complete return.
Value | Description |
---|---|
Y | Complete return. |
N | For faster processing, service returns immediately after issuing a commit/rollback command. |
TXTIME = numeric
Range: 0 ~ MAX_INT
Default: 0
Timeout value for processing transactions, starting from when a transaction begins with tx_begin() to when the transaction ends with tx_commit() or tx_rollback(). If tx_commit() or tx_rollback() is not complete when the timeout expires, the transaction will be automatically rolled back.
In addition to the configuration required for database management, the NODE element contains items that specify the files for logging distributed transaction processes of each node.
The following are the items in the NODE element required for distributed transaction processing.
*NODE Node Name [TLOGDIR = transaction-log-path]
TLOGDIR = literal
Size: Up to 255 characters
Default: TMAXDIR
To handle a mid-transaction failure, all distributed transactions are logged. TLOGDIR is used to specify the file where transaction information will be stored.
This log file will be saved as an ordinary file since Tmax does not support raw files for logs. The general file defined in TLOGDIR with any name will only be used for logging transactions in situations with light transaction processing workload. To shorten response times in situations with heavy transaction processing workload, the specified raw file is used to set the device name to TLOGDIR without going through the UNIX file system. The device will only be used for logging.
The specified path must exist within the system in use.
A log file in the TLOGDIR path is saved in the binary format. The database transaction log can be saved by setting the trace flag in OPENINFO within the server group element.
TLOGDIR = "/home/tmax/log/tlog"
Add the following to the xa_NULLmmdd.trc file in the /tmp directory.
OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm = 60, DbgFl = 0x01 + LogDir=/tmp"
Most of the items required for configuring the database environment of each server group must be set within the SVRGROUP element. For more information, refer to "3.3. Database Configuration Settings".
The basic settings of the SVRGROUP element is as follows:
*SVRGROUP SVRGROUP Name [DBNAME = name-of-database,] [OPENINFO = string,] [CLOSEINFO = string,] [TMSNAME = name-of-tms,] [MINTMS = numeric,] [MAXRSTART = numeric,] [MAXTMS = numeric]
DBNAME = string
Name of the database used by the server group.
OPENINFO = literal
Information required for opening the database.
CLOSEINFO = literal
Default: NULL
Information required for closing the database.
TMSNAME = string
Name of the TMS process.
MINTMS = numeric
Minimum number of TMS processes for the server group.
This item is not important in terms of database management. However, it is very important in transaction processing. If there are too few TMS processes (one or two) when the transaction workload is high, commit/rollback procedures will generate a large resource overhead. Thus it is important to specify an appropriate number of TMSs to effectively manage resources and throughput.
MAXRSTART = numeric
Fault tolerance setting. For details, refer to "3.8. Fault Tolerance Settings".
Within the SVRGROUP element, this setting refers to the MAXRSTART of a TMS or RQ.
MAXTMS = numeric
Maximum number of additional TMS processes that can be loaded within the server group. As the transaction workload increases, additional TMS processes can be loaded up to MAXTMS.
The following is an example Tmax configuration file with distributed transaction settings.
*DOMAIN res SHMKEY = 77990, MAXUSER = 300 , MINCLH = 3 , MAXCLH = 5 , TPORTNO = 8899 , BLOCKTIME = 60 , CMTRET = N , TXTIME = 50 *NODE tmax1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/log/slog", ULOGDIR = "/home/tmax/log/ulog", TLOGDIR = "/home/tmax/log/tlog " tmax2 TMAXDIR = "/system/tmax", APPDIR = "/system/tmax/server", SLOGDIR = "/system/tmax/slog", ULOGDIR = "/system/tmax/ulog", TLOGDIR = "/system/tmax/log/tlog" *SVRGROUP svg1 NODENAME = tmax1, DBNAME = ORACLE , OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60, DbgFl=0x01 + LogDir=/tmp", TMSNAME = ora_tms, MINTMS = 3, MAXTMS = 5 svg2 NODENAME = tmax2, DBNAME = INFORMIX, OPENINFO = "infodb", CLOSEINFO = "", TMSNAME = info_tms, MINTMS = 3, MAXTMS = 5 svg3 NODENAME = tmax2 *SERVER svr1 SVGNAME = svg1, CLOPT = "-e err1 -- apple", MIN = 3, MAX = 5 svr2 SVGNAME = svg2, MIN = 4, MAX = 5, CLOPT = "-e $(SVR).$(PID).err –o $(SVR).$(PID).out" svr3 SVGNAME = svg3 CLOPT = "-e $(SVR).$(DATE).err –o $(SVR).$(DATE).out" *SERVICE svc1 SVRNAME = svr1, PRIO = 100, SVCTIME = 40 svr2 SVRNAME = svr2 svc3 SVRNAME = svr3
Load balancing is used by Tmax to optimize system performance and resource management during peak periods. Load Balancing can be set to operate in one of the following three modes.
When service requests are concentrated on a particular node, further requests will be sent to other nodes, maximizing the overall system performance.
For settings not described in each section, refer to "3.2. Basic Configuration".
Different volumes of service requests will be assigned to a node based on the system status and the node's performance. This type of load balancing must be used in situations where a single service can be processed by multiple nodes. System load setting must be defined for each server group.
To implement System Load Management, the following items must be defined within the SVRGROUP element.
*SVRGROUP SVRGROUP Name [COUSIN = group-name,] [LOAD = load-value]
COUSIN = literal
Size: Up to 255 characters
This is an item that specifies the name of server group when the Load Balancing function is used on 2 or more nodes.
Name of each server group must be registered in the SVRGROUP element. The Load Balancing function of Tmax system is processed in server group units. But when Load Balancing is processed across multiple nodes, each node name must be specified differently in each server group. The node name must already be configured in the NODE element of configuration file. When defining multiple server groups, separate them by using a comma(,). The required server program must exist in the APPDIR of each node. To use performance-based load balancing, a load value must be set for each server group.
LOAD = numeric
Range: -1 ~ MAX_INT
Default: 1
Represents the server group's service performance level. A higher value represents higher performance level.
Set to a high value for a high-performing node and a low value for a low-performing node.
For system-based load balancing, set the COUSIN item to the server group and set an appropriate LOAD value for each server group. To disable distributed processing on a node, LOAD must be set to –1. If LOAD is not set or set to 0, load balancing will be automatically performed based on the system load.
The following is an example of a Tmax configuration file for copying SVRGROUP.
Tmax configuration file for copying SVRGROUP in a multi-node environment
*DOMAIN site1 SHMKEY = 77990, MAXUSER = 400, MAXCLH = 5, TPORTNO = 8899, BLOCKTIME = 60, CMTRET = N, TXTIME = 50 *NODE NODE1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/log/slog", ULOGDIR = "/home/tmax/log/ulog", TLOGDIR = "/home/tmax/log/tlog " NODE2 TMAXDIR = "/system/tmax", APPDIR = "/system/tmax/appbin", SLOGDIR = "/system/tmax/log/slog", ULOGDIR = "/system/tmax/log/ulog", TLOGDIR = "/system/tmax/log/tlog" NODE3 TMAXDIR = "/system/tmax", APPDIR = "/system/tmax/appbin", SLOGDIR = "/system/tmax/log/slog", ULOGDIR = "/system/tmax/log/ulog", TLOGDIR = "/system/tmax/log/tlog" *SVRGROUP SVG1 NODENAME = NODE1, COUSIN = "SVG2,SVG3"……..(1) LOAD = 3 , DBNAME = ORACLE, OPENINFO ="ORACLE_XA+Acc=P/scott/tiger+SesTm=60", TMSNAME = tms1, MINTMS = 3 SVG2 NODENAME = NODE2, ……(2) LOAD = 2 SVG3 NODENAME = NODE3, ……(3) LOAD = 1, DBNAME = INFORMIX , OPENINFO = "infodb", CLOSEINFO = "", TMSNAME = tms2 ...... *SERVER SVR1 SVGNAME = SVG1, MIN = 5 , MAX = 10 SVR2 SVGNAME = SVG1 ...... *SERVICE SVC_A SVRNAME = SVR1 SVC_B SVRNAME = SVR1 SVC_C SVRNMAE = SVR2
Tmax configuration file for copying SVRGROUP in a single node environment
*DOMAIN site1 SHMKEY = 77990, MAXUSER = 400, MAXCLH = 5, TPORTNO = 8899, BLOCKTIME = 60, CMTRET = N, TXTIME = 50 *NODE NODE1 TMAXDIR = "/home/tmax", APPDIR = "/home/tmax/appbin", PATHDIR = "/home/tmax/path", SLOGDIR = "/home/tmax/log/slog", ULOGDIR = "/home/tmax/log/ulog", TLOGDIR = "/home/tmax/log/tlog " *SVRGROUP SVG1 NODENAME = NODE1, COUSIN = "SVG2" LOAD = 3 , DBNAME = ORACLE, OPENINFO ="ORACLE_XA+Acc=P/scott/tiger+SesTm=60", TMSNAME = tms1, MINTMS = 3 SVG2 NODENAME = NODE1, LOAD = 2 ...... *SERVER SVR1 SVGNAME = SVG1, MIN = 5 , MAX = 10 SVR2 SVGNAME = SVG1 ...... *SERVICE SVC_A SVRNAME = SVR1 SVC_B SVRNAME = SVR1 SVC_C SVRNMAE = SVR2
In Data Dependent Routing (DDR), service requests are assigned to server groups according to the range of data values.
DDR can only be used for services that use STRUCT, STRING, CARRAY, or FIELD KEY type buffers. To properly implement DDR, server group cousins must be configured within the SVRGROUP element, and routing settings must be defined in the SERVICE and ROUTING elements.
To use DDR, the following items must be defined in the SVRGROUP element.
* SVRGROUP SVRGROUP Name [COUSIN = group-name]
COUSIN = literal
Size: Up to 255 characters
DDR can only be used when multiple server groups provide the same service. Hence, the original SVRGROUP needs to be copied to a different node according to the COUSIN setting. For more information, refer to the description of COUSIN in "3.2.3. SVRGROUP".
To use DDR, the following items must be defined in the SERVICE element.
* SERVICE SERVICE Name [ROUTING = routing-name]
ROUTING = string
Size: Up to 15 characters
Logical routing name.
This must be unique within the SERVICE element, and will be used in the ROUTING element, which needs to be defined for a service to use DDR (this is explained next). Additionally, the typed buffer name, and field used for routing and its value range must be set with the server group name.
DDR can be implemented across the nodes of a domain, or across the domains of a multi-domain system by using the value of a specific field or member of the typed buffer.
ROUTING, set inside the SERVICE element, is used for configuring inter-node DDR within a domain. In this case, in addition to the ROUTING name, a STRUCT, STRING, or CARRAY typed buffer or a field buffer must also be defined. The member or field name of the buffer and its value range must also be set with the server group name. When DDR is used across domains in a multi-domain environment, the GATEWAY name must be specified in lieu of the server group name.
To use DDR, the following items must be defined in the ROUTING element.
* ROUTING
ROUTING Name FIELD = BufferType/field-name,
RANGES = "Range1: Group1, Range2: Group 2, ....",
MATCH = (FIRST)|MULTIPLE
ROUTING Name = string
Size: Up to 15 characters
Routing name defined in ROUTING item of the SERVICE element. Because DDR is implemented for each service, the ROUTING name must match the one defined in the SERVICE element.
FIELD = string
Size: Up to 2000 characters
This item is configured according to the field data type, STRUCT,FIELD, STRING, or CARRAY type, of the services that use data dependent routing.
The following is the configuration syntax for each of the four data types.
STRUCT type buffer
The STRUCT type buffer is a user-defined C struct, equivalent to the X_C_TYPE and X_COMMON buffers defined in X/OPEN. The name and contents of the struct must be declared in advance, and the file required by Tmax must be provided. Tmax references the environment variable, SDLFILE, to identify the contents of the struct.
STRUCT/subtype/fieldname
Item | Description |
---|---|
subtype | Name of the struct |
fieldname | Member of the struct used for routing |
FIELD type buffer
The buffer's FIELD item and field type must be defined in advance and the file required by Tmax must be provided. Tmax references the environment variable, FDLFILE, to identify the contents of the buffer.
FIELD/fieldname
Item | Description |
---|---|
fieldname | Name of the field to be used with routing. |
STRING and CARRAY type buffers
DDR is also supported for STRING and CARRAY type data. Specify “CARRAY” or “CARRAY/offset/length” to use CARRAY data and specify “STRING” or “STRING/offset/length” to use STRING data. There are two types of Data Dependent Routing: matching and range. Refer to "example" for more details about the difference between the two. Image type data can be stored in a CARRAY type buffer, but the data must be printable.
STRING or STRING/offset/length CARRAY or CARRAY/offset/length
For a description of offset and length, refer to the following "STRING/CARRAY: offset" and "STRING / CARRAY: length" sections.
STRING / CARRAY: offset = numeric(0)
Starting position of the input data that will be used for DDR. Both offset and length must be set to use only part of the data specified by the offset and length for DDR. For instance, STRING/0/4 represents offset of “0” and length of “4”. If the input data was “Tmaxsoft”, only "Tmax" which is 4 bytes in length starting from offset position of 0, will be used for comparison in performing DDR. This item is only used with CARRAY / STRING type DDR.
Offset and length must only be used for the range type DDR and not for the matching type because the offset and length items specify only the input data and are not related to the data specified in RANGES.
In the following example, only “abcd", 4 bytes counted from the offset (0), of the string “aaaaaaa” will be used as comparison criteria for DDR. Since “aaaa” (the comparison criteria for the input data) and “aaaaaaa” (specified in RANGES) do not match, the data will be processed by SVG2. Note that, in this case, all incoming data will be processed unconditionally by SVG2.
ROUTE_1 FIELD = "STRING/0/4", RANGES = "aaaaaaa":SVG1, *:SVG2
Offset and length are available when using the range type DDR.
In the following example (Range type DDR), if the input data is "aaaaaaa", only the "aaaa" part of the input data (4 bytes counted from the offset 0) will be used as comparison criteria for DDR. Since the string, "aaaa" is smaller than the range specified in SVG1, it will be processed by SVG2. If the input data is "bbbb", it falls in the range specified by SVG1, and hence it will be processed by SVG1.
ROUTE_1 FIELD = "STRING/0/4", RANGES = "aaaaaaa"-"ccccccc":SVG1, *:SVG2
STRING / CARRAY: length = numeric
As explained already, offset specifies the starting point of the element within the input data used for DDR criteria, and length specifies the length of element from the offset. Length must be used in conjunction with offset.
If length is not specified, Tmax will use the input data from offset until NULL, or the end of the data.
RANGES = "Range: Group1, Range: Group2, ...."
Size: Up to 2047 characters
Destination of client service requests based on the value of the field specified in FIELD.
Values specified must conform to the following.
For routing field, int, short, long, float, double, string, and char can be assigned.
For an integer or real number, a single value or a range, specified by a lower and an upper value, can be used.
For a matching type, strings are compared for a full match. A range type can be expressed by a lower and an upper value.
Positive(+) and negative(-) signs can be used.
Characters such as MIN (minimum value) and MAX (maximum value) can be used.
In a range specified as "A - B", "A" cannot be larger than "B".
An asterisk (*) can be used as a wild card. This is used to represent those values that are not included in other ranges. The asterisk wild card must always be defined to account for values not included in other ranges. However, the asterisk wild card can be omitted when both MIN and MAX are defined.
The server group name must be specified after the colon (:) which comes after the range. The server group specified here must be one that is set as a COUSIN within the SVRGROUP element.
The entire string must be enclosed in double quotation marks.
When configuring cross-domain routing, the domain gateway name must be used instead of the server group name.
If a string is used for routing, the value must be enclosed in single quotations.
MATCH = (FIRST)/MULTIPLE
When not using the MATCH option
*ROUTING rout1 FIELD = "STRING, CARRAY, FIELD/INPUT, STRUCT/test/a", RANGES = "min-'100':svg1,'101'-'200':svg1_2,min-'100':svg1_3,*:svg1_4"
If the configuration file is configured like the previous example, in the previous version, a server in svg1 is first inspected to process data within the range min-100. If a node containing svg1 is not running normally, its backup is examined, and if backup is not running or does not exist, an error is sent to the client. However, in the new version, Tmax will operate in the following way by specifying MATCH in the ROUTING element.
When using MATCH
*ROUTING rout1 FIELD = "STRING, CARRAY, FIELD/INPUT, STRUCT/test/a", RANGES ="min-'100':svg1,'101'-'200':svg1_2, min-'100':svg1_3,*:svg1_4" , MATCH=MULTIPLE
If the configuration file is configured as in the previous example, a server in svg1 is first inspected to process data within the range min-100. If a node containing svg1 is not running normally, its backup is examined. If the backup is not running or does not exist, Tmax searches for a next matching server group within the RANGES, and svg1_3 will be selected. If a node containing svg1_3 is alive, but if the server group svg1_3 is also not running, its backup is examined. If the backup does not exist or is not running normally, a next matching server group, svg1_4, will be selected.
Set "MATCH=FIRST" to use the function of the previous Tmax version.
The following are examples of DDR.
When using an integer
In the following example, for the 'number' member of the 'student' struct, service requests with data values between a negative number and 3 will be routed to SVG1, between 4~6 will be routed to SVG2, and over 7 will be routed to SVG3.
ROUTE_1 FIELD = "STRUCT/student/number", RANGES = "MIN - 3 : SVG1, 4 - 6 : SVG2, 7 - MAX : 1SVG3"
In the following example, even numbers will be processed by SVG1 and odd numbers will be processed by SVG2. Since the range is specified by the MOD operator, this can produce a much wider range.
ROUTE_1 FIELD = "STRUCT/student/number", RANGES = "MOD2 = 0 : SVG1, MOD2 = 1 : SVG2"
When using a buffer field
In the following example, if the INPUT field value is ‘STRING’, the service request will be processed by SVG1, otherwise it will be processed by SVG2. When service requests are routed across domains, the gateway name assigned to the domain needs to be specified in place of the server group name. If DDR is performed using a string value, it must be enclosed in single quotations.
ROUTE_1 FIELD = "FIELD/INPUT", RANGES = "'STRING' : SVG1, *: SVG2"
When using a STRING or CARRAY (Matching DDR)
In the following example, if the value of STRING or CARRAY is ‘aaa’, the request will be processed by SVG1, otherwise it will be processed by SVG2. When using the matching type DDR, it is important to remember that the data will only be considered as a match when the length of the input value is same as the defined range. In the following example, the defined range for SVG1 is ‘aaa’, so any other strings such as ‘aaab’ and ‘aaac’ will be processed by SVG2.
ROUTE_1 FIELD = "STRING", RANGES = "'aaa' : SVG1, *: SVG2" ROUTE_2 FIELD = "CARRAY", RANGES = "'aaa' : SVG1, *: SVG2"
When using STRING, CARRAY (Range type)
In the following example, if the value of STRING or CARRAY is between ‘aaa’ and ‘ccc’, the service request will be processed by SVG1, otherwise it will be processed by SVG2. Range type DDR will check the entire string regardless of the data length for cases like the following example.
ROUTE_1 FIELD = "STRING", RANGES = "'aaa'-'ccc' : SVG1, *: SVG2" ROUTE_2 FIELD = "CARRAY", RANGES = "'aaa'-'ccc' : SVG1, *: SVG2"
When using STRING, CARRAY (Range type, specify the length for DDR comparison)
In the following example, only the string between the offset (0) and the length (4) will be used as the comparison criteria for DDR (“aaaa”). If the input data is “aaaaaaa”, only the initial element “aaaa” will be used as the comparison criteria. In the following example, since “aaaa” is smaller than the range specified for SVG1, the service request will be processed by SVG2. If the input data is “bbbbbbb”, the request will be processed by SVG1, since it falls within the specified range.
ROUTE_1 FIELD = "STRING/0/4", RANGES = "'aaaaaaa'-'ccccccc':SVG1,*:SVG2",
When simultaneously using various data types
In the following example, STRING, CARRAY, and FIELD are simultaneously used as comparison criteria for DDR. If the input data is less than or equal to 1000, the service request will be processed by SVG1; if the input data is between 1001 and 2000, it will be processed by SVG2; otherwise it will be processed by SVG3.
ROUTE_1 FIELD = "STRING/0/4, CARRAY, FIELD/INPUT", RANGES = "min-'1000' : svg1, '1001'-'2000': svg2, *:svg3"
A common problem in systems that do not use a TP Monitor is that if the system shuts down due to system failure, all queued data is lost. Tmax’s reliable queue feature resolves this problem by loading service data into the disk file instead of memory, enabling requests to be processed after a system reboot.
Basic RQ settings are defined within the DOMAIN, NODE, SVRGROUP, SERVER, and SERVICE elements, and a separate RQ element must also be added to the file.
RQ can help preserve data during a system failure, but may slow down the performance.
When configuring RQ, the following items must be defined within the SVRGROUP element. RQ does not support the COUSIN item.
* SVRGROUP RQ SVRGROUP Name [NODENAME = node-name,] [CPC = channel-number,] [SVGTYPE = RQMGR]
NODENAME=string
Size: Up to 15 characters
Node where the RQ server group exists. Must be defined in the NODE element.
CPC = numeric
Range: 1 ~ 128
Default: 4
Number of parallel communication channels between the RQS and CLH processes. If the queue is used often, using multiple channels can increase the overall performance.
SVGTYPE = string
Server group type. To use RQ, this must be set to RQMGR.
A single RQ from a single server group, or a group of multiple RQs can be configured.
RQ Name SVGNAME = rq-svrgroup-name, [QSIZE = size-number,] [FILEPATH = file-path,] [BOOT = WARM | (COLD),] [FSYNC = (Y) | N,] [BUFFERING = (Y) | N]
RQ Name = string
Size: Up to 15 characters
Logical name of the RQ. Multiple RQs can be defined within the RQ section, but each RQ must have a unique name. Multiple RQs can be defined for a single node.
SVGNAME = string
Size: Up to 15 characters
The server group that uses the RQ and must be a RQ SVRGROUP name in the SVRGROUP.
QSIZE = numeric
Range: 1 ~ 2047
Default: 16 (Unit: MB)
RQ space for storing enqueued data.
Since the RQ size will not automatically increase to account for increased demand, the size set here must be enough to avoid overflow errors. If there is no available RQ space to save a new RQ file, the file will be automatically deleted when Tmax shuts down.
FILEPATH = literal
Size: Up to 255 characters
Default: $(TMAXDIR)/path/rq-name
Location of the file used by the RQ. The full directory and file names must be specified to create the required RQ data file.
BOOT = WARM | COLD
Default: COLD
How to treat service requests stored in the RQ after a reboot.
Refer to the following table.
Value | Description |
---|---|
WARM | Services accumulated in the queue can be recovered after the system reboots. |
COLD | Service requests saved on the disk will be ignored after the system reboots. |
FSYNC = Y | N
Default: Y
Option to call fsync after saving to the disk.
Refer to the following table.
Value | Description |
---|---|
Y | RQ data is safely stored on the disk, but processing speed is slower. |
N | RQ processing is faster, but data may be lost during a system failure. |
BUFFERING = Y | N
Default: Y
Option to cache RQ files in memory.
If set to N, RQ processing is slower but the amount of memory required is smaller.
A Messaging System is a communication mediator that enables a loose coupling between the sender and the receiver. Through the messaging system, they can communicate with each other by using only the destination information, e.g., virtual channel, without information about each other. The times when the message is sent and received are recorded separately to allow for delayed processing, and reliability is guaranteed for sending/receiving messages.
To use HMS(Hybrid Messaging System), the DOMAIN, NODE, SVRGROUP, and HMS elements must be configured. For details about HMS, refer to "Tmax HMS User Guide".
HMS is configured in the DOMAIN element as follows:
*DOMAIN
Domain Name [MAXSESSION = numeric]
MAXSESSION = numeric
Range: 1 ~ 65535
Default: 1024
Maximum number of sessions that can be created in HMS within the domain.
HMS is configured in the NODE element as follows:
*NODE
Node Name [MAXSESSION = numeric]
MAXSESSION = numeric
Range: 1 ~ 65535
Default: 1024
Maximum number of sessions that can be created in HMS within the node.
HMS is configured in the SVRGROUP element as follows:
*SVRGROUP SVRGROUP Name NODENAME = node-name, SVGTYPE = HMS, HMSNAME = string, OPENINFO = literal, HMSINDEX = numeric, HMSMAXTHR = numeric, HMSMAXDBTHR = numeric, [HMSSUBSCFG = string,] [HMSMSGLIVE = numeric,] [HMSPORT = numeric,] [HMSHEARTBEAT = numeric,] [HMSGQINT = numeric]
SVRGROUP Name = string
Size: Up to 15 characters
Logical name of the server group. Must be unique in the SVRGROUP element.
NODENAME = string
Size: Up to 15 characters
Node where the server group exists. Must be a node that is defined in the NODE element.
SVGTYPE = string
Server group type. To use HMS, this must be set to HMS.
HMSNAME = string
Size: Up to 15 characters
Name of a user-built HMS process.
OPENINFO = literal
By default, HMS uses a database for storage. Specify OPENINFO of the DBMS to which HMS will connect.
Initialize the database connection, and define OPENINFO using the syntax required by the database.
HMSINDEX = numeric
Range: 0 ~ 65535
Used for processing an HMS message. Must be unique within the domain.
HMSMAXTHR = numeric
Range: 0 ~ 65535
Number of threads that will not be used for storage processing.
Must be set to a large value when sending and receiving only nonpersistent messages. For basic use of HMS, this item must be set above a certain value.
HMSMAXDBTHR = numeric
Range: 0 ~ 65535
Number of threads used for storage processing.
Must be set to a large value when there are many persistent messages. For basic use of HMS, this item must be set above a certain value.
HMSSUBSCFG = string
Size: Up to 255 characters
Path and name of the configuration file where a durable subscriber is defined.
In the file, set LABEL to [TopicName], and then use a colon(:) as a delimiter to specify ClientName:Listener:Selector (in this order) on each line.
The durable subscriber defined in the configuration file is automatically registered when HMS is started.
HMSMSGLIVE = numeric
Range: 0 ~ 65535 (Unit: hour)
HMS stores persistent messages in the storage. Specify a time interval for regularly deleting the accumulated messages from the storage.
Topic messages received by all subscribers and consumed queue messages are removed from the storage after the specified time. Messages that a durable subscriber has not received are not deleted from the storage even after the specified time.
HMSPORT = numeric
For clustering multiple HMSs, each HMS creates a channel to communicate with others. Specify a port number to be used for this purpose.
If there is a destination that is set to GLOBAL, HMS will listen through the specified port number. Make sure to specify a port number that is not already in use.
HMSHEARTBEAT = numeric
Range: 0 ~ 65535 (seconds)
For clustering multiple HMSs, heartbeat messages are regularly exchanged to detect a network failure between HMSs. Specify a time interval to transmit this message. If a heartbeat message does not come from another HMS within the specified interval, it is regarded as a sign of failure and the connection to the failed HMS is terminated.
HMSGQINT = numeric
Range: 0 ~ 65535 (Unit: milliseconds)
To exchange messages between GLOBAL queues, state information of each queue must also be exchanged. Specify a time interval to exchange this information.
This item must be set to use clustered queues. The shorter the interval, more evenly the data will be distributed to the queues, but heavier network loads will be incurred. Thus, an appropriate value must be set.
In the HMS element, set the destination information of the HMS. The following is the basic configuration of the HMS element.
*HMS
Destination name SVGNAME = string,
TYPE = TOPIC | QUEUE,
[BOOT = WARM | (COLD),]
[GLOBAL = Y | (N),]
[GQTHR = numeric,]
[GQMAXREQ = numeric,]
[GQFULL = numeric]
Destination name = string
Size: Up to 15 characters
Destination name. A producer and consumer are created using this name.
SVGNAME = string
Size: Up to 15 characters
HMS server group name of the destination. The SVGNAME must be an HMS server group name specified in the SVRGROUP element.
TYPE = TOPIC | QUEUE
Destination type. Currently, only TOPIC and QUEUE are supported.
BOOT = WARM | COLD
Default: COLD
How to treat service requests stored in the RQ after a reboot.
Like in RQ, set either to WARM or COLD.
Refer to the following table.
Value | Description |
---|---|
WARM | Services accumulated in the queue can be recovered after the system reboots. |
COLD | Service requests saved on the disk will be ignored after the system reboots. |
GLOBAL = Y | N
Default: N
Option to use destinations with the same name in clustered HMSs logically as a single destination.
For GLOBAL setting, HMSPORT must be set in HMS of the SVRGROUP element.
For GLOBAL queue setting, the following items are also required.
GQTHR = numeric
Range: 0 ~ 65535
Coefficient to determine the buffer size maintained by a clustered queue.
A buffer size is the number of consumers X GQTHR value. If the length of the current queue is shorter than the buffer size, the queue takes messages from another clustered queue. If the queue contains less messages than the buffer size, it does not distribute its messages upon a distribution request.
GQMAXREQ = numeric
Range: 1 ~ 65535
Number of messages that can be requested at once to another queue. If the specified value is large, the queue will be filled with messages very quickly. If the value is too large, there may be unnecessary message transmissions between nodes. Thus, an appropriate value must be set.
GQFULL = numeric
Range: 0 ~ 65535
Number of messages that can be accumulated in a queue. If more than the specified number of messages is accumulated in a queue, any subsequent messages are evenly distributed to the clustered queues on another node.
Tmax provides the following fault tolerance features.
Protection against hardware failures (node or network failures): fault tolerance using backup services
Protection against software failures (process shut down): fault tolerance using server process restart
When this is properly configured, a backup service will continue to process services when they cannot be processed due to a system failure. This is implemented by specifying the BACKUP item within the SVRGROUP element.
* SVRGROUP SVRGROUP Name [BACKUP = group-name]
BACKUP = literal
Size: Up to 255 characters
Backup server group.
Multiple backup server groups can be specified by using a comma (,) as a separator. If the original server group fails, the first specified backup will be activated, and if this backup server group also fails, the next server group will be activated, and so on.
All of the specified backup server groups must be registered within the SVGROUP element. The backup server groups must be configured to comply with the settings of the original server group. To change the configuration options, relevant items can be redefined for each server group or server. However, service settings must be the same for the original and backup server groups. These rules are the same as those for duplicate server groups created for load balancing.
Unlike the duplicate server groups created for load balancing, backup nodes are not initially active when Tmax is launched. Instead, they are activated to replace the original server group when the original server group fails.
When this feature is properly configured, server processes, such as CLH and CAS, will be automatically restarted when they shut down unexpectedly.
* NODE NODE Name [RESTART = (Y) | N,] [MAXRSTART = numeric,] [GPERIOD = time-value]
RESTART = Y | N
Default: Y
Option to restart CLH, CAS, CLL, and TLM upon abnormal termination.
If set to Y, the server processes will be restarted when they shut down unexpectedly due to a system failure.
MAXRSTART = numeric
Range: -1 ~ MAX_INT
Default: -1
Maximum number of times a CHL or CAS process can be restarted.
MAXRSTART is used in combination with the RESTART and GPERIOD items. If RESTART is set to 'Y', a process will be restarted MAXRSTART times during the GPERIOD. If set to 'N', Tmax will ignore this setting. If set to '-1', there will be no limit to the number of times that a process can be restarted.
GPERIOD = numeric
Range: 1 ~ MAX_INT
Default: 86400 (24 hours) (Unit: second)
Time period for which MAXRSTART is valid.
If a server process is unexpectedly terminated, it will be restarted MAXRSTART times during the GPERIOD. Once the GPERIOD expires, this procedure will be repeated.
* SVRGROUP SVRGROUP Name [RESTART = (Y) | N,] [MAXRSTART = numeric,] [GPERIOD = time-value]
RESTART, MAXRSTART, GPERIOD
If the SVGTYPE is RQMGR, these items configure the restart setting of the RQ. If the SVGTYPE is XA svg, they configure the restart setting of the TMS.
If a server process is abnormally terminated, the process automatically restarts to provide services.
For more information of each item, refer to the previous "NODE" section.
* SERVER SERVER Name [RESTART = (Y) | N,] [MAXRSTART = numeric,] [GPERIOD = time-value]
RESTART, MAXRSTART, GPERIOD
These items configure the restart setting of the server processes.
If a gateway process is abnormally terminated, the process automatically restarts to provide services.
For more information of each item, refer to the previous "NODE" section.
* GATEWAY GATEWAY Name [RESTART = (Y) | N,] [MAXRSTART = numeric,] [GPERIOD = time-value]
RESTART, MAXRSTART, GPERIOD
These items configure the restart setting of the gateway.
If the gateway process is abnormally terminated, the process automatically restarts to provide services.
For more information of each item, refer to the previous "NODE" section.
There are three security levels in Tmax system.
Level 1: System access control
Controls access to Tmax.
Level 2: User authentication
Limits service access to the authenticated users.
Level 3: Service access control
User access control can be configured per service.
Each level includes the previous level(s). If level 2 security is configured, level 1 security settings will also be applied. Level 3 security includes security levels 2 and 1. To properly configure Tmax security settings, the SECURITY item must be set within the DOMAIN element.
* DOMAIN DOMAIN Name [SECURITY = ("NO_SECURITY")| "DOMAIN_SEC"|"USER_AUTH",] [OWNER = user-name]
SECURITY = "NO_SECURITY" | "DOMAIN_SEC" | "USER_AUTH" | "ACL" | "MANDATORY"
Default: "NO_SECURITY"
Refer to the following table.
Value | Description |
---|---|
NO_SECURITY | No security features are used. |
DOMAIN_SEC | Option to use level 1 security (system access control only). "DOMAIN_SEC" must be specified in the SECURITY item within the DOMAIN element. Use mkpw to set a single password for Tmax system, and users who know the password can access the system. To use this level, the OWNER item must be defined in the DOMAIN element. |
USER_AUTH | Option to use level 2 security (user authentication). USER_AUTH must be specified in the SECURITY item within the DOMAIN element. Tmax manages user accounts and passwords and allows service access to only authorized users. User IDs and passwords are created with the mkpw utility. A user must register a valid ID and password in the usrname and usrpwd items of TPSTART_T. Users who fail to be authenticated cannot access the system. |
ACL, MANDATORY | Option to use level 3 security (service access control). Users will only be able to use those specific services that they have been granted access to. Service access is controlled for each user group. A service can be accessed by users of a group, which is allowed to access the service. For this feature to be properly implemented, a group file as well as files for the users that belong to the group must be created. There must also be an acl file that assigns the services accessible to the user groups. |
Utilities such as mkgrp, mkpw and mkacl must be used to generate each of these files. Both ACL and MANDATORY are set to level 3 security. The following describes their differences.
Value | Description |
---|---|
ACL | Only the users that are registered in the group file have access to the services in the acl file. Services not in the acl file may be accessed by any user with access to the Tmax system. |
MANDATORY | This is identical to ACL in that only registered users will be able to access the services. However, services not in the acl file cannot be accessed by any user with access to the Tmax system. |
OWNER = string
Size: Up to 15 characters
Password for the dompwd of TPSTART_T. This password will be used to log into the Tmax system. If no password or an invalid one is provided, users will not be able to access the Tmax system. The user and password defined here can be created with the mkpw utility.
After configuring the security, a password file must be created with the mkpw utility. This file includes passwords of each user, and is encrypted. For Tmax security system to work properly, the password file must be created before configuring the Tmax system.
For DOMAIN_SEC, if the specified password is different from the dompwd value of the TPSTART_T structure in tpstart(), the client program cannot make a service request. The tperrno is set to TPESECURITY(25). For USER_AUTH, the usrpwd and usrname fields in the TPSTART_T struct must be the same as the account and password registered in the password file created with the mkpw utility.
Since level 2 (user authentication) security includes level 1 (system access control), the specified dompwd must be the same as the set domain password.
Note that a password file must be created or reset before starting the Tmax system.
A Tmax user can allow or not allow a client to access the system based on IP by creating 'tmax.allow' and 'tmax.deny' configuration files for allowing and denying access. In CLL of each file, select 'allowing access' or 'denying access' of TCP/IP clients.
Client allowed access
Create a file to allow access (tmax.allow) in the "$TMAXDIR/path" directory, and specify IP of the clients to be allowed to access the system in the file.
IPv4
192.168.1.43 192.168.1.48
IPv6
fe80::213:77ff:fe4d:c57d fe80::213:77ff:fe4d:c570
Client denied access
Create a file to deny access (tmax.deny) in the "$TMAXDIR/path" directory, and specify IP of clients to be denied from accessing the system in the file.
IPv4
192.168.1.35 192.168.1.45
IPv6
fe80::213:77ff:fe4d:c50d fe80::213:77ff:fe4d:c500
Applying ACL(Access Control List)
Search the tmax.allow file first, and if there are clients that are in the ACL, allow them to access the system.
Search the tmax.deny file, and if there are clients that are in the ACL, deny them from accessing the system. If they attempt to access the system (TPSTART), the TPECLOSE error occurs.
Allow access to clients who exist in neither tmax.allow nor tmax.deny files.
Syntax
If the first character is '#', it is processed as a comment.
Allow only IP or NETWORK/NETMASK type.
Example)
(IPv4)(IP_V4)192.168.1.1 or 192.168.1.0/24, (IPv6)fe80::213:77ff:fe4d:c57d or fe80::213:77ff:fe4d:c57d/64
One ACCESS CONTROL LIST is allowed per line, and a blank or tab character is not allowed.
ALL is a reserved word meaning all IPs.
The tmax.allow and tmax.deny files are applied when CLL starts, but any changes to the files cannot be applied dynamically.
In systems comprised of multiple domains, Tmax can enable the processing of inter-domain transactions, providing users with extended global transactions and supporting inter-domain data dependent routing to reduce development burdens.
To properly enable a multi-domain system, gateway information must be configured in the GATEWAY item of the DOMAIN element. Additional routing information needs to be specified in the ROUTING and SERVICE elements. For details about each element, refer to "3.2. Basic Configuration".
Basic gateway information, including Shared Memory Key information, port number, MINCLH, and MAXUSER, must be registered within the DOMAIN element. For distributed transactions, 2PC (Two Phase Commit) availability and transaction time-out settings can also be configured.
Refer to the following example of the DOMAIN element for multi domain configuration.
*DOMAIN site1 SHMKEY = 79990, MAXUSER = 100, MINCLH = 1, MAXCLH = 3, TPORTNO = 8888, CMTRET = Y, BLOCKTIME = 60, DOMAINID = 1
Information about each node within the domain must be registered in the NODE element.
Refer to the following example of the NODE element for multi domain configuration.
*NODE tmax1 TMAXDIR = "/user3/tmax", APPDIR = "/user3/tmax/appbin", PATHDIR = "/user3/tmax/path", TLOGDIR = "/user3/tmax/log/tlog", ULOGDIR = "/user3/tmax/log/ulog", SLOGDIR = "/user3/tmax/log/slog"
In a multi-domain environment, server groups are classified and configured based on the database that they use. In order to implement cross-domain global transactions (with 2 Phase Commit), servers and services must be grouped into an XA group.
Refer to the following example of the SVRGROUP element for multi domain configuration.
*SVRGROUP NXAGRP NODENAME = tmax1 XAGRP NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=80+logdir=.", TMSNAME = XAGRP_tms, MINTMS = 2, MAXTMS = 5
In a multi-domain environment, basic settings are configured in each SERVER element.
Refer to the following example of the SERVER element for multi domain configuration.
*SERVER SVG_X SVGNAME = XAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log -- -u scott -p tiger" SVG_NX SVGNAME = NXAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log"
In a multi-domain environment, basic settings are configured in each SERVICE element. When routing is used, a routing name must be specified in the ROUTING element.
Refer to the following example of the SERVICE element for multi domain configuration.
*SERVICE SVC_X SVRNAME = SVG_X, ROUTING = XRID SVC_NX SVRNAME = SVG_NX, ROUTING = NXRID
When routing is used in a multi-domain environment, the required information must be configured in each GATEWAY element. The IP address and port number of a server in the destination domain must be specified in RGWADDR and RGWPORTNO within each GATEWAY element. The name of the node where the gateway process will be executed must be specified in the NODENAME.
Refer to the following example of the GATEWAY element for multi domain configuration.
*GATEWAY DOMAIN_GW1 GWTYPE = TMAX, PORTNO = 5000, RGWADDR = "192.168.63.133", RGWPORTNO = 5000, NODENAME = tmax1
This element must be specified when routing is used in a multi-domain environment. The routing name, field name, SUBTYPE (BUFFER type), and routing range (RANGES) must all be specified.
<Example configuration file: Domain Site>
*DOMAIN site1 SHMKEY = 79990, MAXUSER = 100, MINCLH = 1, MAXCLH = 3, TPORTNO = 8888, CMTRET = Y, BLOCKTIME = 60, DOMAINID = 1 *NODE tmax1 TMAXDIR = "/user3/tmax", APPDIR = "/user3/tmax/appbin", PATHDIR = "/user3/tmax/path", TLOGDIR = "/user3/tmax/log/tlog", ULOGDIR = "/user3/tmax/log/ulog", SLOGDIR = "/user3/tmax/log/slog" *SVRGROUP NXAGRP NODENAME = tmax1 XAGRP NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger + SesTm = 80 + logdir = . " , TMSNAME = XAGRP_tms, MINTMS = 2, MAXTMS = 5 *SERVER SVG_X SVGNAME = XAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log -- -u scott –p tiger" SVG_NX SVGNAME = NXAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log" *SERVICE SVC_X SVRNAME = SVG_X, ROUTING = XRID SVC_NX SVRNAME = SVG_NX, ROUTING = NXRID *GATEWAY DOMAIN_GW1 GWTYPE = TMAX, PORTNO = 5000,RGWADDR ="192.168.63.133" RGWPORTNO = 5000,NODENAME = tmax1 *ROUTING XRID FIELD = FIELD/ROUTING_ID, RANGES = "'6400':XAGRP, '6471':DOMAIN_GW1" NXRID FIELD = FIELD/ROUTING_ID, RANGES = "'6400':NXAGRP, '6471':DOMAIN_GW1" *DOMAIN site2 SHMKEY = 79990, MAXUSER = 100, MINCLH = 1, MAXCLH = 3, TPORTNO = 8888, CMTRET = Y, BLOCKTIME = 60, DOMAINID = 2 *NODE tmax2 TMAXDIR = "/user3/tmax", APPDIR = "/user3/tmax/appbin", PATHDIR = "/user3/tmax/path", TLOGDIR = "/user3/tmax/log/tlog", ULOGDIR = "/user3/tmax/log/ulog", SLOGDIR = "/user3/tmax/log/slog" *SVRGROUP NXAGRP NODENAME = tmax2 XAGRP NODENAME = tmax2, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger + SesTm = 80 + logdir = . " , TMSNAME = XAGRP_tms, MINTMS = 2, MAXTMS = 5 *SERVER SVG_X SVGNAME = XAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log -- -u scott –p tiger" SVG_NX SVGNAME = NXAGRP, MIN = 1, MAX = 2, CLOPT = "-o $(SVR).$(DATE).log" *SERVICE SVC_X SVRNAME = SVG_X, ROUTING = XRID SVC_NX SVRNAME = SVG_NX, ROUTING = NXRID *GATEWAY DOMAIN_GW2 GWTYPE = TMAX, PORTNO = 5000,RGWADDR = 192.168.63.132", RGWPORTNO = 5000,NODENAME = tmax2 *ROUTING XRID FIELD = FIELD/ROUTING_ID, RANGES = "'6471':XAGRP, '6400':DOMAIN_GW2" NXRID FIELD = FIELD/ROUTING_ID, RANGES = "'6471':NXAGRP, '6400':DOMAIN_GW2"
< Example configuration file for using various Tmax functions>
*DOMAIN site1 SHMKEY = 79990, MAXUSER = 100, MINCLH = 1, MAXCLH = 5, TPORTNO = 8888, CMTRET = Y, BLOCKTIME = 30 *NODE tmax1 TMAXDIR = "/tmax/tmax", APPDIR = "/tmax/tmax/appbin", PATHDIR = "/tmax/tmax/path", TLOGDIR = "/tmax/tmax/log/tlog", ULOGDIR = "/tmax/tmax/log/ulog", SLOGDIR = "/tmax/tmax/log/slog" tmax2 TMAXDIR = "/tmax/tmax", APPDIR = "/tmax/tmax/appbin", PATHDIR = "/tmax/tmax/path", TLOGDIR = "/tmax/tmax/log/tlog", ULOGDIR = "/tmax/tmax/log/ulog", SLOGDIR = "/tmax/tmax/log/slog" *SVRGROUP SVGtmax1 NODENAME = tmax2, DBNAME = ORACLE, COUSIN = "SVGtmax1", OPENINFO = "Oracle_XA+Acc=P/scott/tiger + SesTm = 60+DbgFl=0x01", TMSNAME = svg1_tms, MINTMS = 2, MAXTMS = 5 SVGtmax2 NODENAME = tmax1, DBNAME = ORACLE, OPENINFO = "Oracle_XA+Acc=P/scott/tiger + SesTm = 60+DbgFl=0x01", TMSNAME = svg1_tms, MINTMS = 2, MAXTMS = 5 SVGtmax2NX NODENAME = tmax1 SVGRQ1 NODENAME = tmax1, SVGTYPE = RQMGR, CPC = 8, COUSIN = "SVGRQ1", LOAD = -1 *RQ rq1 SVGNAME = SVGRQ, BOOT = COLD, FILEPATH = "/tmp/rq1" QSIZE = 24, FSYNC = Y, BUFFERING = N *SERVER svr1 SVGNAME = SVGtmax1, MIN = 1, MAX = 5 svr2 SVGNAME = SVGtmax2, MIN = 1, MAX = 5 svr3 SVGNAME = SVGtmax2NX, MIN = 1, MAX = 5 *SERVICE svc1 SVRNAME = svr1, ROUTING = rout1 svc2 SVRNAME = svr2 svc3 SVRNAME = svr3 svc4 SVRNAME = GW2 #Gateway is directly defined on the server name. *GATEWAY GW1 GWTYPE = TMAX, PORTNO = 5001,NODENAME = "tmax1", RGWADDR = "GW1_MAIN", RGWPORTNO = 5001 GW2 GWTYPE = TMAX, PORTNO = 5002,NODENAME = "tmax2", RGWADDR = "GW2_MAIN", RGWPORTNO = 5001 GW3 GWTYPE = TMAX, PORTNO = 5003,NODENAME = "tmax2", RGWADDR = "GW3_MAIN", RGWPORTNO = 5001 *ROUTING rout FIELD = FIELD/PLACE_CD, RANGES = "'00000':SVGtmax1, 'A0001'-'A0006':GW2, 'A0007'-'A4000':GW3"
Generally, there are several phases in creating application programs. First, the source code is created and then compiled. The compilation step is used to detect and correct any errors in the source code. After a successful compilation, a valid executable file is created. The Tmax configuration file is also compiled in the same way to ensure that a valid configuration file is created.
Since the configuration file is used to provide the foundations of a Tmax system, Tmax usually cannot be started if the file contains errors. However, if the system is started and any errors do exist, the system will generate error during startup. Hence, the compilation step is very important in ensuring the proper operation of Tmax system.
Compilation is executed by using the cfl command.
$ cfl [-i text Tmax configuration file name] [-o binary Tmax configuration file name] [-h] [-V] [-n node_name] [-A] [-v num] [-I] [-r] [-a Tmax configuration file name] [-Z]
Option | Description |
---|---|
[ -i text Tmax configuration file name] | Name of the configuration file to compile. A user can specify the directory. If not specified, the default configuration directory is $TMAXDIR/config. If the original configuration file is not found, a warning message is displayed. |
[-o binary type configuration file name] | Name of the created binary configuration file. It can be specified with a path. If the path is not specified, the binary configuration file is created in the $TMAXDIR/config directory. The default file name is tmconfig. |
[-h] | Online Help |
[ -V ] | Checks the version of the execution file. |
[-n node name] | Used to selectively compile the configuration file of the specified node in a multi-node environment. To manage other nodes in a multi-node environment, racd must be configured. |
[ -A ] | Available only when service access control (3rd security level) is used. Since the access permission for ACL service within a domain must be applied evenly across all nodes, this option is used to distribute the $TMAXDIR/config/group, acl, and user files of the current node to $TMAXDIR/config on other nodes in the same domain. When environment files are compiled using this option, group, acl, and user files must be created in advance using mkgrp, mkpw, and mkacl. Since these files are used by all nodes in the domain, all users of nodes in the domain must be considered when creating the files. The group_name, group_id, user_name, and user_id must be unique within the domain. Since the passwd file is not automatically copied to each node, one must be created on or copied to each node. |
[-v num] | Version information. This can be set to either '0' or '1'. The default value is 1.
|
[ -I ] | If the value configured in the SHMKEY item of the DOMAIN element is being used when cfl is executed, compare UIDs of the value. If it is different, an error message is displayed. This option is used to not check whether shared memory and the same UID are in use. |
[ -r ] | Used to check in advance the maximum number of FDs available in the current system that is displayed when 'ulimit -n' option is used during cfl execution. Calculates and checks the maximum number of FDs per CLH in advance. If the FD value that Tmax uses is configured greater than the FD value available on the system, the following error message is displayed. (E) CFL9990 Current Tmax configuration contains more servers or nodes than current system can support [CFL5056] |
[-a Tmax configuration file name] | Name of Tmax configuration file to dynamically add. To add a server dynamically, the [-a] option must be used when executing cfl to create the binary configuration file, otherwise the (E) ADM2048 error occurs. |
[ -Z ] | Currently in cfl, MAXSACALL/MAXCACALL is limited to 1024 or less. Use this option to override this limit. (E.g., - cfl -Z -i sample.m) |
Services that are not registered within the SERVICE element will not be processed by Tmax. Each server may process a variety of services, so the administrator must generate a service table to identify which services will be handled by which servers. The service table must be compiled together with the server program.
The service table is a file that lists each server and the services that they provide. This file is created using the configuration file. It is created by referencing the servers and services registered in the Tmax configuration file. When server application programs are compiled, they must be linked with the service table to enable service routines to be located within the system.
The service table is created using the gst command, which references the binary Tmax configuration file.
gst [ -f binary Tmax configuration file name ] {-n node name} [-h] {-V}
Option | Description |
---|---|
[ -f binary Tmax configuration file name ] | Name of the compiled binary configuration file. The default file name is <tmconfig>. The gst command creates a service table for each server program in the svct directory under the Tmax directory by referencing the compiled binary configuration file. Therefore, it must be checked that the svct directory exists before executing gst. If a file name is not specified, tmconfig file is referenced. After executing gst, check that a service table called "servername_svctab.c" has been created for each server in the svct directory. |
{-n node name} | Node name. Creates the service table of another node's server process in the $TMAXDIR/svct directory of the current node. |
[-h] | Online Help. |
{-V} | Checks the version of the execution file. |
A Tmax system configures service timeout setting by using a signal alarm. A tmapm is a separate server used to set and use service timeout setting when a signal alarm is not available.
A tmapm and a USC server are configured in the SERVER section of a configuration file as follows:
Usage
*SERVER tmapm CLOPT = [-i sec ] [-r sec ] [-c command ] [-l [ 0 | 1 | 2 ]]
Option | Description |
---|---|
[-i sec ] | The interval (in seconds) for checking service time. Shorter intervals increase system load. A decimal number is allowed. |
[-r sec ] | A command execution timeout (in seconds) after a service time is exceeded. Only an integer is allowed. |
[-c command ] | A command that will be executed when a corresponding service is still in a RUNNING state after an execution time (SCVTIME + command execution timeout) has expired. Use a shell command or a script file. |
[-l [ 0 | 1 | 2 ]] | A user log level. The default value is 0. A larger value outputs more detailed information. |
The following parameters are passed on when a specified command is configured with a -c option.
User Command | PID | SVRNAME | SVCNAME[Elapse Time] |
---|---|---|---|
kill.sh | 9659 | svr2 | TOUPPER[5] |
Example
*SERVER tmapm SVGNAME = svg, SVRTYPE = UCS, CLOPT = "-o ulog -- -i 5 -r 1 -c kill.sh -l 1"