Sie sind auf Seite 1von 37

2006 BEA Systems, Inc.

109
Additional Tuxedo Application
Configuration Options
At the end of this module, you will be able to:
Configure additional parameters for environment files and
user log options
Configure additional server options for performance and
failover
Provide for enhanced load balancing for Tuxedo services
Override default service parameters
Module 5
Additional Tuxedo Application Configuration Options-1
2006 BEA Systems, Inc. 110
Road Map
1. Additional MACHINES Section Parameters
ULOGPFX
Analyzing the Application User Log
ENVFILE
Using Environment Variable Files
2. Additional SERVERS Section Parameters
3. Using SERVICES Section Parameters
Additional Tuxedo Application Configuration Options-2
2006 BEA Systems, Inc. 111
User Log File Name and Location
By default, Tuxedo User Logs are:
Written daily to a file called ULOG.mmddyy where
mm=month, dd=day, yy=year.
Created in the APPDIR.
To change the name and location of the ULOG, add
ULOGPFX to the MACHINES section:
10
0101
1110
Example UBBCONFIG text file:
*MACHINES
STUDENT14
LMID=SITE1
APPDIR=/opt/apps
TUXCONFIG=/opt/apps/tuxconfig
TUXDIR=/opt/bea/tuxedo9.0
ULOGPFX=/opt/apps/logs/XYZ
This will name the user
log file XYZ.mmddyy
Additional Tuxedo Application Configuration Options-3
2006 BEA Systems, Inc. 112
Log File Creation
Log files are automatically created (or appended)
when:
A configuration file is loaded with tmloadcf
A Tuxedo application is booted
Certain Tuxedo system events occur
Application developers can also write to the ULOG by
invoking the userlog() method:
This cannot be disabled by the administrator.
Additional Tuxedo Application Configuration Options-4
2006 BEA Systems, Inc. 113
Additional ULOG Options
Tuxedo 9.0 has two additional ULOG options as
environment variables.
ULOGMILLISEC:
An on/off switch that causes messages sent to ULOG to be
stamped in millisecond time intervals instead of the default
seconds.
EXAMPLE: set ULOGMILLISEC=Y
ULOGRTNSIZE:
Specifies the ULOG rotation file size (in bytes).
EXAMPLE: set ULOGRTNSIZE=2000000
Saves rotated files using sequential appended numbers:
ULOG.122505.1 ULOG.122505.2 ULOG.122505.10
File size limited to 2Mb
Version 9.0 + only
Additional Tuxedo Application Configuration Options-5
2006 BEA Systems, Inc. 114
Format of Messages in ULOG
Messages in ULOG have two parts:
1. The tag that identifies the calling process formatted as:
time.machine!.processName.processID.threadID.contextID:
2. The text message that will include a catalog name and
number for Tuxedo system messages.
Additional Tuxedo Application Configuration Options-6
2006 BEA Systems, Inc. 115
Analyzing the ULOG
The Tuxedo application administrator usually performs
the analysis of ULOG:
Findings may be provided to developers for resolution when
appropriate.
One problem may generate several messages.
Messages appearing when a problem first occurs usually
reflect the real origin of the problem.
Consult the online documentation by catalog number
for more information.
Navigate from the main product documentation page:
Messages > <catalog name> > <catalog #>

Additional Tuxedo Application Configuration Options-7
2006 BEA Systems, Inc. 116
Setting Environment Variables
By default, all server process started by the BBL will
only inherit the environment of the tmboot process.
Tuxedo application administrators must either:
1. Ensure that all environment variables have been previously
set in the command or shell prompt prior to tmboot
2. Format a text file to list the environment variables and set
the ENVFILE parameter in the MACHINES section.
10
0101
1110
Example UBBCONFIG text file:
*MACHINES
STUDENT14
LMID=SITE1
APPDIR=/opt/apps
TUXCONFIG=/opt/apps/tuxconfig
TUXDIR=/opt/bea/tuxedo9.0
ENVFILE=/opt/apps/TuxApp.env
All client and
server processes
on this machine
will inherit these
ENV VARS.
Additional Tuxedo Application Configuration Options-8
2006 BEA Systems, Inc. 117
Editing the ENVFILE
The ENVFILE must be in a simple text format, each
line containing: <variableName>=<value>
Commented lines begin with #
It can define Tuxedo system variables, as well as any
variables required by your application.


