转自:http://blog.csdn.net/Ant_Yan/archive/2010/02/16/5309340.aspx
作者:Ant_Yan
Tuxedo Administrative Runtime
The port on which the process is listening must be the same as the port specified for NLSADDR in the NETWORK section of the configuration file, use the tlisten command as follows:
tliten [-d device] –l nlsaddr [-u {uid-# | uid-name}] [-z bits] [-Z bits]
For Tuxedo release 6.4 or later, -d device option is not required.
If nlsaddr is missing from the MASTER LMID entry, tmadmin cannot be run in administrator mode on remote machines.
For manually propagate, you must define TUXDIR, TUXCONFIG, APPDIR, and other relevant environment variables before starting tlisten.
To create distributed transaction processing, you must created a global transaction log (TLOG) on each participating machine.
Set several parameters in MACHINES section: TLOGDEVICE, TLOGOFFSET, TLOGNAME
Create a universal device list entry (UDL) for the TLOGDEVICE on each participating machine.
Enter the command: crdl –z config –b blocks, -z config specifies the full pathname for the device on which the UDL should be created (that is, where the TLOG will reside) and –b blocks specifies the number of blocks to be allocated on the device.
When booting application servers, tmboot uses the CLOPT, SEQUENCE, SRVGRP, SRVID and MIN parameters from the configuration file.
tmboot [-g grpname] [-o sequence] [-S] [-A] [-y]
-g grpname : Boots all TMS and application servers in groups using this parameter
-o sequence : Boots all servers in the order shown in the SEQUENCE parameter
-s server-name : Boots an individual server
-S : Boots all servers listed in the SERVERS section
-A: Boots all administrative server for machines listed in the MACHINES section, this option ensures that the DBBL, BBL, and BRIDGE processes are started in the proper order.
-y : Provides an automatic yes response to the prompt
The options used by tmboot for partial booting (-A, -g, -I, -s, -l, -M, -B) are supported in tmshutdown. Use –w delay option to force a hard shutdown after delay seconds. After delay seconds, a SIGKILL signal is sent to the servers. This option enables the administrator to shut down servers that are looping or blocked in application code.
Note: the unnumbered server are the first to be shut down, when an application is shut down, all the IPC resources allocated by Tuxedo system are removed, but IPC resources allocated by the DBMS does not remove.
The Tuxedo IPC tool (that is, the tmipcrm) enables you to remove IPC resources allocated by the Tuxedo system. This command reads the binary TUXCONFIG file, and attaches to the BB using the
information in this file. It works only on the local server machine, it does not clean up IPC resource on remote machines in the Tuxedo configuration.
tmipcrm [-y] [-n] [TUXCONFIG_file]
The IPC tool lists all IPC resources used by Tuxedo system and gives you the option of removing them. To remove /Q IPC resources, use the qmadmin->ipcrm command.
The following facilities offer an excellent view of your system is working:
Tuxedo Administration Console
command-line utilities
Log files
the ATMI
the MIB
Run-time and user-level tracing facilities
Common Startup Problems:
Application server failed or dumped core during initialization
Application server file not found or not executable
Automatic migration of server group
Default boot sequence may not be optimal
Environment variable not set or not set properly
IPCKEY is already in use
Invalid network address
Met upper bound limits specified in the UBBCONFIG file
Network port is in use already
Reached limit on system resources
Server boot dependency
TLOG file is not created
Common Shutdown Problems:
Clients still attached
Dead servers
Shutdown sequence
You can subscribing to Tuxedo system events, such as servers dying, and network failures.
Viewing the ULOG with any text editor
Checking the ULOG for tlisten messages; and use tmadmin dumptlog command which downloads a TLOG to a text file.
You can writing programs that monitor your run-time application (MIB)
You can specifying a tracing expression that contains a category, a filtering expression, and an action, and enabling the TMTRACE run-time and TMUTRACE user-level environment variable.
To monitor your application through the command-line interface, use the tmadmin or txrpt.
Whenever you start a tmadmin session, you can choose the following operating modes for that session: the default operating mode, read-only mode, or configuration mode. In read-only mode, the administrator process is not tied up by tmadmin, the tmadmin process attaches to the BB as a client.
Note: You can also generate a report of the Tuxedo version and license numbers.
The txrpt command analyzes the standard error output of a Tuxedo server and provides a summary of service processing time within the server.
The ULOGRTNSIZE environment variable is used to specify rotation file size. The ULOGMILISEC environment variable is used to time stamp ULOG message output intervals in milliseconds.
Though separate tlisten logs are maintained in the ULOG on each machine, they can be shared across remote file systems.
The Tuxedo System Messages CMDTUX Catalog contains the following information about tlisten messages:
Descriptions of all messages
Recommended actions that you (or a programmer) can take to resolve the error conditions reported in these messages.
Attribute TA_TOTREQC, defines the number of times services have been processed in a specified server. Tuxedo system provides a programming interface that offers direct access to the MIB while your application is not running (tpadmcall).
ud32 is a client program delivered with the Tuxedo system that reads input consisting of text representation of FML buffers. You can use ud32 for ad hoc queries and updates to the MIB. It creates an FML32 buffer, makes a service call with the buffer, receives a reply (also in an FML32 buffer) from the service call, and displays the results on screen or in a file in text format.
Tuxedo system has a set of build-in trace points that mark calls to functions in different categories, such as ATMI functions issued by the application or XA functions issued by Tuxedo to an X/Open CRM. To enable tracing, you must specify a tracing expression that contains a category, a filtering expression, and an action. The category indicates the type of function (such as ATMI) to be traced. The filtering expression specifies which particular functions trigger an action. The action indicates the response to the specified functions by Tuxedo.
For a simple tracing expression, define TMTRACE=on in the environment of the client. The trace records are written to the ULOG file.
You can also specify a tracing expression in the environment of a server using the ulog or utrace tmtrace receivers.
Run-time Tracing Expression: TMTRACE=atmi:/tpservice/ulog.
User-Level Expression: TMTRACE=atmi:utrace.
You can activate or deactivate the tracing option using the changetrace command of tmadmin.
A machine is marked as partitioned when it cannot be reached by the system.
Keep in mind that individual threads are not visible to an administrator. So if an individual thread within a process has died, however, the death of the thread is not detected by the BBL.
If a thread dies as the result of an erroneous call to a thread exit function, however, no signal is generated. If this type of death occurs before the thread calls tpterm(), then the BBL cannot detect the death and does not deallocate the registry table slot for the context associated with the dead thread. (No solution)
The client section of the bulletin board registry provides an entry for each context. (tpinit)
The T_SERVERCTXT class of the TM_MIB provides multiple instances of 14 fields if multiple server dispatch threads are active simultaneously.
tmconfig add/update format: field_name<tabs>field_value
Task cannot be performed on Run-time system:
Any parameter that affects the size of the bulletin board is not dynamic.
The name of a machine being used in a running application is not dynamic.
Once server executables are assigned to run on both master and backup machines, the assignment of the master and backup cannot be changed.
The suspend/res command marks one of the following as inactive/active:
One service
All services of a particular queue
All services of a particular group ID or server ID combination
Data compression is useful in most applications and is vital in supporting large configurations.
For local message, the advantage of local data compression is that it results in lower utilization of IPC resources.
For remote message, the advantage of remote data compression is that it results in lower utilization of network bandwidth.
If you decide to use data compression, you must set the CMPLIMIT parameter in the MACHINES section of the configuration file: CMPLIMIT=string_value1[,string_value2]
The strings that make up the value of this parameter specify the threshold message size for messages bound to remote processes (string_value1) and local processes (string_value2)
TMCMPPRFM: 1 specifies the lowest level of compression with the fastest performance; 9 represents the highest level of compression with the slowest performance. The lower the number, the more quickly the compression routine is executed.
For a high-speed network, consider setting remote data compression to the lowest limit for file transfers generated by Tuxedo system.
For a low-speed network, consider setting remote data compress to zero on all machines.
Use the NETLOAD parameter in the MACHINES section of the configuration file to force more requests to be sent to local queues.
Application-defined events will be tracked by the client and server processes.
System-defined events are defined by Tuxedo system code and generally associated with TM_MIB.
Tuxedo EventBroker is a tool that provides asynchronous routing of application events among the processes running in a Tuxedo application.
The EventBroker recognizes over 100 meaningful state transitions to a MIB object as system events. You can use the EventBroker simply by subscribing to system events. Then, instead of having to query for MIB records, you can be informed automatically when events occur in the MIB by receiving FML data buffers representing MIB object.
As the administrator for Tuxedo application, you can enter subscription requests through calls to the T_EVENT_COMMAND class of the EVENT_MIB. You can also invoke the tpsubscribe function to subscribe it programmatically.
System Event Severity Levels: ERROR, INFO, WARN
TMUSREVT handles application events, TMSYSEVT handles system events.
Periodically, the secondary server polls the primary server to obtain the current subscription list, which includes filtering and notification rules.
When a client leaves an application by calling tpterm, all of its subscriptions are canceled unless the subscription is specified as persistent.
Before you can use EventBroker with transactions, you must configure the NULL_TMS parameter with the TMUSREVT server for the server groups in which the EventBroker is running.
To migrate TLOG, first you should dump it from the master machine by command:
dumptlog [-z config] [-o offset] [-n filename] [-g groupname]
Then you should copy the file to BACKUP machine, and read it into the existing TLOG:
loadtlog –m machine filename
At last force a warm start of the TLOG by command:
logstart mathine
Tuxedo release 8.0 or later allows you to cache service and interface entries, and to use the cached copies of the service or interface without locking the bulletin board.
The SICACHEENTRIESMAX option has been added to the MACHINES and SERVERS sections of the configuration file to allow you to define the maximum number of service cache entries that any process and/or server can hold.
Routing criteria service will not be cached.
If there are buffer type restrictions on a service, the service will not be cached.
If the group of a service is predetermined, then service will not be cached.
The NO_AA option will circumvent the calling of the authorization and auditing security functions.
Only one Bridge process is running per host machine in a multiple machine Tuxedo domain, The availability of multithreaded Bridge processing improves the data throughput potential. You can configure the BRTHREADS parameter in the MACHINES section of the UBBCONFIG file.
Generally, all ATMI calls must call mutexing functions in order to protect sensitive state information. To turn off multithreaded processing, use the TMNOTHREADS environment variable.
The IPC requirements for your system are determined by the values of several system parameters:
MAXACCESSERS : equals the number of semaphores
REPLYQ
RQADDR
MAXSERVERS
MAXSERVICES
MAXGIT
The maximum total size of a queue must be large enough to handle the largest message in the application. A typical queue is not more than 75% to 85% full.
The UNIX system sar command provides valuable performance information that can be used to find system bottlenecks.
BSD offers iostat command, while Sun offers perfmeter.
The stdout and stderr files for our clients and servers may have been renamed by –e and –o option in your configuration file.
Use a debugger such as dbx to get a stack trace.
--转自