0001 NDRXCONFIG.XML(5)
0002 =================
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 ndrxconfig.xml - Enduro/X ATMI Application Domain configuration
0009
0010
0011 SYNOPSIS
0012 --------
0013 ---------------------------------------------------------------------
0014 <?xml version="1.0" ?>
0015 <endurox>
0016 <appconfig>
0017 <sanity>SANITY_SECONDS</sanity>
0018 <checkpm>CHECKPM_STY</checkpm>
0019 <brrefresh>BRIDGE_REFRESH_TIME</brrefresh>
0020 <restart_min>MIN_RESTART_TIME</restart_min>
0021 <restart_step>RESTART_STEP</restart_step>
0022 <restart_max>MAX_RESTART_TIME</restart_max>
0023 <restart_to_check>NDRXD_RESTART_TO_CHECK</restart_to_check>
0024 <gather_pq_stats>NDRXD_GATHER_PQ_STATS</gather_pq_stats>
0025 <rqaddrttl>RQADDRTTL</rqaddrttl>
0026 <ddrreload>DDRRELOAD</ddrreload>
0027 </appconfig>
0028 <procgroups>
0029 <defaults name="PROCGROUP_NAME_DEF" grpno="PROCGROUP_GRPNO_DEF"
0030 noorder="PROCGROUP_NOORDER_DEF" singleton="PROCGROUP_SINGLETON_DEF"
0031 sg_nodes="PROCGROUP_SINGLETON_NODES_DEF" sg_nodes_verify="PROCGROUP_SINGLETON_NODES_VERIFY_DEF"/>
0032 ...
0033 <procgroup name="PROCGROUP_NAME" grpno="PROCGROUP_GRPNO"
0034 noorder="PROCGROUP_NOORDER" singleton="PROCGROUP_SINGLETON"
0035 sg_nodes="PROCGROUP_SINGLETON_NODES" sg_nodes_verify="PROCGROUP_SINGLETON_NODES_VERIFY"/>
0036 ...
0037 </procgroups>
0038 <defaults>
0039 <min>MIN_SERVERS_DEFAULT</min>
0040 <max>MAX_SERVERS_DEFAULT</max>
0041 <mindispatchthreads>MIN_DISPTHREADS_DEFAULT</mindispatchthreads>
0042 <maxdispatchthreads>MAX_DISPTHREADS_DEFAULT</maxdispatchthreads>
0043 <autokill>AUTOKILL_DEFAULT</autokill>
0044 <respawn>RESPAWN_DEFAULT</respawn>
0045 <env>ENV_OVERRIDE_DEFAULT</env>
0046 <start_max>MAX_STARTUP_TIME_DEFAULT</start_max>
0047 <pingtime>PING_EVERY_TIME_DEFAULT</pingtime>
0048 <ping_max>MAX_PING_TIME_DEFAULT</ping_max>
0049 <end_max>MAX_SERVER_SHUTDOWN_TIME_DEFAULT</end_max>
0050 <killtime>KILL_TIME_DEFAULT</killtime>
0051 <killseq>KILLSEQ_DEFAULT</killseq>
0052 <exportsvcs>EXPORT_SERVICES_DEFAULT</exportsvcs>
0053 <blacklistsvcs>BLACKLIST_SERVICES_DEFAULT</blacklistsvcs>
0054 <srvstartwait>NDRXD_SRV_START_WAIT_DEFAULT</srvstartwait>
0055 <srvstopwait>NDRXD_SRV_STOP_WAITT_DEFAULT</srvstopwait>
0056 <cctag>COMMON_CONFIG_TAG_DEFAULT</cctag>
0057 <protected>PROTECTED_SERVER_DEFAULT</protected>
0058 <reloadonchange>RELOAD_ON_CHANGE_DEFAULT</reloadonchange>
0059 <rssmax>RSSMAX_DEFAULT</rssmax>
0060 <vszmax>VSZMAX_DEFAULT</vszmax>
0061 <rqaddr>RQADDR_DEFAULT</rqaddr>
0062 <envs group="SVGRP_ENV_GROUP_NAME">
0063 <env name="SVGRP_ENV_VARIABLE_NAME">SVGRP_ENV_VARIABLE_VALUE</env>
0064 <env name="SVGRP_ENV_VARIABLE_NAME_1" unset="SVGRP_ENV_UNSET" />
0065 ...
0066 <env name="SVGRP_ENV_VARIABLE_NAME_N">SVGRP_ENV_VARIABLE_VALUE_N</env>
0067 </envs>
0068 ...
0069 <envs group="SVGRP_ENV_GROUP_NAME_N">
0070 ...
0071 </envs>
0072 <procgrp>SRV_PROCGRP_DEFAULT</procgrp>
0073 <procgrp_lp>SRV_PROCGRP_LP_DEFAULT</procgrp_lp>
0074 </defaults>
0075 <servers>
0076 <server name="SERVER_BINARY_NAME">
0077 <min>MIN_SERVERS_SRV</min>
0078 <max>MAX_SERVERS_SRV</max>
0079 <mindispatchthreads>MIN_DISPTHREADS_SERVER</mindispatchthreads>
0080 <maxdispatchthreads>MAX_DISPTHREADS_SERVER</maxdispatchthreads>
0081 <autokill>AUTOKILL_SRV</autokill>
0082 <respawn>RESPAWN_SRV</respawn>
0083 <env>ENV_OVERRIDE_SRV</env>
0084 <start_max>MAX_STARTUP_TIME_SRV</start_max>
0085 <pingtime>PING_EVERY_TIME_SRV</pingtime>
0086 <ping_max>MAX_PING_TIME_SRV</ping_max>
0087 <end_max>MAX_SERVER_SHUTDOWN_TIME_SRV</end_max>
0088 <killtime>KILL_TIME_SRV</killtime>
0089 <killseq>KILLSEQ</killseq>
0090 <sleep_after>SECONDS_TO_SLEEP_AFTER_SRV_START</sleep_after>
0091 <srvid>SERVER_ID</srvid>
0092 <sysopt>ATMI_SERVER_SYSTEM_OPTIONS</sysopt>
0093 <appopt>ATMI_SERVER_APPLICATION_OPTIONS</appopt>
0094 <exportsvcs>ATMI_SERVER_EXPORT_SERVICES</exportsvcs>
0095 <blacklistsvcs>ATMI_BLACKLIST_SERVICES</blacklistsvcs>
0096 <srvstartwait>NDRXD_SRV_START_WAIT</srvstartwait>
0097 <srvstopwait>NDRXD_SRV_STOP_WAIT</srvstopwait>
0098 <cctag>COMMON_CONFIG_TAG</cctag>
0099 <protected>PROTECTED_SERVER</protected>
0100 <reloadonchange>RELOAD_ON_CHANGE_SERVER</reloadonchange>
0101 <fullpath>ATMI_SERVER_FULL_PATH</fullpath>
0102 <cmdline>ATMI_SERVER_COMMAND_LINE</cmdline>
0103 <rssmax>ATMI_SERVER_RSSMAX</rssmax>
0104 <vszmax>ATMI_SERVER_VSZMAX</vszmax>
0105 <rqaddr>RQADDR</rqaddr>
0106 <envs>
0107 <usegroup>SVGRP_ENV_GROUP_NAME</usegroup>
0108 ...
0109 <usegroup>SVGRP_ENV_GROUP_NAME_N</usegroup>
0110 <env name="SVPROC_ENV_VARIABLE_NAME">SVPROC_ENV_VARIABLE_VALUE</env>
0111 <env name="SVPROC_ENV_VARIABLE_NAME_UNSET" unset="SVPROC_ENV_UNSET" />
0112 ...
0113 <env name="SVPROC_ENV_VARIABLE_NAME_N">SVPROC_ENV_VARIABLE_VALUE_N</env>
0114 </envs>
0115 <procgrp>SRV_PROCGRP</procgrp>
0116 <procgrp_lp>SRV_PROCGRP_LP</procgrp_lp>
0117 </server>
0118 ...
0119 <server name="SERVER_BINARY_NAME_N">
0120 ...
0121 </server>
0122 </servers>
0123 <clients>
0124 <envs group="CLTGRP_ENV_GROUP_NAME">
0125 <env name="CLTGRP_ENV_VARIABLE_NAME">CLTGRP_ENV_VARIABLE_VALUE</env>
0126 <env name="CLTGRP_ENV_VARIABLE_NAME_UNSET" unset="CLTGRP_ENV_UNSET" />
0127 ...
0128 <env name="CLTGRP_ENV_VARIABLE_NAME_N">CLTGRP_ENV_VARIABLE_VALUE_N</env>
0129 </envs>
0130 ...
0131 <envs group="CLTGRP_ENV_GROUP_NAME_N">
0132 ...
0133 </envs>
0134 <client cmdline="CLT_COMMAND_LINE [${NDRX_CLTTAG} ${NDRX_CLTSUBSECT}]"
0135 log="CLT_LOG"
0136 stdout="CLT_STDOUT"
0137 stderr="CLT_STDERR"
0138 env="CLTGRP_ENV"
0139 cctag="CLT_CCTAG"
0140 wd="CLT_WD"
0141 klevel="CLT_KLEVEL"
0142 autostart="CLT_AUTOSTART"
0143 rssmax="CLT_RSSMAX"
0144 vszmax="CLT_VSZMAX"
0145 subsectfrom="CLT_SUBSECTFROM"
0146 subsectto="CLT_SUBSECTTO"
0147 procgrp="CLT_PROCGRP"
0148 >
0149 <envs>
0150 <usegroup>CLTGRP_ENV_GROUP_NAME</usegroup>
0151 ...
0152 <usegroup>CLTGRP_ENV_GROUP_NAME_N</usegroup>
0153 <env name="CLTPROC_ENV_VARIABLE_NAME">CLTPROC_ENV_VARIABLE_VALUE</env>
0154 <env name="CLTPROC_ENV_VARIABLE_NAME_UNSET" unset="CLTPROC_ENV_UNSET" />
0155 ...
0156 <env name="CLPROC_ENV_VARIABLE_NAME_N">CLTPROC_ENV_VARIABLE_VALUE_N</env>
0157 </envs>
0158 <exec tag="CLT_TAG_EXEC"
0159 subsect="CLT_SUBSECT_EXEC"
0160 log="CLT_LOG_EXEC"
0161 stdout="CLT_STDOUT_EXEC"
0162 stderr="CLT_STDERR_EXEC"
0163 env="CLTGRP_ENV_EXEC"
0164 cctag="CLT_CCTAG_EXEC"
0165 wd="CLT_WD_EXEC"
0166 autostart="CLT_AUTOSTART_EXEC"
0167 klevel="CLT_KLEVEL_EXEC"
0168 rssmax="CLT_RSSMAX_EXEC"
0169 vszmax="CLT_VSZMAX_EXEC"
0170 subsectfrom="CLT_SUBSECTFROM_EXEC"
0171 subsectto="CLT_SUBSECTTO_EXEC"
0172 procgrp="CLT_PROCGRP_EXEC"
0173 />
0174 <exec tag="CLT_TAG_EXEC2"
0175 subsect="CLT_SUBSECT2_EXEC2"
0176 .../>
0177 </client>
0178 <client cmdline="BINARY2" ...>
0179 <exec tag="CLT_EXE_TAG2" .../>
0180 </client>
0181 </clients>
0182 <services>
0183 <defaults prio="SVC_PRIO_DEF"
0184 routing="SVC_ROUTE_NAME_DEF"
0185 autotran="SVC_AUTOTRAN_DEF"
0186 trantime="SVC_TRANTIME_DEF"/>
0187 ...
0188 <service svcnm="SVC_SERVICE_NAME"
0189 prio="SVC_PRIO"
0190 routing="SVC_ROUTE_NAME"
0191 autotran="SVC_AUTOTRAN"
0192 trantime="SVC_TRANTIME"/>
0193 ...
0194 </services>
0195 <routing>
0196 <route routing="ROUTE_NAME">
0197 <field>ROUTE_FIELD</field>
0198 <ranges>ROUTE_RANGES</ranges>
0199 <buftype>ROUTE_BUFFER</buftype>
0200 <fieldtype>ROUTE_FIELDTYPE</fieldtype>
0201 </route>
0202 ...
0203 </routing>
0204 </endurox>
0205 ---------------------------------------------------------------------
0206
0207
0208 DESCRIPTION
0209 -----------
0210
0211 'ndrxconfig.xml' holds the application domain configuration. It describes the ATMI
0212 servers that need to be started. Counts of the, how much to start. Also, it
0213 describes sanity times i.e. period after which system sanity checks should be made.
0214 Also, it describes time frames in which ATMI server should start or stop.
0215 Internal server ping can be configured here too.
0216
0217
0218 PARAMETERS
0219 ----------
0220
0221 'SANITY_SECONDS'::
0222 Number of seconds in which perform system periodic sanity checks. Next cycle time
0223 is measured from the finish of the last sanity checks, meaning that in absolute
0224 terms, depending on the system performance, the next sanity check would be
0225 performed after a slightly longer period than specified
0226 in 'SANITY_SECONDS'. The minimum value for the setting is *1*.
0227 'CHECKPM_STY'::
0228 The number of the sanity cycles into which to perform check for dead server processes.
0229 This check is a backup mechanism for catching dead servers, as the primary
0230 mechanism is based on waitpid() system call in the separate thread within *ndrxd(8)*.
0231 Check performs proactive verification of the PID existence in the system.
0232 This check is useful if ndrxd is restarted in learning mode.
0233 In this mode ndrxd is not parent anymore of child servers, thus it cannot collect
0234 dead server PIDs with waitpid() call. However, this setting would allows to discover
0235 such PIDs and perform any necessary actions.
0236 'BRIDGE_REFRESH_TIME'::
0237 The number of sanity units in which *tpbridge(8)* refresh should be sent to other node.
0238 If for example 'SANITY_SECONDS' is set to 10, and 'BRIDGE_REFRESH_TIME' is set to 2
0239 then the period between bridge refreshes will be 10*2 = 20 seconds.
0240 The default value is *0* - do not send full updates.
0241 'MIN_RESTART_TIME'::
0242 Number of sanity units in which died server will be tried to start back. This is
0243 minimal time, which means that this time is applied in case if server is running
0244 (*tpsvrinit(3)* was success) and dies.
0245 If it is a consecutive try, then 'RESTART_STEP' is applied on this timer.
0246 'RESTART_STEP'::
0247 Number to sanity units to apply on 'MIN_RESTART_TIME' in case of consecutive server death.
0248 Meaning that next try of restart will tried later that previous by this
0249 number of sanity units.
0250 'MAX_RESTART_TIME'::
0251 Max number of sanity units after which server will tried to restart.
0252 After each consecutive ATMI server death, next reboot is tried
0253 by 'MIN_RESTART_TIME'+'RESTART_STEP'*try_count. If this goes over the
0254 'MAX_RESTART_TIME' then 'MAX_RESTART_TIME' is used instead.
0255 'NDRXD_RESTART_TO_CHECK'::
0256 Number of *seconds* for 'ndrxd' to wait after daemon started in recovery
0257 mode. Within this time no sanity checks are perfomed, but instead "learning" mode
0258 is used. During this mode, 'ndrxd' asks each ATMI server for it's configuration.
0259 If in this time ATMI server does not responds, then ATMI server is subject
0260 of sanity checks.
0261 'NDRXD_GATHER_PQ_STATS'::
0262 Settings for *pq* *xadmin* command. if set to 'Y', ndrxd will automatically collect
0263 stats for service queues. In future this might be used for automatic service starting
0264 and stopping.
0265 'RQADDRTTL'::
0266 Used only when operating System V queues mode. Due to common queue for
0267 multiple services / basically all service queues are shared request addresses,
0268 the only zapping approach when there are no servers on queues, is to check
0269 that in service shared memory there are no linked request address queues,
0270 and at time perform unlink of the request address queue. But here we have a
0271 problem. The XATMI server might just started up, opened the RQADDR queue,
0272 but did not yet managed to install record in service shared memory. Thus
0273 'ndrxd' will unlink the RQADDR. To avoid this issue, with TTL slight delay
0274 is introduced, after which queue is unlinked. Basically when queue is open
0275 it's change time is updated. And if current time minus change time is
0276 less than 'RQADDRTTL', then queue is not unlinked (in this time server will
0277 be able to add record to service shared memory). Also with this comes a fact
0278 that there must be no server processes without any service. For those
0279 request address queue will be unlinked.
0280 The value is in seconds. Checks are performed with 'SANITY_SECONDS' intervals.
0281 Default value is *10* seconds.
0282 'DDRRELOAD'::
0283 This setting identifies the number of sanity cycles used to wait for updating
0284 DDR routing tables on the fly with "xadmin reload" command.
0285 Default value is *60*. This deferred approach is used for
0286 purpose, that it protects any processes which are in previous version of
0287 DDR routing tables and has not yet completed. Routing details are
0288 stored in double buffered routing pages for lock-less operations. If using
0289 smaller number of cycles, then it would increase the probability of corrupted routing,
0290 if administrator is doing config reload twice in a row with routing config changed.
0291 Thus these cycles give opportunity for any processes to complete routing.
0292 Overall chance that process will get corrupted pages with this approach
0293 is very low. As reload must be performed twice, and process shall be stalled
0294 for some reason in routing table, which by it self is very fast operation
0295 if *ndrxd* logging is turned off, as routing basically is CPU-RAM operation.
0296 Even if any such process was unable to complete the route,
0297 the error is detected and service call might return *TPESYSTEM* and
0298 corresponding ULOG message is written.
0299 'MIN_SERVERS_DEFAULT'::
0300 Default minimum number of copies of the server which needs to be started automatically.
0301 This can be overridden by 'MIN_SERVERS_SRV' per server.
0302 'MAX_SERVERS_DEFAULT'::
0303 Max number of ATMI server copies per ATMI server entry. The difference between
0304 MIN and MAX servers means the number of standby servers configured. They can be started
0305 by hand without system re-configuration. But they are not booted automatically at
0306 system startup. You will have to start them with $ xadmin start -s <server_name>
0307 or by $ xadmin start -i <server_id>. This can be overridden by 'MAX_SERVERS_SRV'.
0308 'MAX_DISPTHREADS_DEFAULT'::
0309 This configures the maximum number of dispatch threads (workers) for XATMI
0310 servers dispatcher. Default value is *1*. If set grater than *1*, then
0311 XATMI server library booted in multi-thread mode and thread pool of workers
0312 is intialized. The number of workers threads is configured by
0313 'MIN_DISPTHREADS_DEFAULT' / 'MIN_DISPTHREADS_SERVER' configuration values.
0314 If XATMI server is not built for multi-thread mode (flag *-t* was not
0315 passed to *buildserver(8)* or *_tmbuilt_with_thread_option* extern variable
0316 before XATMI server main routine start was not set to *1*), the binary startup
0317 will fall-back to single-thread mode and warning is printed in ULOG.
0318 'MIN_DISPTHREADS_DEFAULT'::
0319 This is actual number of dispatch threads (workers) used by XATMI server
0320 service dispatcher. By default this is *1*. In case if *<maxdispatchthreads>*
0321 was set to *1* (default), then multi-thread is not used and the main
0322 thread is performing dispatch operations. The value of 'MIN_DISPTHREADS_DEFAULT'
0323 may be overridden by 'MIN_DISPTHREADS_SERVER' value. The 'MIN_DISPTHREADS_DEFAULT'/
0324 'MIN_DISPTHREADS_SERVER' must be less or equal to 'MAX_DISPTHREADS_DEFAULT'/
0325 'MAX_DISPTHREADS_SERVER'.
0326 'AUTOKILL_DEFAULT'::
0327 Should server be automatically killed (by sequence signal sequence
0328 -2, -15, -9) in case if server have been starting up too long, or
0329 does not respond to pings too long, or it is performing shutdown
0330 too long. This can be overridden by 'AUTOKILL_SRV' on per server
0331 basis.
0332 'ENV_OVERRIDE_DEFAULT'::
0333 Full path to file containing environment variable overrides.
0334 see 'ex_envover(5)' for more details. This can be overridden
0335 by per server basis by 'ENV_OVERRIDE_SRV'.
0336 Both are optional settings.
0337 'MAX_STARTUP_TIME_DEFAULT'::
0338 Max time (in sanity units) in which server should start up, i.e. send init info to
0339 *ndrxd*. If during this time server have not initialized, it is being restarted. This
0340 can be overridden by 'MAX_STARTUP_TIME_SRV'.
0341 'PING_EVERY_TIME_DEFAULT'::
0342 Number of sanity units in which perform periodical server pings. This can be
0343 overridden by 'PING_EVERY_TIME_SRV'. Zero value disables ping.
0344 'MAX_PING_TIME_DEFAULT'::
0345 Number of sanity units, time in which server *must* respond to ping requests.
0346 If there is no response from server within this time, then restart sequence is
0347 initiated. This can be overridden by 'MAX_PING_TIME_SRV'.
0348 'MAX_SERVER_SHUTDOWN_TIME_DEFAULT'::
0349 Maximum time in which shutdown of server must complete in sanity units.
0350 If in given time server is not shutdown, then forced shutdown sequence
0351 is started until server exits. This can be overridden by 'MAX_SERVER_SHUTDOWN_TIME_SRV'
0352 on per server basis.
0353 'EXPORT_SERVICES_DEFAULT'::
0354 Comma separated list of services to be applied to all binaries which means the list of
0355 services to be exported by *tpbridge* server to other cluster node. This can be overridden by
0356 'ATMI_SERVER_EXPORT_SERVICES'.
0357 'BLACKLIST_SERVICES_DEFAULT'::
0358 Comma separated list of services to be applied to all server binaries which means the list of
0359 services that must not be exported by *tpbridge* server to other cluster node.
0360 'ATMI_SERVER_BLACKLIST_SERVICES' is first priority over the 'EXPORT_SERVICES_DEFAULT' if
0361 service appears in both lists. 'BLACKLIST_SERVICES_DEFAULT' can be overridden by
0362 'ATMI_SERVER_BLACKLIST_SERVICES'.
0363 'NDRXD_SRV_START_WAIT_DEFAULT'::
0364 Number of seconds to wait for servers to boot. If not started in given time,
0365 then continue with next server. This can be overridden by 'NDRXD_SRV_START_WAIT'.
0366 Default value for this is 30 seconds.
0367 'NDRXD_SRV_STOP_WAIT_DEFAULT'::
0368 Number of seconds to wait for server to shutdown. If not started in given time,
0369 then continue with next server. This can be overridden by 'NDRXD_SRV_STOP_WAIT'.
0370 Default value for this is 30 seconds.
0371 'KILL_TIME_DEFAULT'::
0372 Time in sanity units after which to progress from first signal -2 to next signal
0373 -15. And after -15 this time means when next -9 signal will be sent. This is used
0374 if forced restart of forced shutdown was initiated by 'ndrxd'. This
0375 can be overridden by 'KILL_TIME_SRV'.
0376 'KILL_TIME_DEFAULT'::
0377 This is Enduro/X standard configuration string (e.g. comma separated values)
0378 which describes signal sequence used by ndrxd when process needs to be
0379 forcefully terminated. The default signal sequence is *2,15,9*. Only
0380 3 signals can be defined. Absolute value is used for signal determination,
0381 i.e. the minus sign is optional. Only numeric values signal values are supported.
0382 'COMMON_CONFIG_TAG_DEFAULT'::
0383 Common configuration tag. Loaded into *NDRX_CCTAG* environment variable before
0384 process is spawned. This can be overridden by *COMMON_CONFIG_TAG*.
0385 'PROTECTED_SERVER_DEFAULT'::
0386 Protected server does not shutdown with *xadmin stop -k*
0387 (keep ndrxd running) command.
0388 If doing the standard *xadmin stop* parameter then server is shutdown as all others.
0389 It is possible stop stop it by *xadmin stop -i <srvid>* or by
0390 *xadmin stop -s <servernm>*. The *xadmin restart* does not accept *-k* parameter
0391 thus protected server will be stopped too.
0392 The idea behind this, is to avoid accidental stop of the critical servers, like bridge or
0393 something else which is involved into *ndrxd* daemon management it self.
0394 This can be overridden by 'PROTECTED_SERVER'.
0395 'RELOAD_ON_CHANGE_DEFAULT'::
0396 If set to *Y* or *y* the *ndrxd* daemon will scan the every binaries time stamp,
0397 and if it detects that time stamp is changed *ndrxd* will reload (stop/start)
0398 the XATMI servers one by one. The scanning will occur at every sanity
0399 cycle. This is recommended to be used *only* for development purposes.
0400 This can be overridden by 'RELOAD_ON_CHANGE_SERVER' on per server basis.
0401 Reload happens on those XATMI servers instances which were marked for start.
0402 'RSSMAX_DEFAULT'::
0403 Maximum Resident Set Size memory size after which *ndrxd(8)* process will issue
0404 server reload (sr) command (i.e. gracefully
0405 shutdown and start back) to server process if
0406 particular server process resident memory goes over this defined value.
0407 The value can be overridden by 'ATMI_SERVER_RSSMAX' for the particular server
0408 instance.
0409 This parameter is useful to be used to protect local machine against
0410 defective/binaries with memory leaks. The parameter value is
0411 expressed in bytes. Configuration file also accepts
0412 suffixes such as "T" or "t" for terrabytes, "G" or "g" for gigabytes, "M" or
0413 "m" for megabytes and "K" or "k" for kilobytes. For example "10M" would
0414 limit resident memory to 10 megabytes. The default value is *-1*, which
0415 means that functionality is not used.
0416 'VSZMAX_DEFAULT'::
0417 Maximum Virtual Set Size memory size (the number bytes program have asked to
0418 OS kernel for memory, but it does *not* mean it is physically used or initialized)
0419 after which *ndrxd(8)* process will issue
0420 server reload (sr) command (i.e. gracefully shutdown and start back) to
0421 the server process if a particular server's process virtual memory goes
0422 over this defined value. The value can be overridden by
0423 'ATMI_SERVER_VSZMAX' for particular server instance.
0424 This parameter is useful to be used to protect local machine
0425 defective/binaries with memory leaks. The parameter value is
0426 expressed in bytes. The configuration file also accepts
0427 suffixes such as "T" or "t" for terabytes, "G" or "g" for gigabytes, "M" or
0428 "m" for megabytes and "K" or "k" for kilobytes. For example "10M" would
0429 limit resident memory to 10 megabytes. The default value is *-1*, which
0430 means that functionality is not used.
0431 'RQADDR_DEFAULT'::
0432 Request address (common service queue) used in System V mode. For other
0433 modes each service have it's own queue, but due to limitations of the System V
0434 queues, for each XATMI server process have it's own queue (built as process
0435 /exe name and service id) or processes can share the queue by having this
0436 request address, thus getting a one queue multiple servers mechanism for
0437 message dispatching. Also all servers attached on the same request address
0438 must advertise all the services from all servers attached on the same
0439 request address. If some server will miss a service, it might receive request
0440 for particular service, the error will be logged and message will be dropped,
0441 thus caller will get a timeout. If different request addresses are serving
0442 the same service, then request will be load balanced in round-robin mode.
0443 This can be overridden by 'RQADDR' on per server basis. Request address
0444 cannot start with '@' symbol. The max length of the request address is *30*
0445 chars.
0446 'SECONDS_TO_SLEEP_AFTER_SRV_START'::
0447 Number of seconds to wait for next item to start after the server is launched.
0448 This is useful in cases when for example we start bridge server, let it for some
0449 seconds to connect to other node, then continue with other service startup.
0450 'SERVER_BINARY_NAME'::
0451 ATMI server executable's name. The executable must be in $PATH.
0452 This name cannot contain special symbols like path separator '/'
0453 and it cannot contains commas ','! Commas are used as internal
0454 queue separator combined with binary names.
0455 'RESPAWN_DEFAULT'::
0456 Do the automatic process re-spawning if process is died for some reason. The default
0457 value is *Y*, meaning that processes are automatically recovered. If set to 'N' or 'n',
0458 then sanity checks will not automatically re-boot the process.
0459 This can be overridden by 'RESPAWN_SRV'.
0460 'SERVER_ID'::
0461 Server ID. It is internal ID for server instance. For each separate ATMI server
0462 the ID must be unique. Also special care should be take when MAX_SERVERS_SRV is greater
0463 than 1. In this case up till MAX servers, internally 'SERVER_ID' is incremented.
0464 Thus for example if SERVER_ID is 200, and MAX_SERVERS_SRV is 5, then
0465 following server IDs will be reserved: 200, 201, 202, 203, 204. The maximum server
0466 id is set in $NDRX_SRVMAX environment variable. Minimal server id is 1.
0467 'ATMI_SERVER_SYSTEM_OPTIONS'::
0468 Command line system options passed to ATMI server. Following parameters are
0469 used by Enduro/X ATMI servers: *-N*, boolean type. If present, then no services
0470 will be advertised by server. In this case only services specified
0471 by *-s* (service alias) or *-S* (function alias) flags will be advertised.
0472 For example if server advertises *SERVICE1, SERVICE2, SERVICE3*, but *-N*
0473 is specified, and *-sSERVICE3* is specified, then only service *SERVICE3* will be
0474 advertised. The *-s* argument also can contain aliases to other services, for example
0475 *-sOTHERSVC:SERVICE2*, new service *OTHERSVC* will be advertised which
0476 basically is the same *SERVICE2* (same function used). *-s*, *-S* and *-N*, *-B* can be mixed.
0477 In case if services which are built-in by *buildserver(8)* shall not be advertised,
0478 flag *-B* shall be used, but all other services provided in clopt or advertised by
0479 *tpadvertise(3)* will be available. Difference between *-N* and *-B* is that
0480 *-N* supresses advertise of all services except ones provided in clopt, but
0481 *-B* supresses only built-in services provided by *buildserver(8)*.
0482 Flag *-s* can appear multiple times in system options. With one *-s* multiple services
0483 can be aliased to single existing service.
0484 The format is: *-s*'<NEWSVC1>/<NEWSVC2>/../<NEWSVCN>:<EXISTINGSVC>'. The *,* can be
0485 used as separator too, but for certain platforms it does not work, thus */* is
0486 recommended. Services can be masked out from final advertise by
0487 by *-n* flag. For example *-nSERVICE4* will not be advertised (no matter was it
0488 advertise or alias). *-n* can be repeated multiple times.
0489 When Enduro/X XATMI server is built with integration lib (libatmisrvinteg)
0490 user can alias the functions to service names with
0491 *-S*'<service_name1>/<service_name2>[:<function name>]' flag. Functions are
0492 passed to *buildserver(8)* at build time or registered in *tmdsptchtbl_t* array
0493 passed to *_tmstartserver(3)*. If '<function name>' is not specified, then service
0494 name is matched against function name. Firstly *-S* flags are processed,
0495 afterwards *-s*' flags are processed, meaning that it works as
0496 usual including to function aliased services by *-S* services.
0497 Server binaries output is controlled via *-e* 'LOG_FILE', which means
0498 that *stdout* & *stderr* of server is dumped to 'LOG_FILE'. If *ndrxdebug.conf(5)*
0499 (or env config) did not specify the logfile for the process, then
0500 *-e* value is selected as output logfile and this make *stdout* and *stderr* to
0501 be managed by Enduro/X logger (i.e. lcf logrotate will reopen handles). *-o*
0502 specifies *stdout* output file. In case if *-e* is managed by Enduro/X logger and
0503 having *-o* different file name, standard output handle will not be managed by Enduro/X logger.
0504 There are few internal parameters: parameter *-k* is just a random key
0505 for shell scripts. Another internal parameter is Server ID which is automatically passed
0506 to binary via *-i* 'SERVER_ID'.
0507 Enduro/X supports automatic buffer conversion for ATMI servers.
0508 Currently supported modes are *JSON2UBF*, *UBF2JSON*, these modes are activated
0509 by *-x* parameter in system options. These modes are passed for server functions
0510 being advertised. For example if we have service functions (not services)
0511 *UBF1FUNC*, *UBF2FUNC* and *JSONFUNC* and we want to ensure that these receive
0512 converted messages even if caller to UBF service sends JSON and vice versa, then
0513 following options might be set to command line:
0514 *-xUBF1FUNC,UBF2FUNC:JSON2UBF -xJSONFUNC:UBF2JSON*. With
0515 flag *-g*'<RTGRP>' it is possible to define or override the env variable
0516 *NDRX_RTGRP* - routing group code. Use *-G* flag to configure that particular server
0517 shall include '@<RTGRP>' routing group suffix in service name received by
0518 service function (i.e. structure *TPSVCINFO* field *name* shall contain full
0519 service name with the group code, if call was routed to group),
0520 by default group name is not included even if service is routed to the group.
0521 'ATMI_SERVER_APPLICATION_OPTIONS'::
0522 Application-specific command line options. This follows content after sys options as:
0523 'system options -- app options'.
0524 'ATMI_SERVER_EXPORT_SERVICES'::
0525 Enduro/X server-specific list of services to be exported. This list is only for
0526 *tpbridge* servers.
0527 'ATMI_SERVER_BLACKLIST_SERVICES'::
0528 Enduro/X server-specific list of services that must not be exported. This list is only for
0529 *tpbridge* servers. Blacklist has higher priority over the Export list.
0530 'ATMI_SERVER_FULL_PATH'::
0531 This is full path of the XATMI server binary. At the process startup this overrides
0532 the server binary name at 'SERVER_BINARY_NAME'. 'ATMI_SERVER_FULL_PATH' is used only
0533 for process startup. This is intended for testing, if server wrapper scripts
0534 needs to be started. But as the *ndrxd* will do the sanity checks against the process
0535 names, for time of the testing this needs to be disabled. Thus to do the testings with
0536 full path enabled, please increase the 'checkpm' sanity unit time. As at the moment
0537 of process model checks, the ndrxd will find out that wrapped binary name does not
0538 contain the 'SERVER_BINARY_NAME', thus will reboot the process.
0539 'ATMI_SERVER_COMMAND_LINE'::
0540 This is an alternative command line built by the user. From this command line the
0541 real process name is extracted as first executable (basename). When building
0542 custom command line, the env substitution is available at the stage with
0543 following processes-based envs (not counting the globals): *NDRX_SVSRVID* -
0544 Enduro/X server id, *NDRX_SVPROCNAME* - server process name (defined in XML
0545 config as 'SERVER_BINARY_NAME' value, *NDRX_SVCLOPT* - standard command
0546 line options used by Enduro/X. These options are used at stage with ATMI
0547 server library gets initialized, it will use in case *ndrx_main()* receives
0548 less than expected standard argument count. This command line tag
0549 is suitable for interpreted languages, like Java, where the interpreter needs to
0550 be started as a stand-alone binary, and the Enduro/X is initialized as a library
0551 within a stand-alone process.
0552 'SRV_PROCGRP'::
0553 Process group name. If used, group must be previously defined at '<procgroups>'.
0554 This can be overridden by 'SRV_PROCGRP_DEFAULT' on per server basis.
0555 'SRV_PROCGRP_LP'::
0556 Process group name for which this server functions as a lock provider. Lock provider
0557 process distinguishes on which Enduro/X cluster node singleton group will be booted.
0558 'SRV_PROCGRP_LP' is only required for singleton groups. Parameter is not required
0559 for normal XATMI servers. This can be overridden by 'SRV_PROCGRP_LP_DEFAULT' on per server basis.
0560 'SVGRP_ENV_GROUP_NAME'::
0561 Environment variable group name for the servers section. Identifier max length
0562 is 30 chars. Same group can be used for different server processes. One server
0563 may import multiple groups. For client processes groups are defined
0564 'CLTGRP_ENV_GROUP_NAME' name at '<clients>' section. At process level groups
0565 can be imported by using tag '<usegroup>' and specifying the group name. At
0566 that moment all variables defined in group are import for process.
0567 'SVGRP_ENV_VARIABLE_NAME'::
0568 This server server's group environment variable name, that shall be set for
0569 process which uses this group. For client processes 'CLTGRP_ENV_VARIABLE_NAME'
0570 set the variable name at group definition. Individual environment variables
0571 can be set at process level. For server processes that is set by
0572 'SVPROC_ENV_VARIABLE_NAME' and for client processes by 'CLTPROC_ENV_VARIABLE_NAME'.
0573 'SVGRP_ENV_VARIABLE_VALUE'::
0574 This is environment variable value to be set. For client process groups this
0575 is defined by 'CLTGRP_ENV_VARIABLE_VALUE'. For individual processes value is
0576 defined by 'SVPROC_ENV_VARIABLE_NAME' and 'CLTPROC_ENV_VARIABLE_NAME'
0577 accordingly. The value is interpreted by variable substitution algorithm (see
0578 bellow). The value is interpreted at time when process is spawned (not defined),
0579 meaning that it have access to full process variables at startup moment.
0580 'SVGRP_ENV_UNSET'::
0581 If set to 'y' or 'Y' then environment's environment variable is unset (removed)
0582 from environment. This can be used if some specific variable for process is
0583 not needed. At client environment group level this can be set by *CLTGRP_ENV_UNSET*,
0584 at process levels this can be set by *SVPROC_ENV_UNSET* and *CLTPROC_ENV_UNSET*
0585 accordingly. If any value is present for this variable, it is ignored, as the
0586 main action of this tag is unset the value and only what matters here is the
0587 variable name.
0588 'CLT_COMMAND_LINE'::
0589 Executable name and arguments for client program. Command line basically is a format
0590 string for which you can use '${NDRX_CLTTAG}' for tag substitution and '${NDRX_CLTSUBSECT}'
0591 for subsection substitution. Other env variables available here too.
0592 'CLT_LOG'::
0593 Logfile to which stdout and stderr is logged. Can be overridden by 'CLT_LOG_EXEC'
0594 for each process. Optional attribute.
0595 'CLT_STDOUT'::
0596 File where to log stdout. Can be overridden by 'CLT_STDOUT_EXEC'
0597 for each process. Optional attribute.
0598 'CLT_STDERR'::
0599 File where to log stderr. Can be overridden by 'CLT_STDERR_EXEC'
0600 for each process. Optional attribute.
0601 'CLTGRP_ENV'::
0602 Environment override file. See *ex_envover(5)* for syntax. Can be overridden
0603 by 'CLTGRP_ENV_EXEC' for each process. Optional attribute.
0604 'CLT_CCTAG'::
0605 ATMI Client lib Common-Config tag. Can be overridden by 'CLT_CCTAG_EXEC'
0606 for each process. Optional attribute.
0607 'CLT_WD'::
0608 Working directory for the process. Can be overridden by 'CLT_WD_EXEC'.
0609 'CLT_AUTOSTART'::
0610 Should process be started automatically? 'Y' or 'y' means boot at start.
0611 Can be overridden by 'CLT_AUTOSTART_EXEC' for each process.
0612 Optional attribute. Default 'n'.
0613 'CLT_TAG_EXEC'::
0614 Tagname to be set for process.
0615 'CLT_SUBSECT_EXEC'::
0616 Subsection to be set for process. '-' used as default.
0617 'CLT_RSSMAX'::
0618 Maximum Resident Set Size memory size after which *cpmsrv(8)* process will
0619 gracefully kill the client process by signals -2, -15, -9 if
0620 particular client process resident memory goes over this defined value.
0621 After killing, the cpmsrv at first check interval will detect that client
0622 is dead, and at next check interval it will be respawned.
0623 The value can be overridden by 'CLT_RSSMAX_EXEC'.
0624 This parameter is useful to be used to protect local machine against
0625 defective/binaries with memory leaks. The parameter value is
0626 expressed in bytes. The configuration file also accepts
0627 suffixes such as "T" or "t" for terrabytes, "G" or "g" for gigabytes, "M" or
0628 "m" for megabytes and "K" or "k" for kilobytes. For example "10M" would
0629 limit resident memory to 10 megabytes. The default value is *-1*, which
0630 means that functionality is not used.
0631 'CLT_VSZMAX'::
0632 Maximum Virtual Set Size memory size (the number bytes program have asked to
0633 OS kernel for memory, but does it does *not* mean it is physically used or initialized)
0634 after which *cpmsrv(8)* process will
0635 gracefully kill the client process by signals -2, -15, -9 if
0636 a particular client process virtual memory goes over this defined value.
0637 After killing, the cpmsrv at first check interval will detect that client
0638 is dead, and at next check interval it will be respawned.
0639 The value can be override by 'CLT_RSSMAX_EXEC'.
0640 This parameter is useful to be used to protect local machine against
0641 defective/binaries with memory leaks. The parameter value is
0642 expressed in bytes. Configuration file also accepts
0643 suffixes such as "T" or "t" for terrabytes, "G" or "g" for gigabytes, "M" or
0644 "m" for megabytes and "K" or "k" for kilobytes. For example "10M" would
0645 limit resident memory to 10 megabytes. The default value is *-1*, which
0646 means that functionality is not used.
0647 'CLT_SUBSECTFROM'::
0648 If set, then used to auto-generate number subsections for particular client
0649 definition. In this case 'CLT_SUBSECT_EXEC' parameter value is ignored.
0650 The loop must start with non negative number and must not be greater than
0651 integer (2147483647) and less or equal to 'CLT_SUBSECTTO'.
0652 Default is *undefined* and not used. Can be overridden
0653 by 'CLT_SUBSECTFROM_EXEC'. Must be used together with 'CLT_SUBSECTTO'.
0654 'CLT_SUBSECTTO'::
0655 If set, then used to auto-generate number subsections for particular client
0656 definition. In this case *CLT_SUBSECT_EXEC* parameter value is ignored.
0657 The loop must end with non negative number and must not be greater than
0658 integer (2147483647). Default is *undefined* and not used. Can be overriden
0659 by 'CLT_SUBSECTFROM_EXEC'. Must be used together with 'CLT_SUBSECTFROM'.
0660 'CLT_KLEVEL'::
0661 Kill level of the client. *0* - do not kill child processes recursively
0662 of the client, *1* - do kill child processes only when performing
0663 SIGKILL (-9), *2* - do kill on SIGTERM and SIGINT child processes.
0664 The default is *0*.
0665
0666 'SVC_SERVICE_NAME'::
0667 Service name for which settings are being defined. Max service length is
0668 *30* symbols.
0669
0670 'CLT_PROCGRP'::
0671 Process group name. If used, group must be previously defined at '<procgroups>'.
0672 This can be overridden by 'CLT_PROCGRP_EXEC'.
0673
0674 'SVC_PRIO'::
0675 Service call default priority. If value is not set, then it it is loaded
0676 from default value 'SVC_PRIO_DEF'. If default is not set, then value *50*
0677 is used in the Enduro/X system. Priority is valid to be set in range of
0678 *1*..*100*. This is used for Linux and FreeBSD OS. Note that values 1..100
0679 may be downscaled prior doing mq_send() Posix function call, if operating
0680 system has lesser number of priorities available. Consult with your operating
0681 system documentation, particularly constant *MQ_PRIO_MAX*.
0682
0683 'SVC_ROUTE_NAME'::
0684 Routing criterion name. Which must reference valid routing definition under the
0685 *<routing>/<route>*, value 'ROUTE_NAME'. If value is not specified, value is taken from
0686 'SVC_ROUTING_NAME_DEF'. This parameter is optional. If not set, then no
0687 routing is performed for service and messages are sent to default service.
0688 Max routing name length is *15* symbols.
0689
0690 'SVC_AUTOTRAN'::
0691 Automatic transaction mode for service. If parameter is set to *y* or *Y*,
0692 then if XATMI service is invoked without global transaction, the XATMI
0693 server will start the transaction automatically. When server process performs
0694 *tpreturn(3)*, transaction is committed in case if server returns *TPSUCCESS*
0695 otherwise transaction is aborted. If process performs *tpforward(3)*, then
0696 receiving server becomes the transaction owner. If parameter is not specified value is
0697 taken from the previously defined 'SVC_AUTOTRAN_DEF' value. If it was not set,
0698 then default is *N* (no auto global transactions used by server).
0699 Note that this setting is extracted by XATMI server processes at the startup
0700 time. If configuration is change, say from *N* to *Y*, particular XATMI server
0701 processes needs to be restarted in order to enable automatic transactions
0702 for particular XATMI servers.
0703
0704 'SVC_TRANTIME'::
0705 Automatic transaction lifetime. This parameter is used by XATMI servers starting
0706 when automatic transactions are started. If the value is not specified, then
0707 the value is taken from the previously defined 'SVC_TRANTIME_DEF'. If this value also
0708 is not defined, then the default value is *30*.
0709
0710 'ROUTE_NAME'::
0711 This is route name using for data-dependent-routing (DDR). Route name max
0712 length is *15* symbols.
0713
0714 'ROUTE_FIELD'::
0715 This is route field name. Currently, Enduro/X only supports UBF buffer routing,
0716 thus this field must contain valid/resolvable UBF field definition. Field
0717 types accepted four routing are *BFLD_SHORT*, *BFLD_CHAR*, *BFLD_LONG*, *BFLD_FLOAT*,
0718 *BFLD_DOUBLE*, *BFLD_STRING* and *BFLD_CARRAY*.
0719
0720 'ROUTE_RANGES'::
0721 Route ranges definition. Defines the ranges by which destination service
0722 group is selected. See the section "DATA DEPENDENT ROUTING" below for syntax details.
0723
0724 'ROUTE_BUFFER'::
0725 Buffer type accepted for routing. Currently supported buffer type is *UBF*.
0726 When service call is performed and routing exists for service, lookup is
0727 performed by using key: 'ROUTE_NAME' and 'ROUTE_BUFFER'. Thus for one
0728 service several routes might be defined. When service call is made, and
0729 no matching route (if was defined any route) and/or no matching range is found,
0730 error *TPESYSTEM* is returned for *tpcall(3)*, *tpacall(3)* and related
0731 service routines.
0732
0733 'ROUTE_FIELDTYPE'::
0734 This specified how field shall be used in routing. Supported values are
0735 *SHORT*, *CHAR*, *LONG*, *FLOAT*, *DOUBLE*, *STRING*. Where the *SHORT*
0736 are internally mapped to *LONG* range, *FLOAT* is mapped to *DOUBLE*,
0737 *CHAR* is mapped to *STRING*. For UBF routes, this field is optional,
0738 and if it is not specified, then field type is extracted from UBF field.
0739 Additionally any *BFLD_CARRAY* is mapped to *STRING*.
0740
0741 'PROCGROUP_NAME'::
0742 Process group name. Identifier may contain following characters: "a-zA-Z0-9_".
0743 Max length 30 chars. If a process group name
0744 is not defined for the '<procgroup>' tag, then the default name
0745 is taken from 'PROCGROUP_NAME_DEF' value. Name is mandatory for the
0746 process group being defined in the configuration file. Name must be
0747 unique for the process group.
0748
0749 'PROCGROUP_GRPNO'::
0750 Process group number. This is used for the process group identification.
0751 Value must be unique for the process group. If the value is not specified,
0752 then the value is taken from 'PROCGROUP_GRPNO_DEF' value. The value must
0753 be in range of 1.. <value of env NDRX_SGREFRESH, which default is 64>.
0754
0755 'PROCGROUP_NOORDER'::
0756 Do not use the standard process startup order for starting the process group.
0757 If flag is set to 'y' or "Y", when at failover group is activated, no
0758 order of the booting is used, all processes in the group are started concurrently
0759 without any specific order. Value 'n' or 'N' disables this flag. Default is 'n'.
0760 Flag is effective only for singleton groups (i.e. 'PROCGROUP_SINGLETON' set to 'y'/'Y').
0761 If value is not specified, then the value is taken from 'PROCGROUP_NOORDER_DEF' value.
0762
0763 'PROCGROUP_SINGLETON'::
0764 Defines given process group as singleton group. Meaning, that if the parameter
0765 is set to 'y' or 'Y', then only one set of processes (defined in the '<procgrp>')
0766 ar started with thin the Enduro/X cluster. For every singleton group there must
0767 be one XATMI server defined which is lock provider. Lock provider for the group
0768 is tagged by setting group name in '<progrp_lp>' tag for server. Enduro/X ships
0769 with the lock provider process *exsinglesv(8)*. The default value for 'PROCGROUP_SINGLETON'
0770 is 'n' (or 'N'), meaning that the process group is not singleton, and will be booted
0771 normally on the local node.
0772 If value is not specified, then the value is taken from 'PROCGROUP_SINGLETON_DEF' value.
0773
0774 'PROCGROUP_SINGLETON_NODES'::
0775 Defines list of Enduro/X Node IDs which are part of the singleton group (i.e. nodes
0776 which provides failover). List is encoded in Enduro/X standard configuration string format
0777 (e.g. comma separated values). Current Enduro/X Node ID is added automatically to
0778 this list. Nodes are used for lock checks, to perform extra verification
0779 on other node statuses. It is recommended to correctly fill this list of
0780 participant nodes, so that lock providers promptly can detect any animalities within the
0781 Enduro/X cluster.
0782 If value is not specified, then the value is taken from 'PROCGROUP_SINGLETON_NODES_DEF' value.
0783
0784 'PROCGROUP_SINGLETON_NODES_VERIFY'::
0785 If set to 'y'/'Y', enables checks for cluster consistency at critical
0786 points of the distributed transaction processing. Might impact performance
0787 for the distributed transactions. When enabled, full lock status is checked against
0788 *@SGLOC* and *@SGREM* XATMI services
0789 (provided by *exsingleckl(8)* and *exsingleckr(8)* respectivly), if available
0790 over the *tpbridge(8)*. If network is not available,
0791 checks are done against ping lock file, to detect that current node still holds
0792 the valid lock (and no other nodes in cluster indicate that they hold the lock).
0793 Setting applies to transaction managers configured in the given singleton process
0794 group. Default setting is 'N' (or 'n'), which means that only local checks (against
0795 shared memory lock status provided by *exsinglesv(8)* is performed).
0796 For underlaying infrastructure shared file system clusters which does not
0797 use STONITH device for fcntl() lock release/failover, this is
0798 mandatory to be set to 'Y' with correctly filled 'sg_nodes' attribute.
0799 Otherwise transaction consistency might be affected.
0800 If value is not specified, then the value is taken from
0801 'PROCGROUP_SINGLETON_NODES_VERIFY_DEF' value.
0802
0803 VARIABLE SUBSTITUTION
0804 ---------------------
0805 Several parameters in the ndrxconfig.xml file are processed via substitution
0806 engine. Engine processes puts the environment variables or special functions
0807 in the place-holders. Placeholder is defined as ${'ENV_VARIABLE'} for environment
0808 variables and ${'FUNC'=['PARAMETER']} for functions. The value can be escaped with
0809 \${'some_value'}.
0810
0811 Functions are processed in case if statement in brackets contains equal sign '='.
0812 As the sign is not allowed for environment variables, Enduro/X uses it to
0813 distinguish between env variable and function.
0814
0815 Following *FUNC* (functions) are defined:
0816
0817 *dec*
0818 Decrypt base64 string in *PARAMETER* and replace the placeholder with the
0819 value. To get encrypted value, it is possible to use *exencrypt(8)* tool.
0820
0821 DATA DEPENDENT ROUTING
0822 ----------------------
0823 Enduro/X supports data dependent routing. There are three components which are
0824 required for routing:
0825
0826 1. Server process shall be put in the group. This can be be assigning group
0827 code to the *NDRX_RTGRP* environment variable for particular server process.
0828 This variable might be set in CCTAG group for server process. Or it might
0829 be assigned for particular process by *<envs>*. Here not that any server process
0830 which advertises services, will additionally advertise each service with
0831 suffix "@<NDRX_RTGRP>". Thus *NDRX_RTGRP* shall use short values like 2-3 symbols
0832 long, as total service name length is limited to *30*, and if routing group
0833 name is longer, server processes would not be able to advertise. Also note that
0834 if this environment is present for server process, then any advertise mechanism,
0835 either alias or compiled service name by *buildserver(8)* or *tpadvertise(3)* call
0836 will make two services to appear in the system - one is default without the
0837 suffix and other is with route group suffix. Only exception when working with
0838 route groups is that *xadmin unadv* and *xadmin readsv* would operate with single
0839 service name.
0840
0841 2. Routing criterion i.e. 'SVC_ROUTE_NAME' must be defined for service in
0842 *<service />* tag.
0843
0844 3. Routing criterion must be defined in *<route/>* tag.
0845
0846 When all above is defined, the routing will be activated, when client (or servers
0847 code) would issue:
0848
0849 - *tpacall(3)*
0850
0851 - *tpcall(3)*
0852
0853 - *tpconnect(3)*
0854
0855 - *tpforward(3)*
0856
0857 Also affects any other Enduro/X APIs which internally uses tpcall/tpacall. Such
0858 as *tpenqueue(3)*, *tpdequeue(3)*, *tpbegin(3)*, etc. but it is not recommended
0859 to configure routing for Enduro/X system servers or services (or at least with
0860 out advice from Mavimax).
0861
0862 Routing criterions by it self operate with three data types: *LONG*, *DOUBLE*
0863 and *STRING*.
0864
0865 Syntax for 'ROUTE_RANGES' is following: <min_value_1>-<max_value_1>:<group_code_1>,...,
0866 <min_value_N>-<max_value_N>:<group_code_N>. Additional syntax is supported, such as:
0867
0868 - Keyword MIN - this represent any absolute minimum value, thus if value is bellow <max_value>,
0869 then value is in the range.
0870
0871 - Keyword MAX - this represent any absolute maximum value, thus if value is above the
0872 <min_value> then value is in the range.
0873
0874 - Single value is supported.
0875
0876 - Keyword * (asterisk) - this presents the any value and represents whole range. This
0877 keyword can also be used as group, which means - use default group (i.e. it is any
0878 service, service name without "@<GRP>" suffix).
0879
0880 - Values and group names can be put in single string quotes ('). If such single quote
0881 is needed within the string, it can be escaped with backslash \. Double backslash \\
0882 is translated to single backslash.
0883
0884 - Ranges supports max_value as negative, in such case syntax as "-100 - -45:GRPN" is supported.
0885
0886 Ranges value are validated and processed as indicated by field typ.
0887 *LONG* is limited to:
0888
0889 --------------------------------------------------------------------------------
0890
0891 ^[+-]?([0-9])+$
0892
0893 --------------------------------------------------------------------------------
0894
0895 *DOUBLE* type value shall be expressed as:
0896
0897 --------------------------------------------------------------------------------
0898
0899 ^[-+]?(([0-9]*[.]?[0-9]+([ed][-+]?[0-9]+)?))$
0900
0901 --------------------------------------------------------------------------------
0902
0903 For *DOUBLE* decimal separator is *.*. Also to check that equality is
0904 checked with precision of 0.000001.
0905
0906 *STRING* values may contain any printable character including newline.
0907
0908 When processes is perform routing, first matched range is used to extract the group code.
0909 If range is not found or buffer type does not match with service for which routing
0910 is defined *TPESYSTEM* error is returned to caller. Range matching is performed
0911 form left to right order. Range include the range min/max values. When range is
0912 defined for *STRING* type, values are compared by *strcmp()* function.
0913
0914
0915 *Examples of valid routing configuration:*
0916
0917 --------------------------------------------------------------------------------
0918
0919 <?xml version="1.0" ?>
0920 <endurox>
0921 ...
0922
0923 <services>
0924 <defaults routing="RT1"/>
0925 <service svcnm="DEBITSVC" />
0926 <service svcnm="CREDIT" routing="RT2" />
0927 <defaults routing="RT3" />
0928 <service svcnm="TXHANDLER" />
0929 </services>
0930 <routing>
0931
0932 <route routing="RT1">
0933 <field>T_LONG_FLD</field>
0934 <ranges>MIN-4:GRP1,100-200:GRP4,300:GRP6,1000-22100:GRP5,*:*</ranges>
0935 <buftype>UBF</buftype>
0936 </route>
0937
0938 <route routing="RT2">
0939 <field>T_STRING_FLD</field>
0940 <ranges>
0941 MIN-'AAA':GRP1
0942 ,'AAB' - AAC:'GRP4'
0943 ,'HELLO\'' - HELLO5:*
0944 ,'Z' - MAX:GRP6
0945 </ranges>
0946 <buftype>UBF</buftype>
0947 </route>
0948
0949 <!-- cast value from string to double -->
0950 <route routing="RT3">
0951 <field>T_STRING_FLD</field>
0952 <ranges>
0953 MIN - -1.1:GRP1
0954 ,-1 - 44:'GRP4'
0955 ,'44.1' - 123.15:*
0956 ,*:*
0957 </ranges>
0958 <buftype>UBF</buftype>
0959 <fieldtype>DOUBLE</fieldtype>
0960 </route>
0961 <routing>
0962 ...
0963 </endurox>
0964
0965
0966 Note that *DDR* settings can be changed on they fly with *xadmin reload*, but
0967 changes are deferred to certain amount of time. See 'DDRRELOAD'.
0968
0969 --------------------------------------------------------------------------------
0970
0971 COMMAND LINE ARGUMENT ESCAPE
0972 ----------------------------
0973 Process command line arguments normally may contain spaces or tables in their values.
0974 As Enduro/X processes need to prepare arguments for exec, at the prepare phase clear
0975 distinguishing must be made between multiple arguments and argument values.
0976 Thus Enduro/X employs a parser to split CLI strings into arguments. Blocks with
0977 spaces or tabs inside must be quoted. The logic is similar to the way how shall perform
0978 quote processing.
0979
0980 The following rules apply:
0981
0982 . Blocks can be quoted either with a single quote or a double quote.
0983 . Quote symbols are stripped from the start and the end of the value.
0984 . To have a quote symbol in block value, use backslash.
0985 . To have a backslash in any part of CLI string, use double backslash.
0986 . If a block is started with single quotes, and the value contains backlash and double quotes
0987 then backlash and double quotes are put in value. This works in vice versa if starting
0988 value with double quotes and escaping single quotes.
0989 . If a quoted string contains non-tab or space-separated values before or after
0990 the quotes, then values are joined to block value. Leading and trailing quotes
0991 are stripped.
0992 . Alone escape values between tab or space separators are eliminated from value.
0993 . Unterminated quotes produce a single value till the end of the string.
0994
0995 Samples:
0996 --------------------------------------------------------------------------------
0997 Example 1:
0998 CLI Value: someproc 'HELLO\' WORLD' X"some value \'"X
0999
1000 Process would receive arguments:
1001 1. someproc
1002 2. HELLO' WORLD
1003 3. Xsome value \'X
1004
1005 Example 1:
1006 CLI Value: someproc HELLO \ 'SOMETHING
1007
1008 Process would receive arguments:
1009 1. someproc
1010 2. HELLO
1011 3.
1012 4. SOMETHING
1013 --------------------------------------------------------------------------------
1014
1015 Above applies to 'CLT_COMMAND_LINE', 'ATMI_SERVER_SYSTEM_OPTIONS' and
1016 'ATMI_SERVER_APPLICATION_OPTIONS'.
1017
1018
1019 XML INCLUDE
1020 -----------
1021 ndrxconfig.xml supports entity substitution, thus effectively, portions of XMLs
1022 may be included from other files.
1023
1024 For example having *ndrxconfig.xml*:
1025
1026 --------------------------------------------------------------------------------
1027 <?xml version="1.0" ?>
1028 <!DOCTYPE doc [
1029 <!ENTITY defaults SYSTEM "ndrxconfig.xml.defaults">
1030 ]>
1031 <endurox>
1032 <appconfig>
1033 <sanity>10</sanity>
1034 <brrefresh>6</brrefresh>
1035 <restart_min>1</restart_min>
1036 <restart_step>1</restart_step>
1037 <restart_max>5</restart_max>
1038 <restart_to_check>20</restart_to_check>
1039 </appconfig>
1040
1041 &defaults;
1042
1043 <servers>
1044 </servers>
1045 </endurox>
1046 --------------------------------------------------------------------------------
1047
1048 and
1049
1050 *ndrxconfig.xml.defaults*:
1051
1052 --------------------------------------------------------------------------------
1053 <defaults>
1054 <min>1</min>
1055 <max>2</max>
1056 </defaults>
1057 --------------------------------------------------------------------------------
1058
1059 would make final config for *ndrxd(8)* and *cpmsrv(8)* look like:
1060
1061 --------------------------------------------------------------------------------
1062 <?xml version="1.0" ?>
1063 <endurox>
1064 <appconfig>
1065 <sanity>10</sanity>
1066 <brrefresh>6</brrefresh>
1067 <restart_min>1</restart_min>
1068 <restart_step>1</restart_step>
1069 <restart_max>5</restart_max>
1070 <restart_to_check>20</restart_to_check>
1071 </appconfig>
1072
1073 <defaults>
1074 <min>1</min>
1075 <max>2</max>
1076 </defaults>
1077
1078 <servers>
1079 </servers>
1080 </endurox>
1081 --------------------------------------------------------------------------------
1082
1083
1084 EXAMPLE
1085 -------
1086
1087 Sample configuration:
1088 ---------------------------------------------------------------------
1089 <?xml version="1.0" ?>
1090 <endurox>
1091 <appconfig>
1092 <sanity>10</sanity>
1093 <brrefresh>6</brrefresh>
1094 <restart_min>1</restart_min>
1095 <restart_step>1</restart_step>
1096 <restart_max>5</restart_max>
1097 <restart_to_check>20</restart_to_check>
1098 </appconfig>
1099 <defaults>
1100 <min>1</min>
1101 <max>2</max>
1102 <autokill>1</autokill>
1103 <start_max>2</start_max>
1104 <pingtime>1</pingtime>
1105 <ping_max>4</ping_max>
1106 <end_max>3</end_max>
1107 <killtime>1</killtime>
1108 <envs group="JAVAENV">
1109 <env name="_JAVA_OPTIONS">-Xmx1g</env>
1110 </envs>
1111 </defaults>
1112 <servers>
1113 <server name="tpevsrv">
1114 <srvid>14</srvid>
1115 <min>1</min>
1116 <max>1</max>
1117 <cctag>RM1</cctag>
1118 <env>${NDRX_HOME}/tpevsrv_env</env>
1119 <sysopt>-e /tmp/TPEVSRV -r</sysopt>
1120 </server>
1121 <server name="tpbridge">
1122 <max>1</max>
1123 <srvid>100</srvid>
1124 <sysopt>-e /tmp/BRIDGE -r</sysopt>
1125 <appopt>-n2 -r -i 0.0.0.0 -p 4433 -tA</appopt>
1126 </server>
1127 <server name="jserver2">
1128 <max>1</max>
1129 <srvid>200</srvid>
1130 <sysopt>-e /tmp/BRIDGE -r</sysopt>
1131 <envs>
1132 <usegroup>JAVAENV</usegroup>
1133 <env name="NDRX_RTGRP">GRP4</env>
1134 <env name="CLASSPATH">${CLASSPATH}:${NDRX_APPHOME}/libs/${NDRX_SVPROCNAME}.jar</env>
1135 <env name="CLASSPATH">${NDRX_APPHOME}/libs/somelib.jar</env>
1136 </envs>
1137 <cmdline>java</cmdline>
1138 </server>
1139 <server name="cpmsrv">
1140 <cctag>RM2</cctag>
1141 <srvid>9999</srvid>
1142 <sysopt>-e /tmp/cpmsrv.log -r -- -k3 -i1</sysopt>
1143 </server>
1144 </servers>
1145 <clients>
1146 <client cmdline="testbinary -t ${NDRX_CLTTAG} -s ${NDRX_CLTSUBSECT}" autostart="Y" cctag="RM4">
1147 <exec tag="TAG1" subsect="SUBSECTION1" log="${APP_LOG}/testbin1-1.log" cctag="RM5"/>
1148 <exec tag="TAG2" subsect="SUBSECTION2" log="${APP_LOG}/testbin1-2.log"/>
1149 </client>
1150 <client cmdline="testenv.sh" env="environment.override1" log="env1.log">
1151 <exec tag="TESTENV" autostart="Y"/>
1152 </client>
1153 </clients>
1154 <services>
1155 <defaults trantime="600" />
1156 <service svcnm="SERVICE1" prio="50" routing="RT1" autotran="Y" />
1157 <defaults autotran="Y" />
1158 <service svcnm="SERVICE2" prio="50" routing="RT2" trantime="600" />
1159 </services>
1160 <routing>
1161 <route routing="RT1">
1162 <field>T_LONG_FLD</field>
1163 <ranges>MIN-4:GRP1,100-300:GRP4,1000-22100:GRP5,*:*</ranges>
1164 <buftype>UBF</buftype>
1165 </route>
1166
1167 <route routing="RT2">
1168 <field>T_STRING_FLD</field>
1169 <ranges>MIN-AAA:GRP1,'AAB'-'AAD':'GRP4',*:*</ranges>
1170 <buftype>UBF</buftype>
1171 </route>
1172
1173 </routing>
1174 </endurox>
1175 ---------------------------------------------------------------------
1176
1177 BUGS
1178 ----
1179 Report bugs to support@mavimax.com
1180
1181 SEE ALSO
1182 --------
1183 *xadmin(8)*, *ndrxd(8)*, *ndrxconfig.xml(5)*, *ndrxdebug.conf(5)*, *ex_envover(5)*,
1184 *exencrypt(8)* *exsinglesv(8)*
1185
1186 COPYING
1187 -------
1188 (C) Mavimax, Ltd
1189