10
0101
1110
Example ENVFILE format:
# Environment Settings for adminTng Domain
ULOGMILLISEC=Y
ULOGRTNSIZE=50000
TMNOTHREADS=Y

# Application-specific Variables
CURRENT_TAX_RATE=6.5
MAX_CURSOR_SIZE=1000

Additional Tuxedo Application Configuration Options-9
2006 BEA Systems, Inc. 118
Accessing the ENVFILE
The ENVFILE parameter can also be used in the
GROUPS and SERVERS sections.
This allows for a hierarchical setting of server environment
values from the general to the specific.
A server process will access the ENVFILEs (if present) in
this sequence:
MACHINES
GROUPS
SERVERS
10
0101
1110
*MACHINES
STUDENT14 LMID=SITE1
ENVFILE=/opt/apps/TuxApp.env
. . .
*GROUPS
GROUP1 GRPNO=1 LMID=SITE1
ENVFILE=/opt/apps/Grp1.env
. . .
*SERVERS
FooSrv SRVID=10 SRVGRP=GROUP1
ENVFILE=/opt/apps/FooSrv.env
The newest value will
be inherited if there
are any overlaps.
Additional Tuxedo Application Configuration Options-10
2006 BEA Systems, Inc. 119
Section Review
Configure ULOG options
Analyze ULOG messages
Use ENVFILE to set system and application
environment variables
In this section, we learned how to:
Additional Tuxedo Application Configuration Options-11
2006 BEA Systems, Inc. 120
Road Map
1. Additional MACHINES Section Parameters
2. Additional SERVERS Section Parameters
Configuring Multiple Server Instances
Automatic Server Restart Options
Command-Line Options and Tuxedo Server Options
Configuring Multithreaded Servers
3. Using SERVICES Section Parameters
Additional Tuxedo Application Configuration Options-12
2006 BEA Systems, Inc. 121
SERVERS Section Parameters
Some additional SERVERS section parameters include:
Specifies stack size for each dispatch thread THREADSTACKSIZE
Override default booting order SEQUENCE
Overrides parameter setting from MACHINES or RESOURCES SYSTEM_ACCESS
The time period within which server can be restarted GRACE
The number of restarts within the GRACE secs. MAXGEN
The executable to be executed in parallel with restarting server RCMD
Whether to restart server after crash RESTART
A string name used for this servers request queue RQADDR


Required
The group this server is associated with SRVGRP
A unique integer ID SRVID
The server-specific environment file ENVFILE
The number of servers to boot MIN,MAX
The command line option to be used when booting CLOPT
Description Parameter
MINDISPATCHTHREADS
MAXDISPATCHTHREADS
The thread pool size for the server process
Additional Tuxedo Application Configuration Options-13
2006 BEA Systems, Inc. 122
Configure Multiple Server Instances
MIN - set to the minimum number of instances
(processes) of this server that will be started when the
application is booted. Default=1
If set to 0, no servers will be booted during tmboot -y
MAX - set to the maximum number of instances
(processes) of this server that can be started later
10
0101
1110
Example UBBCONFIG text file:
*SERVERS
InqServer
SRVID=10 SRVGRP=GROUP1
MIN=5 MAX=10
UpdateServer
SRVID=20 SRVGRP=GROUP1
MIN=3 MAX=3
These instances will
use SRVIDs of 10-19
Version 9.0 +only
Additional Tuxedo Application Configuration Options-14
2006 BEA Systems, Inc. 123
Process Failures
A server process may fail as a result of application
bugs or configured operating system resource (IPC)
limits that are exceeded while the application is
running.
The BBL either reports a failure only, or reports a
failure and restarts the failed server process
automatically.
The automatic restart function can be configured for a
server using: RESTART, MAXGEN, and GRACE
parameters in the SERVERS section of UBBCONFIG.
Additional Tuxedo Application Configuration Options-15
2006 BEA Systems, Inc. 124
Configure Servers to Be Restartable
RESTART specifies whether this Server is restartable:
Default: N
MAXGEN specifies the number of starts during any MAXGEN
period of time
Default: 1 (Valid values are 1-255)
GRACE indicates the number of seconds used by MAXGEN
Default: 86,400 seconds (24 hrs)
If set to 0, unlimited restarts are allowed.
RCMD specifies the command that should be executed when the
BBL attempts a restart.

