0001 EX_ENV(5)
0002 ========
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 ex_env - Enduro/X Environment configuration
0009
0010 DESCRIPTION
0011 -----------
0012 Enduro/X uses set of environment variables which are an initial environment
0013 for the application domain. There is a set of parameters related to the system,
0014 prefixes, Posix Queue mount points, and various system limits. The next step
0015 to the configuration is application domain configuration, in 'ndrxconfig.xml' and 'debug.conf'
0016 (or Common-Configuration respectively).
0017
0018 Mandatory Env. Variables
0019 ------------------------
0020 *NDRX_NODEID*='NODE_ID'::
0021 Cluster Node ID. Should be within 1..32.
0022
0023 *NDRX_CLUSTERISED*='1|0'::
0024 Do we work in cluster mode or not? '1' - yes, we are in cluster.
0025 '0' - no, we are not in cluster.
0026
0027 *NDRX_LDBAL*='LOAD_BALANCE_PERCENT'::
0028 if LOAD_BALANCE_PERCENT is 0 = means process all locally,
0029 if value is set to 100 = process all on remote servers (if svc
0030 available on remote server). 70% means, process 30% locally
0031 70% remotely.
0032
0033 *NDRX_TOUT*='TIME_OUT_IN_SECONDS'::
0034 Global tpcall() timeout, if not called with TPNOTIME flag.
0035 If process will not return in this time, then TPETIME error
0036 will be returned.
0037
0038 *NDRX_ULOG*='ULOG_PATH'::
0039 Writable system path where to write user logs. Significant
0040 system events as well as *userlog(3)* output is written
0041 to file *ULOG.YYYYMMDD*, where 'YYYYMMDD' corresponds to the current
0042 date. This directory also typically is used to output any process
0043 related Enduro/X logs, from internal logging
0044 (topics *ndrx* and *ubf*) or from user logging (*tp* topic)
0045 performed by *tplog(3)* or by *ndebug.h* macros. Logfile names
0046 are configured at *[@debug]* section in common-configuration ini
0047 file or in *ndrxdebug.conf(5)* configuration file.
0048
0049 *NDRX_QPREFIX*='APP_PREFIX'::
0050 Prefix used for POSIX IPC resources (shm and queue).
0051
0052 *NDRX_SVCMAX*='MAX_SERVICES'::
0053 This determines the maximum number of services supported by instance.
0054 The less is number, then less shared memory is used. However for
0055 performance reason, number should be much bigger (3-4 times) than
0056 actual estimated service count. Bigger number might speed up linear
0057 hashing, i.e. it will be less likely that hash will collide.
0058
0059 *NDRX_SRVMAX*='MAX_SERVERS'::
0060 Maximum number of servers that will be supported. This affects the
0061 '-i' flag. Server ID. The max server id will be MAX_SERVERS-1.
0062
0063 *NDRX_CONFIG*='FULL_PATH_TO_CONFIG_FILE'::
0064 This shows the full path to usual ndrxconfig.xml.
0065
0066 *NDRX_QPATH*='QUEUE_MOUNT_POINT'::
0067 Full path to directory where POSIX Queue is mounted.
0068
0069 *NDRX_SHMPATH*='SHARED_MEM_MOUNT_POINT'::
0070 Full path to POSIX Shared memory mount point.
0071
0072 *NDRX_CMDWAIT*='NDRXD_COMMAND_WAIT_SECS'::
0073 Number of seconds for which *ndrxd(8)* process periodically waits on command queue
0074 between the checks. For *SystemV* mode, accuracy of this setting is 200ms.
0075 Additional note: the command wait time actually is lowest value between the
0076 'NDRXD_COMMAND_WAIT_SECS' and time left till the next '<sanity>' cycle run,
0077 configured in *ndrxconfig.xml(5)*.
0078
0079 *NDRX_DPID*='PATH_TO_NDRXD_PID_FILE'::
0080 This is full path to 'ndrxd' PID file.
0081
0082 *NDRX_RNDK*='APP_DOMAIN_RANDOM_KEY'::
0083 Random key to indentify the processes beloning to
0084 this app domain (i.e. used in ps ef).
0085
0086 *NDRX_IPCKEY*='SYS_V_SEMAPHORE_KEY'::
0087 System V Semaphores key number. Used for shared memory locking.
0088 POSIX semaphores are not used here, because they are not unlocked if process
0089 dies during acquired semaphore. For System V shared memory IPCKEY+*0..20*
0090 different keys may be used for shared memory. For System V semaphores IPCKEY+*0..20*
0091 range is used.
0092
0093 *NDRX_MSGMAX*='MAX_MSGS_PER_QUEUE'::
0094 Posix queue config attrib. Max number of messages that can be put in one queue.
0095
0096 *NDRX_DQMAX*='NDRXD_ACCESS_Q_MSG_MAX'::
0097 Enduro/X ATMI daemoni 'ndrxd' access Q size. Bigger is better.
0098
0099 *NDRX_MSGSIZEMAX*='NDRXD_ACCESS_Q_MSG_MAX'::
0100 Max message size (in bytes). The value is limited to the operating system limits
0101 of the maximums size of the POSIX queues message size. For example on Linux
0102 kernel 3.13 it is possible to set message size to 10 Megabytes. Also the message
0103 size denotes the internal buffer sizes for XATMI message processing.
0104 If message size max is set to less than 64KB,
0105 then buffer size is defaulted to 64KB.
0106 This parameter also affects the opening/creation of the message queue. As the
0107 message size is specified in mq_open() attributes.
0108
0109 *NDRX_APPHOME*='FULL_PATH_TO_APPDOMAIN_INSTANCE_DIR'::
0110 This is full path to application (not an Enduro/X directory it self) root directory.
0111
0112 *NDRX_HOME*='FULL_PATH_TO_ENDUROX_ROOT_DIRECTORY'::
0113 Full path to Enduro/X installaction directory.
0114
0115 *NDRX_DEBUG_CONF*='FULL_PATH_TO_DEBUG_CONFIG_FILE'::
0116 This sets full path to debug configuration file.
0117
0118 *NDRX_DEBUG_STR*='DEBUG_STRING'::
0119 Debug configuration for binary according to *ndrxdebug.conf(5)* syntax,
0120 binary name is not required e.g. "ndrx=5 tp=5 file=/tmp/log". This overrides
0121 any other configuration settings specified in configuration files for the
0122 process.
0123
0124 *NDRX_UBFMAXFLDS*='MAX_NUMBER_OF_UBFFIELDS'::
0125 Max number of UBF fields. Used for hashing. Bigger number is better.
0126 The max number is number is 33554432 (25 bit).
0127
0128 *NDRX_DMNLOG*='FULL_PATH_TO_NDRX_DMNLOG'::
0129 The full path to 'ndrxd' log file. Used by shell scripts.
0130
0131 *NDRX_DMNLEV*='LOG_LEVEL_OF_NDRXD'::
0132 Log level of 'ndrxd'. From 1..5. 5 is max. Used by shell scripts.
0133
0134 *NDRX_LOG*='FULL_PATH_TO_XADMIN_LOG_FILE'::
0135 Full path to 'xadmin' log file. Used by shell scripts.
0136
0137 *NDRX_LEV*='LOG_LEVEL_OF_XADMIN'::
0138 Log level of 'xadmin'. From 1..5. 5 is max. Used by shell scripts.
0139
0140 *NDRX_XA_RES_ID*='XA_RESOURCE_ID'::
0141 XA API two phase commit resource id.
0142 Must be set if using distributed transactions. Valid value is in range
0143 of 1..255.
0144
0145 *NDRX_XA_OPEN_STR*='XA_OPEN_STRING'::
0146 This is open string for two phase commit XA driver.
0147 Must be set if using distributed transactions.
0148
0149 *NDRX_XA_CLOSE_STR*='XA_CLOSE_STRING'::
0150 This is close string for two phase commit XA driver. This is optional,
0151 'NDRX_XA_OPEN_STR' will be used if not set.
0152
0153 *NDRX_XA_DRIVERLIB*='ENDUROX_XA_DRIVER_LIB'::
0154 This is full path to Enduro/X shared library which loads the XA api.
0155
0156 *NDRX_XA_RMLIB*='RESOURCE_MANAGER_SPECIFIC_DRIVER'::
0157 This is full path to resource manager's specific driver (shared library).
0158 Must be set if using distributed transactions.
0159
0160 *NDRX_XA_LAZY_INIT*='LAZY_INIT_FLAG'::
0161 Set to '1' if XA sub-system should be initialized on first transactions.
0162 If not set, then defaulted to '0', meaning initialize XA sub-system on
0163 executable startup.
0164
0165 *NDRX_XA_FLAGS*='XADMIN_XA_FLAGS'::
0166 Special for XA sub-system. It is semicolon separated tags with values.
0167 currently tags *RECON*, *NOJOIN* and *NOSTARTXID* are defined.
0168 *RECON* tag defines the number of attempts
0169 of xa_close()/xa_open() and doing xa_start() again in case if original
0170 xa_start() failed (the ATMI call tpbegin()) - for example firewall have been
0171 closed the connection. The format for the tag is:
0172 *RECON*:<comma separated list of error codes e.g. 4,-8,* - any err>:<number
0173 of attempts>:<sleep between attempts milli-sec>[:<non_start_error codes for retry>]'
0174 example: *RECON*':*:3:100', meaning reconnect (do xa_close()/xa_open())
0175 on any xa_start error, do the 3x attempts, sleep 100 milliseconds between attempts.
0176 Flag *RECON* for other XA calls that xa_start() would also perform reconnects,
0177 but that would be applied to *XAER_RMFAIL* errors only by default. To change
0178 the list of error codes for xa_prepare, xa_commit, xa_rollback, xa_recover,
0179 xa_forget retries, set the comma seperated list of codes in *non_start_error* position.
0180 With *NOJOIN* indicates that XA Switch does not support *TMJOIN* mode.
0181 With *NOSTARTXID* indicates that transaction session does not start with
0182 identifier, but only when process disconnects from transaction, it is possible
0183 to give transaction id for work which has been done to database. *NOSUSPEND*
0184 flag can be used to configure particular resource that transaction is not
0185 suspended when *tpcall(3)* is issued from process which uses given resource
0186 manager. *BTIGHT* flag together with *NOJOIN* flag ensures that tight branching
0187 is used. By default Enduro/X writes branch id in *gtrid* and *bqual* parts
0188 equally. With *BTIGHT* flag set, *gtrid* is not changed for particular
0189 RMID, but only branch qualifier *bqual* will be updated to contain the actual
0190 branch identifer.
0191 Flag *FSYNC* ensures that *tmsrv(8)* log contents at commit decision are
0192 written to disk with *fsync()*. *FDATASYNC* ensures that *tmsrv(8)* commit decision
0193 is written to disk with *fdatasync()*. *DSYNC* ensures that *tmsrv*
0194 commit decision log file is synchronized with file-system directory structure
0195 (i.e. *fsync()* is performed on log file directory). In case if using *tmqueue(8)*
0196 then these flags also affect that the way how messages are persisted to disk.
0197 Note that *FSYNC*, *FDATASYNC* and *DSYNC* may significantly slow down
0198 the distributed transaction processing.
0199
0200 *NDRX_NRSEMS*='NDRX_NRSEMS'::
0201 Number of semaphores used for protecting shared memory, when Enduro/X
0202 running in 'poll()' mode. The minimum is recommended something about 7.
0203 Every service name in shared memory is hashed and semaphore protecting
0204 the service is calculated by modulus of NRSEMS. This affects 'NDRX_IPCKEY'
0205 semaphore, by giving the more occurrences in array. The first array entry
0206 is used by normal Enduro/X operations, and the others 2..1+NRSEMS is
0207 used by 'poll()' mode service protection. Default value is 30.
0208
0209 *NDRX_MAXSVCSRVS*='NDRX_MAXSVCSRVS'::
0210 Max number of servers can advertise same service. This is used only in
0211 'poll()' and 'SystemV' mode.
0212 The number affects the size of shared memory used for services. Bigger number causes
0213 more memory to be used for service registry. If the number of servers goes over this number
0214 for one service, the service entry will be ignored. Default is *30*.
0215
0216 *PATH='PATH'*::
0217 This is not Enduro/X specific env variable. But Enduro/X distribution bin
0218 directory should be included in system PATH env. variable.
0219
0220 *FLDTBLDIR*='FULL_OR_RELATIVE_PATH_OF_UBF_FIELD_DIRS'::
0221 This is colon separated list of directories where .fd files are located. I.e. UBF field definitions.
0222
0223 *FIELDTBLS*='COMMA_SEPERATED_LIST_OF_FIELD_FILES'::
0224 This is comma separated list of field files found in FLDTBLDIR.
0225
0226 *NDRX_CCONFIG*='NDRX_COMMON_CONFIG_FILE'::
0227 If this is set then, all above configuration is read from specified ini
0228 file in 'NDRX_COMMON_CONFIG_FILE' in [@global] section. The Enduro/X config
0229 driving unit is able to merge configuration from multiple config files,
0230 and you can set higher priority files by in 'NDRX_CCONFIG1', 'NDRX_CCONFIG2'
0231 'NDRX_CCONFIG3', 'NDRX_CCONFIG4', 'NDRX_CCONFIG5'. Basically 'NDRX_CCONFIG'
0232 is lowest priority and 'NDRX_CCONFIG5' is highest priority. The specified
0233 configuration file can be directory, in that case Enduro/X will search for
0234 files with mask *.ini, *.cfg, *.conf, *.config files. All will be loaded
0235 in alphabetical order.
0236
0237 *NDRX_CCTAG*='NDRX_COMMON_CONFIG_TAG'::
0238 This is basically subsection used for Enduro/X configuration sections
0239 [@global], [@debug], [@queue]. If the variable is set, then Enduro/X will
0240 lookup at process startup for sections like [@global/YOUR_TAG], etc. CC tag
0241 can contain multiple sections, for example 'server1/RM2'. Enduro/X will lookup
0242 the variables in each section [@global/server1] and [@global/RM2] for setting
0243 up the system.
0244
0245 *NDRX_XADMIN_CONFIG*='XADMIN_CONFIG_FILE'::
0246 This variable is used by *xadmin* read the specific configuration file with
0247 xadmin's settings. Variable is optional.
0248
0249 *HOME*='UNIX_USER_HOME_DIR'::
0250 This variable is used by *xadmin* to search for per user configuration file
0251 when xadmin is started. In home directory search for configuration is done
0252 by $HOME/.xadmin.config. This file is used in case if 'NDRX_XADMIN_CONFIG'
0253 is missing. Variable is optional.
0254
0255 *VIEWDIR*='NDRX_VIEW_DIR'::
0256 This is colon separated list of directories where to search VIEW compiled
0257 object files. The access to these directories are done only once operations
0258 with views are performed.
0259
0260 *VIEWFILES*='NDRX_VIEW_FILES'::
0261 Comma separated list of VIEW object files (typically with extension .V).
0262 Object files are produced by view compiler *viewc(8)*.
0263
0264 *NDRX_PLUGINS*='NDRX_PLUGINS'::
0265 This is semicolon separated string which denotes the list Enduro/X
0266 plugins which needs to be loaded at any XATMI program startup. Following plugins
0267 are provided with Enduro/X: libcryptohost.so - cryptography key by hostname.
0268
0269 *NDRX_SILENT*='SILENT_SETTING'::
0270 If environment variable is present (and set to *Y*), the *xadmin* tool
0271 will not print banner header at startup.
0272
0273 *NDRX_XADMINTOUT*='XADMIN_TOUT'::
0274 This override of 'NDRX_TOUT' configuration for xadmin queue operations.
0275 This timeout is used for certain calls to *ndrxd* (for example startup,
0276 shutdown, service listing, etc). Also it is used for communication
0277 with XATMI servers like *cpmsrv* and *tmsrv*. This is number of seconds,
0278 the value must be greater than 0. If parameter is set, then this will
0279 enable timeout control for communication with *ndrxd* daemon, if parameter
0280 is not set, the code will work in legacy mode, meaning that list calls
0281 to ndrxd will never get timeout.
0282
0283 *NDRX_SVPROCNAME*='SERVER_PROC_NAME'::
0284 Server process name exported by *ndrxd* at XATMI server process boot time.
0285 The name is server name extracted from "<server>" tag attribute *name*.
0286
0287 *NDRX_SVCLOPT*='SERVER_COMMAND_LINE'::
0288 Server process command line. Generated and exported at the moment of XATMI
0289 server boot. If no command line options are passed to XATMI server, then
0290 *libatmisrv* tries to extract the parameter from this environment variable
0291 before failing, due to missing command line arguments.
0292
0293 *NDRX_SVPPID*='SERVER_PARENT_PID'::
0294 Parent process PID of server process. This process basically is the one
0295 which is booted by *ndrxd*. In case if server definition contains some
0296 wrapper processes (or scripts), then this basically is different than value
0297 of the real XATMI server. This variable is used by XATMI server library
0298 to report both PIDs to the *ndrxd*, the parent PID and the real process PID.
0299
0300 *NDRX_SVSRVID*='SERVER_PROCESS_ID'::
0301 This is XATMI server id set in '<srvid>' tag. The variable can be used
0302 for example is wrapper scripts to modify some resources used by process.
0303 For example if booting something like Tomcat app server, the admin TCP ports
0304 can be adjusted by this environment variable in order to avoid conflicts for
0305 booting multiple instances.
0306
0307 *NDRX_SVQREADERSMAX*='MAX_SIMULTANEOUS_READERS'::
0308 This configuration parameter set the maximum parallel readers for System V
0309 to Posix queues mapping tables. The number is used for read-write locks,
0310 thus the number sets the simultaneous readers, but during that time the
0311 write thread needs to wait for all readers to finish up the mapping when
0312 the writer will step in and all readers will wait. If the number is bigger
0313 read will be performed better when many processes are used, but that could
0314 lead to write starvation, and writes (opening queues) may become slow.
0315 System V queues acquires one more semaphore resource from the *NDRX_IPCKEY*+1.
0316 Thus this semaphore is used read/write mode to protect the SystemV-to-Posix
0317 and Posix-to-SystemV mapping tables.
0318 The default value for this parameter is *50*. This parameters is also used
0319 when processes accesses services shared memory in System-V or EMQ mode for
0320 protecting the round-robin selector.
0321
0322 *NDRX_MSGQUEUESMAX*='MAX_IPC_QUEUES'::
0323 Max number of queues that can be mapped to System V sub-system. This parameter
0324 defines size for two shared memory chunks which names are '<NDRX_QPREFIX>,shm,p2s'
0325 and '<NDRX_QPREFIX>,shm,s2p'. The number defines number of queue entries in
0326 the table. The bigger the number, the better hashing is got and lookup is
0327 quicker, but more memory is used. The minimum number shall be equal to the
0328 number of queues that will be used on the system, but recommended number is
0329 something as twice it. Each queue entry requires about 168 bytes.
0330 The default value for this parameter is *20000*.
0331
0332 *NDRX_CLTTAG*='CLIENT_PROCESS_TAG'::
0333 This is client process tag exported to *cpmsrv(8)* controlled processes.
0334 This value can be used also in *ndrxconfig.xml(5)*
0335 when formatting client process command line and log file names.
0336
0337 *NDRX_CLTSUBSECT*='CLIENT_PROCESS_TAG'::
0338 This is client process tag's sub-section exported to *cpmsrv(8)*
0339 controlled processes. This value can be used also in *ndrxconfig.xml(5)*
0340 when formatting client process command line and log file names.
0341
0342 *NDRX_LIBEXT*='SHARED_LIB_EXTENSION'::
0343 This is shared library platform specific extension. For example Linux/AIX and
0344 Solaris would use "so". For MacOS it would be "dylib". Env variable is
0345 generated by provision script and it set in global variables.
0346
0347 *NDRX_NORMWAITMAX*='NORM_WAIT_ATTEMPTS'::
0348 This configures number of attempts for *xadmin(8)* (and *tpadmsv(8)*) commands
0349 to wait in case if command requires normal *ndrxd(8)* context, but process
0350 is in other context, for example starting or stopping. The default is *60*.
0351 Between each attempt 1 second sleep is done.
0352
0353 *NDRX_FPAOPTS*='POOL_MALLOC_OPTS'::
0354 This flag allows configures Enduro/X Fast Pool Allocator. Pool Allocator is
0355 mechanism in Enduro/X core libraries to avoid calls to malloc() and free()
0356 system calls. Instead for memory block of sizes *256*, *512*, *1024*, *2048*, *4096*
0357 and *S* ( *NDRX_MSGSIZEMAX* - system buffer) are allocated and cached
0358 (stored in linked list) when parked free. Thus
0359 at certain points Enduro/X requests for memory different sizes from FPA, the
0360 FPA library finds the first suitable size (may be bigger than request) and
0361 block is removed from list. When program does free the block, FPA returns it
0362 to linked list instead of freeing back to the system. Thus from OS perspective
0363 memory is still used. For each of the block sizes maximum number
0364 stored blocks are configured. The configuration is written
0365 in following form '<block_size>:<stored_count>,...,<block_size_N>:<stored_count_N>'.
0366 There is also defined special block size *D*. This means default. By setting
0367 this values, counts are changed for all sizes.
0368 The stored count can be set in value of *1*..*max_int*.
0369 If set to special value *M*, then standard, then malloc is used directly.
0370 It is error to have other non valid number as count. If block
0371 size is not found then system, the userlog message is added, but error is
0372 not generated. The block sizes supports suffix *K* which multiplies
0373 the value by *1024*. Default value is *256:25,512:15,1K:10,2K:10,4K:10,S:10*.
0374 User might adjust these buffer sizes for multi-threaded apps, especially
0375 the system buffer (*S*). By increasing the numbers, there is higher possibility
0376 that process will permanently use more memory.
0377
0378 *NDRX_THREADSTACKSIZE*='STACKS_SIZE_IN_KB'::
0379 This is target stack size for new threads produced by Enduro/X. If value *0* is
0380 is specified, default OS new thread stack size is used. If value *-1* is used,
0381 then threads produced by Enduro/X are configured by
0382 stack size which is set for the program main thread (i.e. current resource
0383 limit read by getrlimit(RLIMIT_STACK, ...)). If the rlimit configured is set
0384 to unlimited, then Enduro/X sets thread stack size to *8192* (which is 8 megabytes).
0385 If parameter *NDRX_THREADSTACKSIZE* is not configured, default value
0386 *8192* (8 megabytes) stack size is used.
0387
0388 *NDRX_SCANUNIT*='SYSVTOUT_THREAD_SCAN_WAIT_MS'::
0389 This flag is used by *SystemV* polling configuration, for others modes like
0390 *epoll*, *poll*, *kqueue*, *emq*, *svapoll* it is not used. The flag indicates
0391 how long time is spent (in milliseconds) on waits between scanning for
0392 System-V timeouts. The default value is *1000* and minimum is *1*.
0393
0394 *NDRX_LCFREADERSMAX*='NUMBER_OF_SEM_READERS'::
0395 This is number of Latent Command Framework (LCF) read/write lock readers.
0396 Thus this number of processes
0397 may process LCF commands while concurrent write (publish to LCF shared memory)
0398 will wait for readers to complete. The default is *1000*. The number should
0399 match the number of processes running in system. However it depends on the
0400 commands published, if commands are fast the number could be lower.
0401
0402 *NDRX_LCFMAX*='NUMBER_OF_COMMAND_SLOTS'::
0403 This is number of slots in shared memory used for LCF commands. The default is
0404 *20*. Number shall be kept low as high number will make all processes to scan
0405 throughout the array of commands when any command is published. This setting
0406 shall be used as per application instance and not for sub-section configuration.
0407 Also this setting affects the configuration shared memory size ('NDRX_IPCKEY' + 6).
0408
0409 *NDRX_LCFCMDEXP*='NUMBER_OF_SECONDS'::
0410 When new process is created, it scans and processes LCF commands at startup.
0411 This setting affects those commands for which *-e* is given. It sets the
0412 time frame within which after the command published it is processed. After
0413 this time command expires, and new processes does not run the command.
0414 Default value is *60*.
0415
0416 *NDRX_LCFNORUN*='COMMAND_RUN_FLAG'::
0417 If variable variable is present and set to 'y' or 'Y', the binary still connects
0418 to LCF/Configuration shared memory, but does not execute any of the LCF
0419 commands. Default is *n*. This can be useful in case if *xadmin(8)* needs to
0420 correct some invalid commands which might prevent to run xadmin by it self.
0421
0422 *NDRX_RTSVCMAX*='SERVICE_COUNT'::
0423 Number of service slots available in shared memory for *<services>* tag. Greater
0424 number gives better performance for linear hashing - less probability for collision.
0425 Default value is *1000*.
0426
0427 *NDRX_RTCRTMAX*='CRITERION_BUFFER_SIZE'::
0428 This is number of bytes available for routing criterion storage. Default
0429 value is *102400* which corresponds to *100* KB. One *<route>* tag takes
0430 about 300 bytes and one range entry take about 64 bytes (by not including
0431 the string data which is dynamic length).
0432
0433 *NDRX_RTGRP*='ROUTING_GROUP'::
0434 This is routing group code. If environment variable is present for XATMI server
0435 process, then any service advertise and unadvertise will operate in bulk with
0436 original service name and additionally added suffix of "@<NDRX_RTGRP>". For
0437 example if having *NDRX_RTGRP* set to "G5" and process advertises service
0438 *DEBIT*, then in total two services will be advertise such as *DEBIT* and
0439 *DEBIT@G5*. Afterwards with *<service/>* and *<route/>* settings can be used
0440 to route the traffic between default service and service in group.
0441
0442 *NDRX_APIFLAGS*='APIFLAGS'::
0443 This is Enduro/X standard configuration string (e.g. comma separated)
0444 list of specific API configuration flages used by Enduro/X.
0445 Currently defined flags are: *json_escape* and *ubf_ptrparse*
0446 *json_escape* flag enables to escape non printable
0447 characters during the UBF 2 JSON conversation and vice versa.
0448 Escape is done on non printable charaters i.e. !(*isprint()* && *!iscntrl()*),
0449 and these are escaped with "\" + xx, where xx is hex number of the ASCII char.
0450 e.g. ASCII "space" would become "\20". The back-slash by becomes "\\".
0451 *ubf_ptrparse* enables *Bextread(3)* and *Bextreadcb(3)* functions to read
0452 *BFLD_PTR* pointers from input. By default buffer pointers for security
0453 reasons are not read. Flag *ubf_dupfidok* enables accepting duplicate field
0454 IDs during the *mkfldhdr(3)* processing (this is for Tuxedo compatibility).
0455 *NDRX_NOPOLLEXCL*='ANY_VALUE'::
0456 If flag is set to any value (i.e. *Y*), and Enduro/X runs under AIX 7.3 or
0457 newer in *svapoll* mode, then this flag disables *POLLEXCL* flag usage for
0458 solving thundering herd issue. Also this setting disables setup of the
0459 *POLLEXCL_POLICY=LIFE:ONE* environment variable by *ndrxd* prior exec of
0460 new binary.
0461 *NDRX_PGMAX*='NUMBER_OF_GROUPS'::
0462 This is number of process groups that can be registered in shared memory for
0463 *<procgroups>* tag. The default value for 'NUMBER_OF_GROUPS' is *64*.
0464 Minimum value is *0*, which disables the process group functionality.
0465 If changing this setting, "xadmin down -y" cleanup after the shutdown
0466 is recommended, as this affects LCF shared memory size which might
0467 be present event in shutdown state.
0468 *NDRX_SGREFRESH*='SINGLETON_GROUP_REFRESH_TIME'::
0469 Defines the time in seconds by which the singleton group lock provider
0470 (*exsinglesv(8)*) must refresh (updated timestamp) in s hared memory
0471 to indicate that the group lock is verified and still valid.
0472 Default value is *60* seconds.
0473 *NDRX_SGLOCKINC*='NUMBER'::
0474 Number by which *exsinglesv(8)* would increment ping lock
0475 counters. If group is normally locked, it increments on every
0476 check by *1*. Thus if using *tmsrv(8)* in the singleton group
0477 *NDRX_SGLOCKINC* parameter value multiplied by *exsinglesv(8)* configuration
0478 parameter value *chkinterval*, sets the upper limit for global transaction
0479 time to stay in active/un-committed state, as when global transaction
0480 is started, ping lock counter is read, and at commit point,
0481 ping lock counter is also read from the group ping lock file. The counter
0482 difference must be less than *NDRX_SGLOCKINC*. Such check ensures
0483 that no parallel run of the *tmsrv* runs has happened during
0484 the transaction life-cycle. Default value is *3600*. Note that
0485 too large value could spend the lock counters too fast, however
0486 counter is stored as *long* value having 31 or 61 bits of storage
0487 (depending on the platform).
0488 *NDRX_PROCGRP_NO*='PROCESS_GROUP_NUMBER'::
0489 For XATMI server process or XATMI client process value is set to
0490 process group number, if process is part of process group.
0491 In *ndrxconfig.xml(5)* XATMI server processes are added to processes
0492 group by setting group name in '<procgrp>' tag, and client processes
0493 are added to process group by setting group-name in 'procgrp' attribute of
0494 the <client>/<exec> tag.
0495 *NDRX_PROCGRP_LP_NO*='PROCESS_GROUP_NUMBER'::
0496 This environment variable is exported for lock provider processes
0497 (*exsinglesv(8)*) to indicate the group number for which given
0498 process manages the lock. Variable is set to process only in case
0499 if '<procgrp_lp>' tag is set to <server> in *ndrxconfig.xml(5)*.
0500 *NDRX_RESPAWN*='RESPAWN_FLAG'::
0501 The environment variable is exported to the process in case, if
0502 process is restarted after the process crash. For such case
0503 value *1* is present in variable. Note, that during normal
0504 start/sreload/reload-on-change operations this flag is environment
0505 variable is not set.
0506
0507 EXAMPLE
0508 -------
0509 Sample configuration:
0510 ---------------------------------------------------------------------
0511 export FIELDTBLS=Exfields,fieldtab1.fd,fieldtab2.fd
0512 export FLDTBLDIR=/enduro/tst1/tuxfbuf
0513 export VIEWDIR=/enduro/tst1/views
0514 export VIEWFILES=customer.V,card.V
0515 export NDRX_DMNLEV=5
0516 export NDRX_DMNLOG=/enduro/tst1/tmp/NDRXD
0517 export NDRX_APPHOME=/enduro/tst1
0518 export NDRX_CLUSTERISED=0
0519 export NDRX_CMDWAIT=1
0520 export NDRX_CONFIG=/enduro/tst1/conf/ndrxconfig.xml
0521 export NDRX_DEBUG_CONF=/enduro/tst1/conf/ndrxdebug.conf
0522 export NDRX_DPID=/enduro/tst1/tmp/ndrxd.pid
0523 export NDRX_DQMAX=3000
0524 export NDRX_HOME=/opt/endurox
0525 export NDRX_IPCKEY=442000
0526 export NDRX_LDBAL=0
0527 export NDRX_LEV=5
0528 export NDRX_LOG=/enduro/tst1/tmp/XADMIN
0529 export NDRX_MSGMAX=100
0530 export NDRX_MSGSIZEMAX=32000
0531 export NDRX_NODEID=1
0532 export NDRX_QPATH=/dev/mqueue
0533 export NDRX_QPREFIX=/tst1
0534 export NDRX_RNDK=jaUZwOlTqglSc
0535 export NDRX_SHMPATH=/dev/shm
0536 export NDRX_SRVMAX=10000
0537 export NDRX_SVCMAX=600
0538 export NDRX_TOUT=60
0539 export NDRX_THREADSTACKSIZE=8192
0540 export NDRX_UBFMAXFLDS=16000
0541 export NDRX_ULOG=/enduro/tst1/logs
0542
0543 # XA 2PC SECTION, ORACLE DB
0544 export ORACLE_SID=ROCKY
0545 export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
0546 export PATH=$PATH:ORACLE_HOME/bin
0547 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
0548 export NDRX_XA_RES_ID=1
0549 export NDRX_XA_OPEN_STR="ORACLE_XA+SqlNet=ROCKY+ACC=P/endurotest/endurotest1+SesTM=180+LogDir=/tmp/xa+nolocal=f+Threads=true"
0550 export NDRX_XA_CLOSE_STR=$NDRX_XA_OPEN_STR
0551
0552 # XA Static registration driver
0553 export NDRX_XA_DRIVERLIB=$NDRX_HOME/lib/libndrxxaoras.so
0554
0555 # XA Dynamic registration driver
0556 #export NDRX_XA_DRIVERLIB=$NDRX_HOME/lib/libndrxxaorad.so
0557
0558 export NDRX_XA_RMLIB=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
0559 export NDRX_XA_LAZY_INIT=1
0560 # XA SECTION, END
0561
0562 ---------------------------------------------------------------------
0563
0564 Common-config ini file sample configuration, assuming following settings in env:
0565 ---------------------------------------------------------------------
0566 export NDRX_CCONFIG=/enduro/tst1/conf/app.ini
0567 export NDRX_CCTAG=server1/RM2
0568 ---------------------------------------------------------------------
0569
0570 The configuration file might look like:
0571
0572 ---------------------------------------------------------------------
0573 #
0574 # Common variables, inherited for CCTAGs
0575 #
0576 [@global]
0577 FIELDTBLS=Exfields,fieldtab1.fd,fieldtab2.fd
0578 FLDTBLDIR=/enduro/tst1/tuxfbuf
0579 VIEWDIR=/enduro/tst1/views
0580 VIEWFILES=customer.V,card.V
0581 NDRX_DMNLEV=5
0582 NDRX_DMNLOG=/enduro/tst1/tmp/NDRXD
0583 NDRX_APPHOME=/enduro/tst1
0584 NDRX_CLUSTERISED=0
0585 NDRX_CMDWAIT=1
0586 NDRX_DPID=/enduro/tst1/tmp/ndrxd.pid
0587 NDRX_DQMAX=3000
0588 NDRX_HOME=/opt/endurox
0589 NDRX_IPCKEY=442000
0590 NDRX_LDBAL=0
0591 NDRX_LEV=5
0592 NDRX_LOG=/enduro/tst1/tmp/XADMIN
0593 NDRX_MSGMAX=100
0594 NDRX_MSGSIZEMAX=32000
0595 NDRX_NODEID=1
0596 NDRX_QPATH=/dev/mqueue
0597 NDRX_QPREFIX=/tst1
0598 NDRX_RNDK=jaUZwOlTqglSc
0599 NDRX_SHMPATH=/dev/shm
0600 NDRX_SRVMAX=10000
0601 NDRX_SVCMAX=600
0602 NDRX_TOUT=60
0603 NDRX_UBFMAXFLDS=16000
0604 NDRX_THREADSTACKSIZE=8192
0605 NDRX_ULOG=/enduro/tst1/logs
0606
0607 #
0608 # CCTAG section server1
0609 #
0610 [@global/server1]
0611 NDRX_CONFIG=/enduro/tst1/conf/ndrxconfig.xml
0612
0613 #
0614 # CCTAG section RM2
0615 #
0616 [@global/RM2]
0617 # XA 2PC SECTION, ORACLE DB
0618 NDRX_XA_RES_ID=1
0619 NDRX_XA_OPEN_STR="ORACLE_XA+SqlNet=ROCKY+ACC=P/endurotest/endurotest1+SesTM=180+LogDir=/tmp/xa+nolocal=f+Threads=true"
0620 NDRX_XA_CLOSE_STR=${NDRX_XA_OPEN_STR}
0621 # XA Static registration driver
0622 NDRX_XA_DRIVERLIB=${NDRX_HOME}/lib/libndrxxaoras.so
0623 # XA Dynamic registration driver
0624 #NDRX_XA_DRIVERLIB=${NDRX_HOME}/lib/libndrxxaorad.so
0625 NDRX_XA_RMLIB=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
0626 NDRX_XA_LAZY_INIT=1
0627 # XA SECTION, END
0628
0629 #
0630 # Debug section (no need for NDRX_DEBUG_CONF in CConfig case)
0631 #
0632 [@debug]
0633 *= ndrx=0 ubf=0
0634
0635 [@debug/server1]
0636 *= ndrx=5 ubf=0
0637
0638 ---------------------------------------------------------------------
0639
0640 NOTES FOR ORACLE DB
0641 -------------------
0642 Note that *tmsrv* run with multiple threads. Flag '+Threads=true' MUST be set in
0643 *NDRX_XA_OPEN_STR*. Otherwise unexpected core dumps can be received from *tmsrv*.
0644
0645
0646 NOTES FOR IBM AIX
0647 -----------------
0648 For IBM AIX it is recommended that *NDRX_THREADSTACKSIZE* parameter is used.
0649 If parameter is not set, Enduro/X tries to get new thread stack size from
0650 getrlimit(RLIMIT_STACK, ...) and is assigning current value to new thread.
0651 Starting from AIX 7.2, it looks like AIX is summing these stacks and checks
0652 against the *ulimit -s* (which is the same *RLIMIT_STACK* value), and thus
0653 new threads fails to create, as total process stack limit is exhausted.
0654
0655 BUGS
0656 ----
0657 Report bugs to support@mavimax.com
0658
0659 SEE ALSO
0660 --------
0661 *xadmin(8)*, *ndrxd(8)*, *ndrxconfig.xml(5)*, *ndrxdebug.conf(5)* *viewc(8)*
0662 *tpadmsv(8)* *tmqueue(8)* *tmsrv(8)*
0663
0664 COPYING
0665 -------
0666 (C) Mavimax, Ltd.
0667