tuxedo负载均衡和多域测试附件_第1页
tuxedo负载均衡和多域测试附件_第2页
tuxedo负载均衡和多域测试附件_第3页
tuxedo负载均衡和多域测试附件_第4页
tuxedo负载均衡和多域测试附件_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、11.附录11.1 simp svr Up #in elude #i nclude "atmi.h" void TOUPP ER(T PSVCINFO *rqst)int i;char *buf;long sen dle n,rcvle n;for(i = 0; i < rqst->le n-1; i+)rqst->datai = tou pp er(rqst->datai); userlog("From Clie nt ReqId%s",rqst->data);sen dle n = rqst->le n;if(bu

2、f = (char *) tp alloc("STRING", NULL, sen dle n+1) = NULL)(void) fp ri ntf(stderr,"Error allocat ing send buffern");tp term();exit(1);(void) strc py (buf, rqst->data);if (tp call("TOLOWER", (char *) buf, 0, (char *)&buf, & rcvle n, (lo ng)0 ) = -1)userlog( &q

3、uot;T PCALL ERROR CODE %d message%s", tp errno, tp strerror(t perrno);(void) fp ri ntf(stderr, "Tperrno = %dn", tp err no);tp free( buf);tp return (TP SUCCESS, 0, buf, 0L, 0);userlog("Call Remote ToLower Success %s", buf);tp retur n(T PSUCCESS, 0, buf, 0L, 0);11.2 simp svrLo

4、w #in clude #i nclude "atmi.h" void TOLOWER(T PSVCINFO *rqst) int i;for(i = 0; i < rqst->le n-1; i+)rqst->datai = tolower(rqst->datai);userlog("From Clie nt ReqId%s",rqst->data);prin tf("In ToLower");/slee p(10);tp retur n(T PSUCCESS, 0, rqst->data, 0L

5、, 0);11.3 ubbmp *RESOURCESIP CKEY 45678MASTER site1,site2MAXACCESSERS 1000MAXSERVERS 200MAXSERVICES 100MODEL MPLDBAL YOP TIONS LAN,MIGRATE *MACHINESFireCat1 LMID=site1UID=508GID=508APP DIR="/home/tuxa pp/tuxedo "TUXCONFIG="/home/tuxa pp/tuxedo/tuxc on fig"TUXDIR="/home/tuxed

6、o/tuxedo8.1"TYP E="li nux"MAXWSCLIENTS=100FireCat2 LMID=site2UID=508GID=508APP DIR="/home/tuxa pp/tuxedo"TUXCONFIG="/home/tuxa pp/tuxedo/tuxc on fig"TUXDIR="/home/tuxedo/tuxedo8.1"TYP E="LINUX"MAXWSCLIENTS=100 *GRO UPSGRO UP1LMID=site1 GRPN O=1

7、OP ENINFO=NONEGROUP2LMID=site2 GRPN O=2 OP ENINFO=NONE *NETWORK site1 NADDR="192.168.8.120:6009"NLSADDR="/192.168.8.120:8888" site2 NADDR="/192.168.8.121:7010"NLSADDR="/192.168.8.121:8888" *SERVERSDEFAULT:RESTART=N MAXGEN=5 REP LYQ=Y CLOP T="-A"WSL S

8、RVGR P=GRO UP1 SRVID=1CLOP T="-A-n /192.168.8.120:9502 -m 5 -x 5 -M 30"WSL SRVGR P=GRO UP2 SRVID=100CLOP T="-A-n /192.168.8.121:9502 -m 5 -x 5 -M 30" simp svr SRVGR P=GRO UP2 SRVID=11 RQADDR=RQ_si mp1 RQP ERM=0666 CLOP T="-A -p 1,10:2,1 " MIN=5 MAX=10 simp svr SRVGR P=G

9、RO UP1 SRVID=111 RQADDR=RQ_sim p2 RQP ERM=0666 CLOP T="-A -p 1,10:2,1 " MIN=5 MAX=10 *SERVICES11.4 cou ntry ubbdm *RESOURCESIP CKEY 240000MASTER tuxtestPERM 0666MAXACCESSERS 1000MAXSERVERS 50MAXSERVICES 100MODEL SHMLDBALYSCANUNIT 5SANITYSCAN 12BBLQUERY 30DBBLWAIT 2BLOCKTIME 6 *MACHINESDEFA