10
0101
1110
Example UBBCONFIG text file:
*SERVERS
InqServer
SRVID=10 SRVGRP=GROUP1
MIN=5 MAX=10
RESTART=Y MAXGEN=3 GRACE=600
RCMD=/opt/apps/alert.sh
BBL will restart up to
three times every five
minutes
At restart, BBL will
execute this script
Additional Tuxedo Application Configuration Options-16
2006 BEA Systems, Inc. 125
Determining Server Boot Order
By default, tmboot y will start each server in the
order it is listed in the SERVERS section.
Specify the SEQUENCE parameter in the SERVERS
section for servers that must boot in a specific order:
Servers are booted from low to high sequence numbers,
followed by all servers without a sequence number.
Sequence numbers must be between 1 9999.
10
0101
1110
Example UBBCONFIG text file:
*SERVERS
DEFAULT: SRVGRP=GROUP1
InqServer SRVID=10
UpdateServer SRVID=20 SEQUENCE=100
DeleteServer SRVID=30 SEQUENCE=150
Boot Order:
UpdateServer
DeleteServer
InqServer
Additional Tuxedo Application Configuration Options-17
2006 BEA Systems, Inc. 126
Command Line Options Parameter
CLOPT is made up of two parts:
<left> flags are parsed by the ATMI main() of the
Tuxedo server
<right> values are passed on to the tpsvrinit()
method
For details on <left-side> CLOPT options, navigate
from the main product documentation page:
Reference > Section 5 > servopts


Syntax of CLOPT Parameter:
CLOPT="<left> -- <right>"
Example Use of CLOPT Parameter:
*SERVERS
MyPhoneBookApp
SRVID=10 SRVGRP=GROUP1
CLOPT=-A o myStdOut.txt e myStdErr.txt -- fn Marco"
Additional Tuxedo Application Configuration Options-18
2006 BEA Systems, Inc. 127
Some CLOPT Server Option Flags
If the CLOPT parameter is not defined, it defaults to:
CLOPT=-A
The following table includes the more commonly used
server options:
-t Allows for 7.1+ servers to interoperate with clients running a previous version
-p Used with MSSQ sets for automatic decay and spawning of servers
-A Advertises all services defined by buildserver -s
-s Overrides buildserver s and advertises these services instead
-r Specifies that the server will output a log of services performed to stderr
-o Specifies the name of the file to be used for servers standard error output
-e Specifies the name of the file to be used for servers standard error output
Description Flag
Additional Tuxedo Application Configuration Options-19
2006 BEA Systems, Inc. 128
Service Aliasing
By default, CLOPT=-A advertises all services exactly as
indicated by the buildserver -s parameter value.


Setting the CLOPT s flag overrides the default and allows for
any new buildserver s type of specification.



To determine how a Tuxedo Server was built:
Run the executable from the command line with the v flag.
C:\> simpserv -v
Example:
buildserver -f simpserv.c -o simpserv -s TOUPPER,UPRCASE:TOUPPER
Example Use of CLOPT s Flag:
*SERVERS
simpserv
SRVID=10 SRVGRP=GROUP1 CLOPT=-s UPRCASE:TOUPPER
Additional Tuxedo Application Configuration Options-20
2006 BEA Systems, Inc. 129
Tuxedo application servers can be deployed with a
system-managed thread pool:
Allows for concurrent client requests
Threads can be serially reused for multiple requests

