BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Administering a BEA Tuxedo Application at Run Time   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


How to Shut Down Your Application

Use the tmshutdown(1) command to shut down all or part of a BEA Tuxedo application. The rules for running this command are similar to those for running tmboot(1); tmshutdown is the inverse of tmboot.

When the entire application is shut down, tmshutdown removes the interprocess communication (IPC) resources associated with the BEA Tuxedo system. The options used by tmboot for partial booting (-A, -g, -I, -S, -s, -l, -M, -B) are supported in tmshutdown. The -b option (allowing tmboot to be used from a non-MASTER machine) is not supported for tmshutdown; you must enter the tmshutdown command from the MASTER (or BACKUP MASTER) machine.

To migrate servers, use the -R option. This option shuts down the servers without removing bulletin board entries for them. If a machine is partitioned, run tmshutdown with the -P LMID option on the partitioned machine to shut down the servers on that machine.

tmshutdown does not shut down the administrative server BBL on a machine to which clients are attached. You can use the -c option to override this feature. You need this option for occasions when you must bring down a machine immediately and you cannot contact the clients.

You can use the -w delay option to force a hard shutdown after delay seconds. This option suspends all servers immediately so that additional work cannot be queued. The value of delay should allow time for requests already queued to be serviced. 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.

Running tmshutdown

Only the administrator who has written the TUXCONFIG file can execute tmshutdown(1). The application can be shut down only from the machine designated as MASTER in the configuration file. When the BACKUP acts as MASTER, it is considered to be the MASTER for shutdown purposes. (The only exception to this rule is a partitioned machine. By using the -p option, an administrator can run the tmshutdown command from a partitioned machine to shut down the application at that site.)

The order in which application servers are shut down is the reverse of the order specified by the SEQUENCE parameter for them, or the reverse order in which they are listed in the configuration file. If some servers have SEQUENCE numbers and others do not, the unnumbered servers are the first to be shut down, followed by the application servers with SEQUENCE numbers (in reverse order). Finally, administrative servers are shut down.

When an application is shut down, all the IPC resources allocated by the BEA Tuxedo system are removed; tmshutdown does not remove IPC resources allocated by the DBMS.

Using the IPC Tool When an Application Fails to Shut Down Properly

IPC resources are operating system resources, such as message queues, shared memory, and semaphores. When a BEA Tuxedo application shuts down properly with the tmshutdown command, all IPC resources used by the BEA Tuxedo application are removed from the system. In some cases, however, an application may fail to shut down properly and stray IPC resources may remain on the system. When this happens, it may not be possible to reboot the application.

One way to address this problem is to remove IPC resources with a script that invokes the system IPCS command and scan for all IPC resources owned by a particular user account. However, with this method, it is difficult to distinguish among different sets of IPC resources; some may belong to a particular BEA Tuxedo application; and others to applications unrelated to the BEA Tuxedo system. It is important to be able to distinguish among these sets of resources; unintentional removal of IPC resources can severely damage an application.

The BEA Tuxedo IPC tool (that is, the tmipcrm(1) command) enables you to remove IPC resources allocated by the BEA Tuxedo system (that is, for core BEA Tuxedo and Workstation components only) in an active application.

The command to remove IPC resources, tmipcrm(1), resides in TUXDIR/bin. This command reads the binary configuration file (TUXCONFIG), and attaches to the bulletin board using the information in this file. tmipcrm works only on the local server machine; it does not clean up IPC resources on remote machines in a BEA Tuxedo configuration.

To run this command, enter it as follows on the command line:

tmipcrm [-y] [-n] [tuxconfig_file]

The IPC tool lists all IPC resources used by the BEA Tuxedo system and gives you the option of removing them.

Note: This command will not work unless you have set the TUXCONFIG environment variable correctly or specified the appropriate TUXCONFIG file on the command line.

To remove /Q IPC resources, use the qmadmin(1) ipcrm command.

 

back to top   next page