10、ULT:CharlesL inux LMID=tuxtestMAXWSCLIENTS=100APP DIR="/home/tuxa pp/tuxedo"TUXCONFIG="/home/tuxa pp/tuxedo/tuxc on fig"TUXDIR="/home/tuxedo/tuxedo8.1"ULOG PF X="/home/tuxa pp/tuxedo/ULOG" *GRO UPSADMINLMID=tuxtest GRPN O=1 OP ENINFO=NONEREMITLMID=tuxtest GRPN

11、 O=2 OP ENINFO=NONEDOMGRPLMID=tuxtest GRPN O=3DOMGR P1LMID=tuxtest GRPN O=4DOMGR P2LMID=tuxtest GRPN 0=5 *SERVERSDEFAULT:CLOP T="-A " REP LYQ=Y RESTART=Y GRACE=O MAXGEN=5WSL SRVGR P=ADMIN SRVID=1CLOP T="-A -t-p 1,10:2,1 " MIN=2 MAX=10-n /111.111.111.22:6666-m 10 -M 100 -x 5"

12、 simp svr Up SRVGR P=REMIT SRVID=10 RQADDR=RQ_si mpUp RQP ERM=0666 CLOP T="-ADMADM SRVGR P=DOMGR P SRVID=3050 REP LYQ=N RESTART=Y GRACE=0GWADM SRVGR P=DOMGR P1 SRVID=3051 REP LYQ=N RESTART=Y GRACE=0GWTDOMAIN SRVGRP=DOMGRP1 SRVID=3052 RQADDR=RQ GWT1 REPLYQ=Y RESTART=Y MIN=1 MAX=1GWADM SRVGR P=DO

13、MGR P2 SRVID=3053 REP LYQ=N RESTART=Y GRACE=0GWTDOMAIN SRVGRP=DOMGRP2 SRVID=3054 RQADDR=RQ GWT2 REPLYQ=Y RESTART=Y MIN=1 MAX=1 *SERVICES11.5 cou ntrydom *DM RESOURCES *DM LOCAL DOMAINSHOME1 GWGR P=DOMGR P1CONNECTION P OLICY=ON START UPTYP E=TDOMAINDOMAINID="E PR111"BLOCKTIME=10MAXDATALEN=1

14、000MAXRDOM=89 #DMTLOGDEV="/home/tuxa pp/tuxedo/tlog/DMTLOG"HOME2 GWGR P=DOMGR P2CONNECTION P OLICY=ON START UPTYP E=TDOMAINDOMAINID="E PR112"BLOCKTIME=10MAXDATALEN=1000 *DM REMOTE DOMAINSRMTGJ TYP E=TDOMAINDOMAINID=E PRGJ *DM TDOMAINHOME1 NWADDR="111.111.111.22.:6651"HO

15、ME2 NWADDR="/111.111.111.22:6652"RMTGJ NWADDR="/111.111.111.33:6660" *DM LOCAL SERVICESTOUPPER *DM REMOTE SERVICESTOLOWER # TOLOWER LDOM= HOME1 RDOM= RMTGJ RNAME= TOLOWER # TOLOWER LDOM= HOME2 RDOM= RMTGJ RNAME= TOLOWER11.6 world ubbdm *RESOURCESIP CKEY 240000MASTER tuxtestPERM 0

16、666MAXACCESSERS 1000MAXSERVERS 50MAXSERVICES 100MODELSHMLDBALYSCANUNIT 5SANITYSCAN 12BBLQUERY 30DBBLWAIT 2BLOCKTIME 6 *MACHINESDEFAULT: localhost LMID=tuxtestMAXWSCLIENTS=100APP DIR="/home/tuxa pp/tuxedo"TUXCONFIG="/home/tuxa pp/tuxedo/tuxc on fig"TUXDIR="/home/tuxedo/tuxedo

17、8.1"ULOG PF X="/home/tuxa pp/tuxedo/ULOG"TLOGDEVICE="/home/tuxa pp/tuxedo/tlog/TLOG" *GRO UPSADMINLMID=tuxtest GRPN O=1 OP ENINFO=NONEREMITLMID=tuxtest GRPN O=2 OP ENINFO=NONEDOMGRPLMID=tuxtest GRPN O=3 *SERVERSDEFAULT:CLOP T="-A " REP LYQ=Y RESTART=Y GRACE=0 MAXGE