Multithreaded Servers
Tuxedo Server Process
OS message queues
Server Thread Pool
Dispatcher Thread
Bulletin
Board
(BB)
Tuxedo Machine
Versions 7.1+only
Additional Tuxedo Application Configuration Options-21
2006 BEA Systems, Inc. 130
Thread Pool Configuration
Configure these 2 parameters in the SERVERS section:
MINDISPATCHTHREADS sets the initial pool size
MAXDISPATCHTHREADS allows for dynamic growth based
on concurrent access demand




Multithreaded Server applications must be created
using the buildserver t option:
Example use of buildserver.exe:

\> buildserver -o myMTserver -f myServiceCode.c -t
*SERVERS
. . .
myMTserver SRVGRP=GROUP1 SRVID=10 RESTART=Y

. . .
ubb.tux
MINDISPATCHTHREADS=5 MAXDISPATCHTHREADS=20
Versions 7.1+only
Additional Tuxedo Application Configuration Options-22
2006 BEA Systems, Inc. 131
Section Review
Configure multiple instances of a server
Allow for automatic restarting of servers
Use and edit the CLOPT parameter
Configure multithreaded servers

In this section, we learned how to:
Additional Tuxedo Application Configuration Options-23
2006 BEA Systems, Inc. 132
Road Map
1. Additional MACHINES Section Parameters
2. Additional SERVERS Section Parameters
3. Using SERVICES Section Parameters
Optimizing Service Load Balancing
Setting Service Priorities and Block Times
Enforcing Buffer Type Checking
Setting Service Timeouts
Additional Tuxedo Application Configuration Options-24
2006 BEA Systems, Inc. 133
SERVICES Section Parameters
SERVICES is an optional section, however:
If not defined, tmloadcf generates a warning.
Specifies the default XA transaction timeout when AUTOTRAN=Y TRANTIME
Allows for an XA transaction to be automatically started AUTOTRAN
Allows for hung servers to be SIGKILL and restarted by BBL SVCTIMEOUT
Overrides the domain-wide BLOCKTIME indicated in RESOURCES BLOCKTIME
Specifies the name of the routing criteria to used for DDR ROUTING
Specifies the relative load factor related to other services LOAD
Specifies the dequeuing priority of the service PRIO
Specifies automatic XMLFML or FMLXML buffer conversions BUFTYPECONV
Enforces buffer type checking by the calling client library BUFTYPE
Applies all other parameter entries to just the server group SRVGRP
Description Parameter
Additional Tuxedo Application Configuration Options-25
2006 BEA Systems, Inc. 134
SERVICES LOAD Parameter
The Load Balancing feature distributes service requests
to the server that had the smallest load.
Set in RESOURCES: LDBAL Y (the default setting)
When load balancing is enabled:
Tuxedo keeps count of the total load for each server request
queue (one queue per server process) and for service requests
sent to servers on other machines.
The LOAD parameter sets a load factor for a service.
The LOAD factor for a service is relative to values for other
services advertised within the same server.
Additional Tuxedo Application Configuration Options-26
2006 BEA Systems, Inc. 135
Load Balancing Example
Load factor is updated in the BB indicating to the
servers total load on its IPC message queue.
Before A service call After A service call

