记录tuxedo常用的命令操作,以备后用。
**********************************************编辑tuxedo 环境变量**********************************************************
[tuxedo@centos simpapp]$ vi tux.env
TUXDIR=/home/tuxedo/tuxedo11gR1; export TUXDIR
JAVA_HOME=$TUXDIR/jre; export JAVA_HOME
JVMLIBS=$JAVA_HOME/lib/amd64/server:$JAVA_HOME/jre/bin
PATH=$TUXDIR/bin:$JAVA_HOME/bin:$PATH; export PATH
COBCPY=:$TUXDIR/cobinclude; export COBCPY
COBOPT="-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl"; export COBOPT
SHLIB_PATH=$TUXDIR/lib:$JVMLIBS:$SHLIB_PATH; export SHLIB_PATH
LIBPATH=$TUXDIR/lib:$JVMLIBS:$LIBPATH; export LIBPATH
LD_LIBRARY_PATH=$TUXDIR/lib:$JVMLIBS:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
WEBJAVADIR=$TUXDIR/udataobj/webgui/java; export WEBJAVADIR
APPDIR=/home/tuxedo/simpapp; export APPDIR
TUXCONFIG=$APPDIR/tuxconfig; export TUXCONFIG
**********************************************编辑tuxedo config配置文件*******************************************************
[tuxedo@centos simpapp]$ vi ubbconfig
# (c) 2003 BEA Systems, Inc. All Rights Reserved.
#ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.7 $"
#Skeleton UBBCONFIG file for the TUXEDO Simple Application.
#Replace the <bracketed> items with the appropriate values.
*RESOURCES
#IPCKEY <Replace with a valid IPC Key>
#Example:
IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/home/tuxedo/simpapp"
TUXCONFIG="/home/tuxedo/simpapp/tuxconfig"
TUXDIR="/home/tuxedo/tuxedo11gR1"
#Example:
# APPDIR="/home/me/simpapp"
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# TUXDIR="/usr/tuxedo"
centos LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
GROUP1
LMID=simple GRPNO=1 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1 SRVID=1
*SERVICES
TOUPPER
~
~
"ubbconfig" 47L, 833C
****************************************************编译server程序和client程序**********************************************************
[tuxedo@centos simpapp]$ ll
total 492
-rw-r----- 1 tuxedo tuxedo 2943 Oct 12 07:30 README
-rw-rw-r-- 1 tuxedo tuxedo 1862 Oct 12 09:27 ULOG.101211
-rw-rw-r-- 1 tuxedo tuxedo 366 Oct 12 09:26 access.101211
-rwxrwxr-x 1 tuxedo tuxedo 9866 Oct 12 08:00 simpcl
-rw-r----- 1 tuxedo tuxedo 1826 Oct 12 07:30 simpcl.c
-rwxrwxr-x 1 tuxedo tuxedo 10485 Oct 12 07:58 simpserv
-rw-r----- 1 tuxedo tuxedo 1632 Oct 12 07:30 simpserv.c
-rw-rw-r-- 1 tuxedo tuxedo 0 Oct 12 08:54 stderr
-rw-rw-r-- 1 tuxedo tuxedo 0 Oct 12 08:54 stdout
-rw-r----- 1 tuxedo tuxedo 662 Oct 12 07:50 tux.env
-rw------- 1 tuxedo tuxedo 439296 Oct 12 07:51 tuxconfig
-rw-rw-r-- 1 tuxedo tuxedo 1334 Oct 12 07:53 tuxconfig.txt
-rw-r----- 1 tuxedo tuxedo 833 Oct 12 07:50 ubbconfig
-rw-r----- 1 tuxedo tuxedo 886 Oct 12 07:39 ubbsimple.bak
[tuxedo@centos simpapp]$ buildserver -o simpserv -f simpserv.c -s TOUPPER
[tuxedo@centos simpapp]$
[tuxedo@centos simpapp]$ buildclient -o simpcl -f simpcl.c
simpcl.c: In function 'main':
simpcl.c:43: warning: incompatible implicit declaration of built-in function 'strlen'
simpcl.c:60: warning: incompatible implicit declaration of built-in function 'strcpy'
[tuxedo@centos simpapp]$
****************************************************启动tuxedo全部服务**********************************************************
[tuxedo@centos simpapp]$ tmboot -y
Booting all admin and server processes in /home/tuxedo/simpapp/tuxconfig
INFO: Oracle Tuxedo, Version 11.1.1.2.0, 64-bit, Patch Level (none)
Booting admin processes ...
exec BBL -A :
process id=13757 ... Started.
Booting server processes ...
exec simpserv -A :
process id=13758 ... Started.
2 processes started.
[tuxedo@centos simpapp]$ ps -ef | grep 13757
tuxedo 13757 1 0 09:31 pts/0 00:00:00 BBL -C dom=simpapp -g 30002 -i 0 -u centos -U /home/tuxedo/simpapp/ULOG -m 0 -A
tuxedo 13761 2484 0 09:31 pts/0 00:00:00 grep 13757
[tuxedo@centos simpapp]$ ps -ef | grep 13758
tuxedo 13758 1 0 09:31 pts/0 00:00:00 simpserv -C dom=simpapp -g 1 -i 1 -u centos -U /home/tuxedo/simpapp/ULOG -m 0 -A
tuxedo 13763 2484 0 09:31 pts/0 00:00:00 grep 13758
[tuxedo@centos simpapp]$ ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0001e240 65536 tuxedo 600 563000 2
------ Semaphore Arrays --------
key semid owner perms nsems
0x0001e240 327682 tuxedo 600 3
0x00000000 393219 tuxedo 600 31
------ Message Queues --------
key msqid owner perms used-bytes messages
0x0001e240 393217 tuxedo 600 0 0
0x00000000 425986 tuxedo 600 0 0
[tuxedo@centos simpapp]$
[tuxedo@centos simpapp]$ ./simpcl "hello woRLD"
Returned string is: HELLO WORLD
[tuxedo@centos simpapp]$
*******************************************使用tmadmin管理器**********************************************************
[tuxedo@centos simpapp]$ tmadmin
tmadmin - Copyright (c) 1996-2010 Oracle.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by Oracle.
Tuxedo is a registered trademark.
> psr
Prog Name Queue Name Grp Name ID RqDone Load Done Current Service
--------- ---------- -------- -- ------ --------- ---------------
BBL 123456 simple 0 0 0 ( IDLE )
simpserv 00001.00001 GROUP1 1 0 0 ( IDLE )
> psc
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv GROUP1 1 simple 0 AVAIL
>
****************************************************关闭tuxedo全部服务**********************************************************
[tuxedo@centos simpapp]$ tmshutdown
Shutdown all admin and server processes? (y/n): y
Shutting down all admin and server processes in /home/tuxedo/simpapp/tuxconfig
Shutting down server processes ...
Server Id = 1 Group Id = GROUP1 Machine = simple: shutdown succeeded
Shutting down admin processes ...
Server Id = 0 Group Id = simple Machine = simple: shutdown succeeded
2 processes stopped.
[tuxedo@centos simpapp]$
****************************************************查看ULOG日志文件**********************************************************
[tuxedo@centos simpapp]$ vi ULOG.101211
075128.centos!tmloadcf.13392.3468011264.-2: 10-12-2011: client high water (0), total client (0)
075128.centos!tmloadcf.13392.3468011264.-2: 10-12-2011: Tuxedo Version 11.1.1.2.0, 64-bit
075128.centos!tmloadcf.13392.3468011264.-2: CMDTUX_CAT:879: INFO: A new file system has been created. (size = 1029 512-byte blocks)
075128.centos!tmloadcf.13392.3468011264.-2: CMDTUX_CAT:871: INFO: TUXCONFIG file /home/tuxedo/simpapp/tuxconfig has been created
085422.centos!BBL.13588.2555811584.0: 10-12-2011: Tuxedo Version 11.1.1.2.0, 64-bit, Patch Level (none)
085422.centos!BBL.13588.2555811584.0: LIBTUX_CAT:262: INFO: Standard main starting
085422.centos!simpserv.13589.1180923648.0: 10-12-2011: Tuxedo Version 11.1.1.2.0, 64-bit
085422.centos!simpserv.13589.1180923648.0: LIBTUX_CAT:262: INFO: Standard main starting
085422.centos!simpserv.13589.1180923648.0: Welcome to the simple server
090917.centos!tmadmin.13635.1511257856.-2: 10-12-2011: Tuxedo Version 11.1.1.2.0, 64-bit
090917.centos!tmadmin.13635.1511257856.-2: TMADMIN_CAT:1330: INFO: Command: help
091433.centos!simpserv.13589.1180923648.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
091436.centos!BBL.13588.2555811584.0: CMDTUX_CAT:26: INFO: The BBL is exiting system