tuxedo管理命令之tmboot与tmshutdown_MQ, Tuxedo及OLTP讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MQ, Tuxedo及OLTP讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3881 | 回复: 0   主题: tuxedo管理命令之tmboot与tmshutdown        下一篇 
曹先丰
注册用户
等级:中士
经验:208
发帖:72
精华:0
注册:2012-1-9
状态:离线
发送短消息息给曹先丰 加好友    发送短消息息给曹先丰 发消息
发表于: IP:您无权察看 2014-11-3 17:20:26 | [全部帖] [楼主帖] 楼主

tmboot命令启动TUXEDO系统的应用,创建必要的IPC资源、启动相关机器的规定的系统和应用服务进程。

tm的主要参数有:
-A 启动所有机器上的管理进程。
-M 启动主控机器上的管理进程。
-i srvid 启动服务id等于srvid的进程。
-g grpname 启动指定的一组服务(含TMS)。
-S 启动所有应用服务。
-s server-name 启动可执行文件名为server-name的服务。
-e 打印本配置所需要的最少的IPC资源。

示例:

tmboot -s s1104Cfm;


s1104Cfm为服务名。

tmshutdown命令用于关闭所有或部分应用并释放IPC资源。
本命令所有参数与tmboot类似(如:-A,-g,-i,-s,-S),意义相同。
tmshutdown的特殊参数有:

-c


当有客户端正在连接时,tmshutdown不能关闭管理服务。参数-c则可以超越次规则。该参数仅用于管理员需要立即关机而又无法及时通知客户端时。

-P


在非主控节点上,可以用-P参数仅关闭该机器上的应用。
示例:

tmboot -s s1104Cfm;


s1104Cfm为服务名。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

以下是BEA的官方参考文档:http://e-docs.bea.com/tuxedo/tux80/atmi/rfcmd31.htm