Client:
tpcall (A)
A:Load=50
B:Load=60
C:Load=70
Server 1
A, B, C,
Load 1420
Server 2
A, B, C,
Load 1450
Server 3
A, B, C,
Load 1430
Server 1
A, B, C,
Load 1470
Server 2
A, B, C,
Load 1450
Server 3
A, B, C,
Load 1430
Additional Tuxedo Application Configuration Options-27
2006 BEA Systems, Inc. 136
Load Balancing Configuration
Generally, services taking longer times should be
configured with (relatively) higher loads.
Services taking shorter times should be configured with
(relatively) lower loads.
Default: 50
Range: 1 32,767
*SERVICES
SVC_A
LOAD=1000
SVC_B
LOAD=100
SVC_C
LOAD=25
ubb.tux
Additional Tuxedo Application Configuration Options-28
2006 BEA Systems, Inc. 137
SERVICES PRIO Parameter
Higher priority requests are dequeued first but every
tenth request is dequeued FIFO.
Prioritization is appropriate only for low frequency,
high value interfaces
Example: Processing platinum credit card authorizations vs
gold or standard cards (< 10% of all authorization requests)
The PRIO parameter determines the dequeue priority.
Default: 50
Range: 1-100
*SERVICES
SVC_A
PRIO=100
SVC_B
PRIO=80
SVC_C
PRIO=40
ubb.tux
Additional Tuxedo Application Configuration Options-29
2006 BEA Systems, Inc. 138
SERVICES BUFTYPE Parameter
By default, Tuxedo does not enforce buffer type
checking when sending requests to servers.
For faster performance, leave as default.
May be needed when the quality of client apps are
unknown.
When set, the BUFTYPE parameter enforces Tuxedo buffer
type checking in the client prior to sending the request to the
server.
Default: ALL
*SERVICES
SVC_A
BUFTYPE=FML;FML32;CARRAY
SVC_B
BUFTYPE=XML;VIEW:Customer
SVC_C
BUFTYPE=VIEW:*
ubb.tux
Additional Tuxedo Application Configuration Options-30
2006 BEA Systems, Inc. 139
SERVICES BLOCKTIME Parameter
By default, the service clients ATMI library will block
for 60s (unless changed in the RESOURCES section).
In some cases, client block time should depend on the
service being called.
If the BLOCKTIME parameter is to any non-zero
number, this value will override the BLOCKTIME
established in the RESOURCES section.
Default: 0
Range: 0 32,727
*SERVICES
SVC_A
BLOCKTIME=30
SVC_B
BLOCKTIME=3000
SVC_C
BLOCKTIME=0
ubb.tux
Version 9.0 +only
Additional Tuxedo Application Configuration Options-31
2006 BEA Systems, Inc. 140
SERVICES SVCTIMEOUT Parameter
By default, once a service call has entered its handler
function, processing can last forever.
Default: 0 (Service will not be timed-out.)
When RESTART=Y is enabled for the services server:
The SVCTIMEOUT parameter will be used to determine if the
Server process is hung.
The BBL will terminate the server with a SIGKILL signal
then attempt to restart the server.
*SERVICES
SVC_A
SVCTIMEOUT=300
SVC_B
SVCTIMEOUT=0
SVC_C
SVCTIMEOUT=60
ubb.tux
Additional Tuxedo Application Configuration Options-32
2006 BEA Systems, Inc. 141
Setting SERVICES Parameters By Group
You can specify different service parameters for
different server groups.
This is done by repeating the service entry with
different values for SRVGRP.
Setting Different Service Parameters for Different Groups:
*SERVICES
TOUPPER
LOAD=50
PRIO=50
SRVGRP=
TOUPPER
LOAD=25
PRIO=75
SRVGRP= APPGRP2
Different parameters
for different groups
APPGRP1
Additional Tuxedo Application Configuration Options-33
2006 BEA Systems, Inc. 142
SERVICES Example Configuration
An example of the SERVICES section:
*SERVICES
DEFAULT: SVCTIMEOUT=60
SVC_A
LOAD=30
PRIO=70
SVCTIMEOUT=300
BLOCKTIME=240
BUFTYPE=VIEW32:account
SVC_B
LOAD=40
SVC_C
BLOCKTIME=45

ubb.tux
Additional Tuxedo Application Configuration Options-34
2006 BEA Systems, Inc. 143
Section Review
Improve the load balancing capabilities of Tuxedo
Configure service-level priorities and block times
Enforce buffer type checking
Configure for automatic restart of frozen servers
In this section, we learned how to:
Additional Tuxedo Application Configuration Options-35
2006 BEA Systems, Inc. 144
Lab Exercise
For details on the exercise, refer to the Lab Guide.
If questions arise, ask the instructor.
The instructor will determine the stop time.
Lab 05 ACFO: Configure and Test
Additional Tuxedo Application Options
Additional Tuxedo Application Configuration Options-36
2006 BEA Systems, Inc. 145
Module Review
Configure ULOG file options
Set environment variables for application servers
Set additional SERVERS section parameters
Override default SERVICES section parameters
In this module, we learned how to:
Additional Tuxedo Application Configuration Options-37

Das könnte Ihnen auch gefallen