18、N=5WSL SRVGR P=ADMIN SRVID=1CLOP T="-A-n /111.111.111.121:6669 -m 1 -M 100 -x 5"-p 1,10:2,1 " MIN=2 MAX=10simp svrLow SRVGR P=REMIT SRVID=110 RQADDR=RQ_si mp Low RQP ERM=0666 CLOP T="- ADMADM SRVGR P=DOMGR P SRVID=3050 REP LYQ=NGWADM SRVGR P=DOMGR P SRVID=3051 REP LYQ=NGWTDOMAIN

19、SRVGR P=DOMGR P SRVID=3052 REP LYQ=Y *SERVICES11.7 worlddom *DM RESOURCES *DM LOCAL DOMAINSHOME GWGR P=DOMGR PTYP E=TDOMAINDOMAINID="E PRGJ"BLOCKTIME=1OMAXDATALEN=1000MAXRDOM=89 #DMTLOGDEV="/home/tuxa pp/tuxedo/tlog/DMTLOG" *DM REMOTE DOMAINSRMT111 TYP E=TDOMAINDOMAINID=E PR111RM

20、T112 TYP E=TDOMAINDOMAINID=E PR112 *DM TDOMAINHOME NWADDR="/111.111.111.121:6660"RMT111 NWADDR="/111.111.111.120:6651"RMT112 NWADDR="/111.111.111.120:6652" *DM LOCAL SERVICES #TOUPPERTOLOWER *DM REMOTE SERVICESTOUPPER #TOLOWER11.8 LoadRu nn er Script vuser in it: vuser_

21、 in itOreturn 0;Actio n: #i nclude "lrt.h" #in clude "re play.vdf"Actio nOlrt_tux pute nv("WSNADDR=/111.111.111.22:6666");Irt_abort_ on_ error();data_O = lrt_t paIIoc("STRING", "", 4);lrt_strc py(data_0, sbuf_1);data_1 = lrt_t paIIoc("STRING&quo

22、t;, "", 4);tp resultnt = lrt_t pcaII("TO UPP ER",data_0,0,& data_1,& ole n.0);lrt_abort_ on_ error();lrt_tp free(data_0);lrt_t pfree(data_1);lrt_t pterm();return 0;vuser end: vuser_e ndO return 0;rep lay.vdf: #ifndef TUXVDF H #define TUXVDF H char* data_0;char* data_1;sta

23、tic const char sbuf_1= "yyy"/* Reply STRING buffer 1 "yyy" "x0"Reply buffer */ #en dif11.9 bang P rogram #in clude #i nclude"atmi.h" #in clude #in clude #in clude #in clude #in cludevoid PrtMillTime(char*);voidscallserver(i ntbufle n,char*sbuf);mai n(void)in t

24、i,j;charsToDo200;charsReqld11;pid_tchild; memset(sToDo,' memset(sReqId,0 ,sizeof(sToDo);0 ,sizeof(sReqld);P rtMillTime(sReqld);prin tf("starttime%sn",sReqld);for(i=0;i<=30;i+)if(child=fork()=-1)/ prin tf("ForkError:%sn",strerror(err no);p ri ntf("ForkErrorn");exi

25、t(1);elseif(child=0)sp ri ntf(sToDo,"%s%dn","/home/tuxa pp/bin/si mp cli",get pi d();for(j=0;j<100;j+)/ PrtMillTime(sReqld);/prin tf("Iamthechild:%ldn",get pid();sprin tf(sToDo,"%d",get pid();scallserver(1,sToDo);exit(2);P rtMillTime(sReqld);prin tf("e

26、 ndtime%sn",sReqld);exit(0);void PrtMillTime(char*sDesc) structtm*tmCurTime;structtimebtbTimeBlock;charszDescri pti on 41;charsRet20;memset(szDescri pti on, 0,sizeof(szDescn pti on); strncpy (szDescri pti on ,sDesc,40); memset(sRet, '0 ,sizeof(sRet);ftime(&tbTimeBlock);tmCurTime=localtime(&t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论