tmboot
Name
tmboot―Brings up a BEA Tuxedo configuration.
Synopsis
tmboot [-l lmid] [-g grpname] [-i srvid] [-s aout] [-o sequence] [-S] [-A] [-b] [-B lmid] [-T grpname] [-e command] [-w] [-y] [-g] [-n] [-c] [-M] [-d1]
Description
tmboot brings up a BEA Tuxedo application in whole or in part, depending on the options specified. tmboot can be invoked only by the administrator of the bulletin board (as indicated by the UID parameter in the configuration file) or by root. The tmboot command can be invoked only on the machine identified as MASTER in the RESOURCES section of the configuration file, or the backup acting as the MASTER, that is, with the DBBL already running (via the master command in tmadmin(1)). Except, if the -b option is used; in that case, the system can be booted from the backup machine without it having been designated as the MASTER.
With no options, tmboot executes all administrative processes and all servers listed in the SERVERS section of the configuration file named by the TUXCONFIG and TUXOFFSET environment variables. If the MODEL is MP, a DBBL administrative server is started on the machine indicated by the MASTER parameter in the RESOURCES section. An administrative server (BBL) is started on every machine listed in the MACHINES section. For each group in the GROUPS section, TMS servers are started based on the TMSNAME and TMSCOUNT parameters for each entry. All administrative servers are started followed by servers in the SERVERS sections. Any TMS or gateway servers for a group are booted before the first application server in the group is booted. The TUXCONFIG file is propagated to remote machines as necessary. tmboot normally waits for a booted process to complete its initialization (that is, tpsvrinit()) before booting the next process.
Booting a gateway server implies that the gateway advertises its administrative service, and also advertises the application services representing the foreign services based on the CLOPT parameter for the gateway. If the instantiation has the concept of foreign servers, these servers are booted by the gateway at this time.
Booting an LMID is equivalent to booting all groups on that LMID.
Application servers are booted in the order specified by the SEQUENCE parameter, or in the order of server entries in the configuration file (see the description in UBBCONFIG(5)). If two or more servers in the SERVERS section of the configuration file have the same SEQUENCE parameter, then tmboot may boot these servers in parallel and will not continue until they all complete initialization. Each entry in the SERVERS section can have a MIN and MAX parameter. tmboot boots MIN application servers (the default is 1 if MIN is not specified for the server entry) unless the -i option is specified; using the -i option causes individual servers to be booted up to MAX occurrences.
If a server cannot be started, a diagnostic is written on the central event log (and to the standard output, unless -q is specified), and tmboot continues―except that if the failing process is a BBL, servers that depend on that BBL are silently ignored. If the failing process is a DBBL, tmboot ignores the rest of the configuration file. If a server is configured with an alternate LMID and fails to start on its primary machine, tmboot automatically attempts to start the server on the alternate machine and, if successful, sends a message to the DBBL to update the server group section of TUXCONFIG.
For servers in the SERVERS section, only CLOPT, SEQUENCE, SRVGRP, and SRVID are used by tmboot. Collectively, these are known as the server's boot parameters. Once the server has been booted, it reads the configuration file to find its run-time parameters. (See UBBCONFIG(5) for a description of all parameters.)
All administrative and application servers are booted with APPDIR as their current working directory. The value of APPDIR is specified in the configuration file in the MACHINES section for the machine on which the server is being booted.
The search path for the server executables is APPDIR, followed by TUXDIR/bin, followed by /bin and /usr/bin, followed by any PATH specified in the ENVFILE for the MACHINE. The search path is used only if an absolute pathname is not specified for the server. Values placed in the server's ENVFILE are not used for the search path.
When a server is booted, the variables TUXDIR, TUXCONFIG, TUXOFFSET, and APPDIR, with values specified in the configuration file for that machine, are placed in the environment. The environment variable LD_LIBRARY_PATH is also placed in the environment of all servers. Its value defaults to $APPDIR:$TUXDIR/lib:/lib:/usr/lib:lib> where
is the value of the first LD_LIBRARY_PATH= line appearing in the machine ENVFILE. See UBBCONFIG(5) for a description of the syntax and use of the ENVFILE. Some Unix systems require different environment variables. For HP-UX systems, use the SHLIB_PATH environment variable. FOR AIX systems, use the LIBPATH environment variable.
The ULOGPFX for the server is also set up at boot time based on the parameter for the machine in the configuration file. If not specified, it defaults to $APPDIR/ULOG.
All of these operations are performed before the application initialization function, tpsvrinit(), is called.
Many of the command line options of tmboot serve to limit the way in which the system is booted and can be used to boot a partial system. The following options are supported.
-l lmid
For each group whose associated LMID parameter is lmid, all TMS and gateway servers associated with the group are booted and all servers in the SERVERS section associated with those groups are executed.
-g grpname
All TMS and gateway servers for the group whose SRVGRP parameter is grpname are started, followed by all servers in the SERVERS section associated with that group. TMS servers are started based on the TMSNAME and TMSCOUNT parameters for the group entry.
-i srvid
All servers in the SERVERS section whose SRVID parameter is srvid are executed.
-s aout
All servers in the SERVERS section with name aout are executed. This option can also be used to boot TMS and gateway servers; normally this option is used in this way in conjunction with the -g option.
-o sequence
All servers in the SERVERS section with SEQUENCE parameter sequence are executed.
-S
All servers in the SERVERS section are executed.
-A
All administrative servers for machines in the MACHINES section are executed. Use this option to guarantee that the DBBL and all BBL and BRIDGE processes are brought up in the correct order. (See also the description of the -M option.)
-b
Boot the system from the BACKUP machine (without making this machine the MASTER).
-B lmid
A BBL is started on a processor with logical name lmid.
-M
This option starts administrative servers on the master machine. If the MODEL is MP, a DBBL administrative server is started on the machine indicated by the MASTER parameter in the RESOURCES section. A BBL is started on the MASTER machine, and a BRIDGE is started if the LAN option and a NETWORK entry are specified in the configuration file.
-d1
Causes command line options to be printed on the standard output. Useful when preparing to use sdb to debug application services.
-T grpname
All TMS servers for the group whose SRVGRP parameter is grpname are started (based on the TMSNAME and TMSCOUNT parameters associated with the group entry). This option is the same as booting based on the TMS server name (-s option) and the group name (-g).
-e command
Causes command to be executed if any process fails to boot successfully. command can be any program, script, or sequence of commands understood by the command interpreter specified in the SHELL environment variable. This allows an opportunity to bail out of the boot procedure. If command contains white space, the entire string must be enclosed in quotes. This command is executed on the machine on which tmboot is being run, not on the machine on which the server is being booted.
Note: If you choose to do redirection or piping on a Windows 2000 system, you must use one of the following methods:
Do redirection or piping from within a command file or script.
To do redirection from within the queue manager administration program, precede the command with cmd. For example:
cmd /c ipconfig > out.txt
If you choose to create a binary executable, you must allocate a console within the binary executable using the Windows AllocConsole() API function
-w
Informs tmboot to boot another server without waiting for servers to complete initialization. This option should be used with caution. BBLs depend on the presence of a valid DBBL; ordinary servers require a running BBL on the processor on which they are placed. These conditions cannot be guaranteed if servers are not started in a synchronized manner. This option overrides the waiting that is normally done when servers have sequence numbers.
-y
Assumes a yes answer to a prompt that asks if all administrative and server processes should be booted. (The prompt appears only when the command is entered with none of the limiting options.)
-q
Suppresses the printing of the execution sequence on the standard output. It implies -y.
-n
The execution sequence is printed, but not performed.
-c
Minimum IPC resources needed for this configuration are printed.
When the -l, -g, -i, -o, and -s options are used in combination, only servers that satisfy all qualifications specified are booted. The -l, -g, -s, and -T options cause TMS servers to be booted; the -l, -g, and -s options cause gateway servers to be booted; the -l, -g, -i, -o, -s, and -S options apply to application servers. Options that boot application servers fail if a BBL is not available on the machine.The -A, -M, and -B options apply only to administrative processes.
The standard input, standard output, and standard error file descriptors are closed for all booted servers.
Interoperability
tmboot must run on the master node, which in an interoperating application must be the highest release available. tmboot detects and reports configuration file conditions that would lead to the booting of administrative servers such as Workstation listeners on sites that cannot support them.
Portability
tmboot is supported on any platform on which the BEA Tuxedo server environment is supported.
Environment Variables
During the installation process, an administrative password file is created. When necessary, the BEA Tuxedo system searches for this file in the following directories (in the order shown): APPDIR/.adm/tlisten.pw and TUXDIR/udataobj/tlisten.pw. To ensure that your password file will be found, make sure you have set the APPDIR and/or TUXDIR environment variables.
Link-Level Encryption
If the link-level encryption feature is in operation between tmboot and tlisten, link-level encryption will be negotiated and activated first to protect the process through which messages are authenticated.
Diagnostics
If TUXCONFIG is set to a non-existent file, two fatal error messages are displayed:
error processing configuration file
configuration file not found
If tmboot fails to boot a server, it exits with exit code 1 and the user log should be examined for further details. Otherwise tmboot exits with exit code 0.
If tmboot is run on an inactive non-master node, a fatal error message is displayed:
tmboot cannot run on a non-master node.
If tmboot is run on an active node that is not the acting master node, the following fatal error message is displayed:
tmboot cannot run on a non acting-master node in an active application.
If the same IPCKEY is used in more than one TUXCONFIG file, tmboot fails with the following message:
Configuration file parameter has been changed since last tmboot
If there are multiple node names in the MACHINES section in a non-LAN configuration, the following fatal error message is displayed:
Multiple nodes not allowed in MACHINES for non-LAN application.
If tlisten is not running on the MASTER machine in a LAN application, a warning message is printed. In this case, tmadmin(1) cannot run in administrator mode on remote machines; it is limited to read-only operations. This also means that the backup site cannot reboot the master site after failure.
Examples
To start only those servers located on the machines logically named CS0 and CS1, enter the following command:
tmboot -l CS0 -l CS1
To start only those servers named CREDEB that belong to the group called DBG1, enter the following command:
tmboot -g DBG1 -s CREDEB1
To boot a BBL on the machine logically named PE8, as well as all those servers with a location specified as PE8, enter the following command.
tmboot -B PE8 -l PE8
To view minimum IPC resources needed for the configuration, enter the following command.
tmboot -c
The following is an example of the output produced by the -c option:
Ipc sizing (minimum BEA Tuxedo values only) ... Fixed Minimums Per Processor SHMMIN: 1 SHMALL: 1 SEMMAP: SEMMNI Variable Minimums Per Processor SEMUME, A SHMMAX SEMMNU, * * Node SEMMNS SEMMSL SEMMSL SEMMNI MSGMNI MSGMAP SHMSEG ------ ------ ------ ------ ------ ------ ------ ------ sfpup 60 1 60 A + 1 10 20 76K sfsup 63 5 63 A + 1 11 22 76K where 1 = A = 8.
The number of expected application clients per processor should be added to each MSGMNI value. MSGMAP should be twice MSGMNI. SHMMIN should always be set to 1.
The minimum IPC requirements can be compared to the parameters set for your machine. See the system administration documentation for your machine for information about how to change these parameters. If the -y option is used, the display will differ slightly from the previous example.
Notices
The tmboot command ignores the hangup signal (SIGHUP). If a signal is detected during boot, the process continues.
Minimum IPC resources displayed with the -c option apply only to the configuration described in the configuration file specified; IPC resources required for a resource manager or for other BEA Tuxedo configurations are not considered in the calculation.
See Also
tmadmin(1), tmloadcf(1), tmshutdown(1), UBBCONFIG(5)
Administering BEA Tuxedo Applications at Run Time
------------------------------------
tmshutdown


以下是BEA的官方参考文档:http://e-docs.bea.com/tuxedo/tux80/atmi/rfcmd35.htm#1335246

tmshutdown(1)
Name
tmshutdown―Shuts down a set of BEA Tuxedo servers.
Synopsis
tmshutdown [options]
Description
tmshutdown stops the execution of a set of servers or removes the advertisements of a set of services listed in a configuration file. Only the administrator of the bulletin board (as indicated by the UID parameter in the configuration file) or root can invoke the tmshutdown command. tmshutdown can be invoked only on the machine identified as MASTER in the RESOURCES section of the configuration file, or the backup acting as the MASTER, that is, with the DBBL already running (via the master command in tmadmin(1)). An exception to this is the -P option which is used on partitioned processors (see below).
With no options, tmshutdown stops all administrative, TMS, and gateway servers, and servers listed in the SERVERS section of the configuration file named by the TUXCONFIG environment variable, and removes the IPC resources associated with them. For each group, all servers in the SERVERS section, if any, are shut down, followed by any associated gateway servers (for foreign groups) and TMS servers. Administrative servers are shut down last.
Application servers without SEQUENCE parameters are shut down first in reverse order of the server entries in the configuration file, followed by servers with SEQUENCE parameters that are shut down from high to low sequence number. If two or more servers in the SERVERS section of the configuration file have the same SEQUENCE parameter, then tmshutdown may shut down these servers in parallel. Each entry in the SERVERS section may have an optional MIN and MAX parameter. tmshutdown shuts down all occurrences of a server (up to MAX occurrences) for each server entry, unless the -i option is specified; using the -i option causes individual occurrences to be shut down.
If it is not possible to shut down a server, or remove a service advertisement, a diagnostic is written on the central event log (see userlog(3c)). The following is a description of all options:
-l lmid
For each group whose associated LMID parameter is lmid, all servers in the SERVERS section associated with the group are shut down, followed by any TMS and gateway servers associated with the group.
-g grpname
All servers in the SERVERS section associated with the specified group (that is, for which the SRVGRP parameter is set to grpname) are shut down, followed by all TMS and gateway servers for the group. TMS servers are shut down based on the TMSNAME and TMSCOUNT parameters for the group entry. For a foreign group, the gateway servers for the associated entry in the HOST section are shut down based on GATENAME and GATECOUNT. Shutting down a gateway implies not only that the process itself is stopped; it also implies that the administrative service for the gateway and all advertised foreign services are unadvertised.
-i srvid
All servers in the SERVERS section for which the SRVID parameter is set to srvid are shut down. Do not enter a value for SRVID greater than 30,000; this indicates system processes (that is, TMSs or gateway servers) that should only be shut down via the -l or -g option.
-s aout
All servers listed in the SERVERS section with the name aout are shut down. This option can also be used to shut down TMS and gateway servers.
-o sequence
All servers in the SERVERS section for which the SEQUENCE parameter is set to sequence are shut down.
-S
All servers listed in the SERVERS section are shut down.
-A
All administrative servers are shut down.
-M
This option shuts down administrative servers on the master machine. The BBL is shut down on the MASTER machine, and the BRIDGE is shut down if the LAN option and a NETWORK entry are specified in the configuration file. If the MODEL is MP, the DBBL administrative server is shut down.
-B lmid
The BBL on the processor with the logical name lmid is shut down.
-T grpname
All TMS servers for the server group for which the SRVGRP parameter is set to grpname are shut down (based on the TMSNAME and TMSCOUNT parameters associated with the server group entry).
-w delay
Tells tmshutdown to suspend all selected servers immediately and waits for shutdown confirmation for only delay seconds before forcing the server to shut down by sending a SIGTERM and then a SIGKILL signal to the server.
Because the SIGKILL signal cannot be trapped, any process that receives it is terminated immediately, regardless of the code being executed by the process at that time. Such behavior may cause structural damage to the bulletin board if the process being stopped was updating the bulletin board when it was terminated.
Note: Servers to which the -w option may be applied should not catch the UNIX signal SIGTERM.
Note: When a server is shut down based on receipt of a SIGKILL signal, entries may remain in the bulletin board. When the bulletin board liaison (BBL) is due to shut down, these entries are detected and the BBL does not shut down. A second tmshutdown command may be required to complete system shutdown.
-k {TERM | KILL}
tmshutdown suspends all selected servers immediately and forces them to shut down in an orderly fashion (TERM) or preemptively (KILL).
Because the SIGKILL signal cannot be trapped, any process that receives it is terminated immediately, regardless of the code being executed by the process at that time. Such behavior may cause structural damage to the bulletin board if the process being stopped was updating the bulletin board when it was terminated.
Note: This option maps to the UNIX signals SIGTERM and SIGKILL on platforms that support them. By default, a SIGTERM initiates an orderly shutdown in a BEA Tuxedo server. If SIGTERM is reset by an application, the BEA Tuxedo system may be unable to shut down the server.
Note: When a server is shut down based on receipt of a SIGKILL signal, entries may remain in the bulletin board. When the bulletin board liaison (BBL) is due to shut down, these entries are detected and the BBL does not shut down. A second tmshutdown command may be required to complete system shutdown.
-y
Assumes a yes answer to a prompt that asks whether all administrative and server processes should be shut down. (The prompt appears only when the command is entered with none of the limiting options.)
When the -y option is specified, all services are unadvertised immediately from the bulletin board and any subsequent service calls fail.
-q
Suppresses the printing of the execution sequence on standard output. It implies -y.
-n
The execution sequence is printed, but not performed.
-R
For migration operations only, shuts down a server on the original processor without deleting its bulletin board entry in preparation for migration to another processor. The -R option must be used with either the -l or -g option (for example, tmshutdown -l lmid -R). The MIGRATE option must be specified in the RESOURCES section of the configuration file.
-c
Shuts down BBLs even if clients are still attached.
-H lmid
On a uniprocessor, all administrative and applications servers on the node associated with the specified lmid are shut down. On a multiprocessor (for example, 3B4000), all PEs are shut down, even if only one PE is specified.
-P lmid
With this option, tmshutdown attaches to the bulletin board on the specified lmid, ensures that this lmid is partitioned from the rest of the application (that is, that it does not have access to the DBBL), and shuts down all administrative and application servers. It must be run on the processor associated with the lmid in the MACHINES section of the configuration file.
The -l, -g, -s, and -T options cause TMS servers to be shut down; the -l, -g, and -s options cause gateway servers to be shut down; the -l, -g, -i, -s, -o, and -S options apply to application servers; the -A, -M, and -B options apply only to administrative processes. When the -l, -g, -i, -o, and -s options are used in combination, only servers that satisfy all the qualifications specified are shut down.
If the distributed transaction processing feature is being used such that global transactions are in progress when servers are shut down, transactions that have not yet reached the point at which a commit is logged after a precommit are aborted; transactions that have reached the commit point are completed when the servers (for example, TMS) are booted again.
Interoperability
tmshutdown must run on the master node. In an interoperating application the master node must be running the highest release available. tmshutdown detects and reports configuration file conditions that would lead to the shutting down of Release 4.2 administrative servers on Release 4.1 sites.
Portability
tmshutdown is supported on any platform on which the BEA Tuxedo server environment is supported.
Diagnostics
If tmshutdown fails to shut down a server or if a fatal error occurs, tmshutdown exits with exit code 1 and the user log should be examined for further details; otherwise it exits with exit code 0.
If tmshutdown is run on an active node that is not the acting master node, a fatal error message is displayed:
tmshutdown cannot run on a non acting-master node in an active application.
If shutting down a process would partition active processes from the DBBL, a fatal error message is displayed:
cannot shutdown, causes partitioning.
If a server has died, the following somewhat ambiguous message is produced.
CMDTUX_CAT:947 Cannot shutdown server GRPID
Examples
To shut down the entire system and remove all BEA Tuxedo IPC resources (force it if confirmation is not received in 30 seconds), run the following command:
tmshutdown -w 30
To shut down only those servers located on the machine for which the value of lmid is CS1, enter the following command:
tmshutdown -l CS1
Because the -l option restricts the action to servers listed in the SERVERS section, the BBL on CS1 is not shut down.
Notices
The tmshutdown command ignores the hangup signal (SIGHUP). If a signal is detected during shutdown, the process continues.
See Also
tmadmin(1), tmboot(1), UBBCONFIG(5)
Administering BEA Tuxedo Applications at Run Time




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论