亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪(fǎng)問(wèn)板塊 發(fā)新帖
查看: 3395 | 回復(fù): 0
打印 上一主題 下一主題

CICS Transaction Gateway 與 AIX 工作負(fù)載分區(qū) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2012-01-19 15:54 |只看該作者 |倒序?yàn)g覽
簡(jiǎn)介
IBM® AIX® V6.1 中引入了 WPAR,目的是提供一種方式,在 AIX 邏輯分區(qū) (LPAR) 內(nèi)實(shí)現(xiàn)分區(qū)操作。WPAR 允許將單個(gè) AIX 實(shí)例分布到多個(gè)虛擬分區(qū)中,這樣系統(tǒng)管理員能夠快速部署多個(gè)隔離的 AIX 環(huán)境,同時(shí)沒(méi)有管理單獨(dú) AIX 映像的開(kāi)銷(xiāo)。目前有兩種類(lèi)型的 WPAR:
應(yīng)用程序 WPAR單個(gè)進(jìn)程(及其子進(jìn)程)在其自己的分區(qū)內(nèi)運(yùn)行系統(tǒng) WPAR整個(gè) AIX 環(huán)境可以是共享的或分離的
如果系統(tǒng) WPAR 是共享的,它會(huì)將全局環(huán)境的 /usr 和 /opt 分區(qū)掛載為只讀的并共享這些分區(qū)。如果系統(tǒng) WPAR 是分離的,它有一個(gè)全局環(huán)境的克隆并且所有文件系統(tǒng)都是 WPAR 本地的。圖 1 顯示了在相同 LPAR 中創(chuàng)建的共享 WPAR 和分離 WPAR。共享 WPAR 在全局環(huán)境中對(duì) /usr 和 /opt 只能進(jìn)行讀取操作。分離 WPAR 無(wú)法訪(fǎng)問(wèn)全局環(huán)境并且使用其自己的文件系統(tǒng):

圖 1. 部署系統(tǒng) WPAR

本文將探討不同類(lèi)型的 WPAR 以及在 AIX 上部署 IBM CICS® Transaction Gateway (TG) 時(shí)使用這些 WPAR 的方式。
應(yīng)用程序 WPAR
第一個(gè)也是最簡(jiǎn)單的 WPAR 是應(yīng)用程序 WPAR,它是一個(gè)適合執(zhí)行一個(gè)或多個(gè)應(yīng)用程序進(jìn)程的輕量環(huán)境。對(duì)于在遠(yuǎn)程模式中運(yùn)行的客戶(hù)端應(yīng)用程序,或者在本地模式中運(yùn)行時(shí)使用了 IPIC 協(xié)議的地方,CICS TG 支持應(yīng)用程序 WPAR。圖 2 顯示了在全局環(huán)境中運(yùn)行的 Gateway 守護(hù)進(jìn)程與三個(gè)應(yīng)用程序 WPAR,每個(gè) WPAR 運(yùn)行一個(gè)連接到該 Gateway 守護(hù)進(jìn)程且類(lèi)型不同的應(yīng)用程序:

圖 2. 部署應(yīng)用程序 WPAR

設(shè)置 WPAR
在這個(gè)例子中,Gateway 守護(hù)進(jìn)程在全局環(huán)境中運(yùn)行,因此在 LPAR 中啟動(dòng):
aix7host144 # ctgd start

要在 WPAR 中運(yùn)行的應(yīng)用程序是 Java EciB3 示例,最初是在遠(yuǎn)程模式中運(yùn)行的。由于應(yīng)用程序 WPAR 創(chuàng)建了它自己的環(huán)境,所以 CLASSPATH 并非繼承自全局環(huán)境,并且必須作為命令行參數(shù)傳遞給該應(yīng)用程序。要啟動(dòng)應(yīng)用程序 WPAR,可使用 wparexec 命令和主機(jī)名(在本例中是 ctgwpar1),以及一個(gè)有 IP 地址 (192.168.1.1) 的網(wǎng)絡(luò)棧,這樣應(yīng)用程序才能與 Gateway 守護(hù)進(jìn)程通信:
aix7host # wparexec -h ctgwpar1 -N interface=en0 address=192.168.1.1 netmask=255.255.255.0
/opt/IBM/cicstg/jvm16/bin/java -cp
/opt/IBM/cicstg/classes/ctgsamples.jar:/opt/IBM/cicstg/classes/ctgclient.jar
com.ibm.ctg.samples.eci.EciB3 tcp://aix7host 2006
Starting workload partition 'ctgwpar1'.
Mounting all workload partition file systems.
Loading workload partition.
CICS Transaction Gateway Basic ECI Sample 3

Usage: java com.ibm.ctg.samples.eci.EciB3 [Gateway URL]
                                                               [Gateway Port Number]
                                                               [SSL Keyring
                                                               SSL Password]

To enable client tracing, run the sample with the following Java option:
        -Dgateway.T.trace=on
The address of the gateway has been set to tcp://aix7host port 2006
CICS servers defined:
         1. TS20IPIC – CICS TS IPIC server
         2. TX20 – TXSeries TCP server
         3. TS20 – CICS TS SNA server
Choose server to connect to, or Q to quit: 1

Enter text to send to the CICS program: HELP ME

Program EC03 returned 5 containers in channel "SAMPLECHANNEL":
        [CHAR] CICSDATETIME     = 31/05/2011 15:35:14
        [CHAR] INPUTDATA        = HELP ME
        [CHAR] OUTPUTMESSAGE    = Input data was: HELP ME
         [BIT] INPUTDATALENGTH  = 00000007
        [CHAR] INPUTDATACCSID   =      819
Shutting down all workload partition processes.

進(jìn)程結(jié)束時(shí),會(huì)關(guān)閉 WPAR 并刪除它。要想驗(yàn)證應(yīng)用程序 WPAR 是否與全局環(huán)境中的正確 Gateway 守護(hù)進(jìn)程進(jìn)行了通信,可檢查 Gateway 信息日志:
05/31/11 15:35:03:994 [0] CTG6506I Client connected: [ConnectionManager-0] -
tcp@Socket[addr=/192.168.1.1,port=52127,localport=2006]
05/31/11 15:35:14:453 [0] CTG8429I Established new IPIC connection to CICS server
TS20IPIC with: negotiated session limit=100, CICSAPPLID=IY2GTG20
CICSAPPLIDQUALIFIER=GBIBMIYA, HOSTNAME=cicsserv.ibm.com, PORT=1120,sockets=2
05/31/11 15:35:14:473 [0] CTG6507I Client disconnected: [ConnectionManager-0] -
tcp@Socket[addr=/192.168.1.1,port=52127,localport=2006], reason = Java client
application closed the connection

從上述代碼中可以看到,WPAR 的 IP 地址正在連接并觸發(fā) Gateway,以建立與 CICS 的 IPIC 連接。然后可以讓?xiě)?yīng)用程序返回到本地模式,只需在 CLASSPATH 中添加 ctgserver.jar
# wparexec -h ctgwpar1 -N interface=en0 address=192.168.1.1 netmask=255.255.255.0
/opt/IBM/cicstg/jvm16/bin/java -cp /opt/IBM/cicstg/classes/ctgsamples.jar:
/opt/IBM/cicstg/classes/ctgclient.jar:/opt/IBM/cicstg/classes/ctgserver.jar
     com.ibm.ctg.samples.eci.EciB3
Starting workload partition 'ctgwpar1'.
Mounting all workload partition file systems.
Loading workload partition.
CICS Transaction Gateway Basic ECI Sample 3

Usage: java com.ibm.ctg.samples.eci.EciB3 [Gateway URL]
                                                               [Gateway Port Number]
                                                               [SSL Keyring
                                                               SSL Password]

To enable client tracing, run the sample with the following Java option:
        -Dgateway.T.trace=on

The address of the gateway has been set to local: port 2006

IPIC servers are not listed when running in local mode.
Enter URL of a CICS server, or Q to quit: tcp://winmvs2g:1120

Enter text to send to the CICS program: HELP ME

Program EC03 returned 5 containers in channel "SAMPLECHANNEL":
        [CHAR] CICSDATETIME     = 31/05/2011 16:02:47
        [CHAR] INPUTDATA        = HELP ME
        [CHAR] OUTPUTMESSAGE    = Input data was: HELP ME
         [BIT] INPUTDATALENGTH  = 00000007
        [CHAR] INPUTDATACCSID   =      819Shutting down all workload partition processes.

您還可以運(yùn)行那些在應(yīng)用程序 WPAR 內(nèi)調(diào)用 Remote C ECIv2、ESIv2 和 Statistics API 的應(yīng)用程序。
為何使用 WPAR?
應(yīng)用程序 WPAR 中的客戶(hù)端應(yīng)用程序在其自己隔離的環(huán)境中運(yùn)行,完成自己的網(wǎng)絡(luò)棧,這樣做擁有以下優(yōu)勢(shì):
  • 在監(jiān)控期間很容易識(shí)別應(yīng)用程序?qū)嵗?li>應(yīng)用程序內(nèi)的問(wèn)題不會(huì)影響 LAPR 的其他部分,也不會(huì)影響其中運(yùn)行的任何其他 WPAR。

系統(tǒng) WPAR(共享)
共享的系統(tǒng) WPAR 作為一個(gè) AIX 實(shí)例出現(xiàn),但共享全局環(huán)境的 /usr 和 /opt 文件系統(tǒng),并在 WPAR 中將這些系統(tǒng)掛載為只讀的。下面提供了一個(gè)如何使用 WPAR 運(yùn)行 CICS TG 的例子。圖 3 顯示將一個(gè) CICS TG 安裝配置為在全局環(huán)境中運(yùn)行,在該全局環(huán)境 LPAR 中還有三個(gè)共享的系統(tǒng) WPAR。第一個(gè)系統(tǒng) WPAR 在全局環(huán)境中使用 ctg.ini 配置文件,其他兩個(gè) WPAR 都有其自己的本地配置,但仍使用已安裝的 CICS TG 可執(zhí)行文件。

圖 3. 部署共享系統(tǒng) WPAR

針對(duì)共享安裝設(shè)置 WPAR
第一步是創(chuàng)建 WPAR。在本例中,您要指定:
  • WPAR 名稱(chēng)是 ctgwpar1
  • 安裝是共享的。
  • 主機(jī)名是 ctgwpar1。
  • 網(wǎng)絡(luò)路由信息繼承自全局環(huán)境。
  • 網(wǎng)絡(luò)使用 en0 與給定的 IP 地址。
要?jiǎng)?chuàng)建 WPAR,可使用以下命令:
aix7host # mkwpar -n ctgwpar1 -l -h ctgwpar1 -r -N interface=en0 address=192.168.1.1
netmask=255.255.255.0

WPAR 名稱(chēng)和主機(jī)名不必相同,但測(cè)試表明 SNA 遠(yuǎn)程 API 客戶(hù)端會(huì)查找 WPAR 名稱(chēng),而不是主機(jī)名。如果二者的名稱(chēng)不同,WPAR 名稱(chēng)可能無(wú)法解析為有效的 IP 地址。
aix7host # startwpar -v ctgwpar1
Starting workload partition 'ctgwpar1'.
Mounting all workload partition file systems.
Mounting '/wpars/ctgwpar1'.
Mounting '/wpars/ctgwpar1/home'.
Mounting '/wpars/ctgwpar1/opt'.
Mounting '/wpars/ctgwpar1/proc'.
Mounting '/wpars/ctgwpar1/tmp'.
Mounting '/wpars/ctgwpar1/usr'.
Mounting '/wpars/ctgwpar1/var'.
Loading workload partition.
Exporting workload partition devices.
Exporting workload partition kernel extensions.Starting workload partition subsystem 'cor_ctgwpar1'.
0513-059 The cor_ctgwpar1 Subsystem has been started. Subsystem PID is 11403326.
Verifying workload partition startup.
Return Status = SUCCESS.

aix7host # lswpar
Name      State  Type  Hostname  Directory        RootVG WPAR
--------------------------------------------------------------
ctgwpar1  A      S     ctgwpar1  /wpars/ctgwpar1  no

驗(yàn)證 WPAR 安裝
要想驗(yàn)證 WPAR 已成功創(chuàng)建為共享安裝,可檢查已創(chuàng)建的 WPAR 下的文件系統(tǒng)在 /dev 上已掛載(/opt 和 /usr 是一個(gè)例外,它們?cè)?WPAR 中被掛載為只讀的):
aix7host # df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          1245184    971756   22%    11826     6% /
/dev/hd2          5734400   1507368   74%    62691    16% /usr
/dev/hd9var       1048576    756404   28%     7002     4% /var
/dev/hd3          3145728   3141308    1%      133     1% /tmp
/dev/hd1          1212416   1038192   15%     2919     2% /home
/dev/hd11admin      131072    130692    1%        5     1% /admin
/proc                   -         -    -         -     -  /proc
/dev/hd10opt      2490368   1857964   26%    13218     4% /opt
/dev/livedump 262144 261776 1% 4 1%
/var/adm/ras/livedump
/dev/fslv00 98304 67200 32% 2322 14% /wpars/ctgwpar1
/dev/fslv01 32768 31904 3% 5 1% /wpars/ctgwpar1/home/
opt 2490368 1857964 26% 13218 4% /wpars/ctgwpar1
/opt/proc - - - - -  
/wpars/ctgwpar1/proc
/dev/fslv02 98304 96688 2% 9 1%
/wpars/ctgwpar1/tmp
/usr 5734400 1507368 74% 62691 16%
/wpars/ctgwpar1/usr
/dev/fslv03 131072 110100 17% 363 2%
/wpars/ctgwpar1/var

共享的系統(tǒng) WPAR 有其自己的 IP 地址,因此用戶(hù)可以使用 rlogin 和主機(jī)名遠(yuǎn)程登錄該 WPAR。用戶(hù)登錄后,WPAR 的外觀與普通的 AIX 系統(tǒng)相同。所有文件系統(tǒng)都標(biāo)記為全局并且不能查看 WPAR 外部的任何文件系統(tǒng)。
aix7host # rlogin ctgwpar1
*******************************************************************************
*  Welcome to AIX Version 7.1!                                                                                                *
*  Please see the README file in /usr/lpp/bos for information pertinent to                                    *
*  this release of the AIX Operating System.                                                                              *
*******************************************************************************

ctgwpa1 # df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
Global              98304     67196   32%     2321    14% /
Global              32768     31904    3%        5     1% /home
Global            2490368   1857944   26%    13218     4% /opt
Global                  -         -    -         -     -  /proc
Global              98304     96688    2%        9     1% /tmp
Global            5734400   1507368   74%    62691    16% /usr
Global             131072    110096   17%      364     2% /var

對(duì)于沒(méi)有配置 TCP/IP 的 WPAR,您可使用控制臺(tái)登錄 (clogin) 訪(fǎng)問(wèn)并設(shè)置 WPAR,但是由于沒(méi)有網(wǎng)絡(luò)棧,所以無(wú)法使用 CICS TG。
在共享的系統(tǒng) WPAR 中安裝 CICS TG
在共享的 WPAR 中,您必須在全局環(huán)境中安裝 CICS TG,因?yàn)?WPAR 只能對(duì) /opt 進(jìn)行只讀訪(fǎng)問(wèn),而 CICS TG 安裝在 /opt 中。請(qǐng)運(yùn)行產(chǎn)品安裝程序:
aix7host # ./installer -i console
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

接受所有默認(rèn)值。在全局環(huán)境中,應(yīng)該可成功安裝 CICS TG。要確認(rèn)在全局環(huán)境和 WPAR 中均可訪(fǎng)問(wèn)該產(chǎn)品,請(qǐng)執(zhí)行以下命令:
aix7host # type cicscli
cicscli is /usr/bin/cicscli

ctgwpar1 # type cicscli
cicscli is /usr/bin/cicscli

在共享的系統(tǒng) WPAR 中運(yùn)行 CICS TG
默認(rèn)情況下,在共享的系統(tǒng) WPAR 安裝中,配置文件在所有共享 WPAR 之間是共享的,因?yàn)樵撆渲梦募挥?/opt/IBM/cicstg/bin 目錄中。共享一個(gè)配置對(duì)于到 CICS 的 TCP/IP 連接效果很好。但是對(duì)于 SNA 和 IPIC(需要獨(dú)特的值來(lái)識(shí)別 Gateway 實(shí)例),共享是受限制的,只有使用該配置連接到 CICS 的首個(gè) Gateway 能建立連接。其他連接都被拒絕。
計(jì)劃使用 ctgd 將 CICS TG 作為初始任務(wù)運(yùn)行時(shí),能夠克服這種共享限制,方法是在每個(gè)系統(tǒng) WPAR 中設(shè)置 CTGDCONF 環(huán)境變量,讓其指向本地 ctgd.conf,該 ctgd.conf 將 CICSCLI 環(huán)境變量設(shè)置為 WPAR 中的 ctg.ini 文件,該文件中包含了 CICS TG 實(shí)例的惟一標(biāo)識(shí)符。ctgd 進(jìn)程在使用默認(rèn)值之前會(huì)檢查該環(huán)境變量是否存在。如果沒(méi)有使用 ctgd,而是使用 ctgstart 或 cicscli,那么您必須設(shè)置 CICSCLI 環(huán)境變量,讓它直接指向 ctg.ini 本地文件。在這個(gè)例子中,我們使用 ctgd 啟動(dòng) CICS TG:
首先,在全局環(huán)境中復(fù)制兩個(gè)配置文件,并將文件副本保存在 WPAR 中,這樣可以修改這些文件副本:
aix7host # cp ctgd.conf ctg.ini /wpars/ctgwpar1/tmp

轉(zhuǎn)到 WPAR,并修改 ctgd.conf 文件,以便讓 CICSCLI 變量指向本地 local ctg.ini 文件:
#-----------------------------------------------------------------------
# Location of ctg.ini file. Set this to specify a location for ctg.ini,
# other than the default <install_path>/bin/ctg.ini.

#CICSCLI=<install_path>/bin/ctg.ini
CICSCLI=/tmp/ctg.ini

接下來(lái)更新 ctg.ini 文件,更改 Gateway 的 APPLID 和 SNA 本地 LU 名稱(chēng),使這些名稱(chēng)都是惟一的,并且不同于全局環(huán)境中的名稱(chēng):
SECTION PRODUCT
    APPLID=CTGWPAR1
    APPLIDQUALIFIER=CHRSQUAL
    DEFAULTSERVER=TX20
ENDSECTION

SECTION SERVER = TS20
    SRVIDLETIMEOUT=0
    PROTOCOL=SNA
    UPPERCASESECURITY=N
    LOCALLUNAME=CTGCM01
    MODENAME=LU62PS
    NETNAME=GBIBMIYA.IY2GTG20
    PARTNERLUALIAS=N
ENDSECTION

最后在 WPAR 中設(shè)置 CTGDCONF 環(huán)境變量,這樣共享的 ctgd 副本可以找到本地配置:
ctgwpar1 # export CTGDCONF=/tmp/ctgd.conf

如果在 WPAR 和全局環(huán)境中啟動(dòng) CICS TG,SNA 和 IPIC 應(yīng)該都能正常運(yùn)行:
aix7host # ctgd start
CICS Transaction Gateway, Version 8.0.0.1 : Build Level c800-20101014
(C) Copyright IBM Corporation 2004, 2010. All rights reserved.
Starting IBM CICS Transaction Gateway: started as root:system
ctgwpar1 # ctgd start
CICS Transaction Gateway, Version 8.0.0.1 : Build Level c800-20101014
(C) Copyright IBM Corporation 2004, 2010. All rights reserved.
Starting IBM CICS Transaction Gateway: started as root:system

檢查日志,確保正在使用正確的 ctg.ini,并且 Gateway APPLID 是正確且惟一的:
在全局環(huán)境中:
06/23/11 18:12:47:206 [2] *** IBM CICS Transaction Gateway log V8.0.0.1 Build Level
c800-20101014 ***
06/23/11 18:12:47:103 [0] CTG6400I CICS Transaction Gateway is starting
06/23/11 18:12:47:189 [0] CTG8448I Command line options updated adminport to be2810
06/23/11 18:12:47:221 [0] CTG8400I Using configuration file /opt/IBM/cicstg/bin/ctg.ini
06/23/11 18:12:47:221 [0] CTG8426I The applid is CTGGE
06/23/11 18:12:47:221 [0] CTG8427I The applid qualifier is CHRSQUAL

在 ctgwpar1 上:
06/23/11 18:14:51:022 [2] *** IBM CICS Transaction Gateway log V8.0.0.1 Build Level
c800-20101014 ***
06/23/11 18:14:50:785 [0] CTG6400I CICS Transaction Gateway is starting
06/23/11 18:14:51:000 [0] CTG8448I Command line options updated adminport to be 2810
06/23/11 18:14:51:025 [0] CTG8400I Using configuration file /tmp/ctg.ini
06/23/11 18:14:51:025 [0] CTG8426I The applid is CTGWPAR1
06/23/11 18:14:51:026 [0] CTG8427I The applid qualifier is CHRSQUAL

現(xiàn)在 Gateway 守護(hù)進(jìn)程都已正確啟動(dòng),您可運(yùn)行一個(gè)示例來(lái)確認(rèn)到 CICS 的 IPIC 連接正在工作。執(zhí)行以下命令:
aix7host # cat run_me.sh
#!/bin/ksh/
opt/IBM/cicstg/jvm16/bin/java -cp
/opt/IBM/cicstg/classes/ctgserver.jar:/opt/IBM/cicstg/classes/ctgsamples.jar:
/opt/IBM/cicstg/classes/ctgclient.jar com.ibm.ctg.samples.eci.EciB1 tcp://aix7host 2006

aix7host # ./run_me.sh

CICS Transaction Gateway Basic ECI Sample 1

Usage: java com.ibm.ctg.samples.eci.EciB1 [Gateway URL]
                                                               [Gateway Port Number]
                                                               [SSL Keyring]
                                                               [SSL Password]
To enable client tracing, run the sample with the following Java option:
-Dgateway.T.trace=on

The address of the Gateway has been set to tcp://aix7host Port:2006

CICS Servers Defined:
         1. TS20IPIC – CICS TS IPIC server
         2. TX20 – TXSeries TCP server
         3. TS20 – CICS TS SNA server

Choose Server to connect to, or q to quit:
1

Program EC01 returned with data:-

        Hex: 32332f30362f31312031393a31323a35380
        ASCII text: 23/06/11 19:12:58

ctgwpar1 # ./run_me.sh

CICS Transaction Gateway Basic ECI Sample 1

Usage: java com.ibm.ctg.samples.eci.EciB1 [Gateway URL]
                                                               [Gateway Port Number]
                                                               [SSL Keyring]
                                                               [SSL Password]

To enable client tracing, run the sample with the following Java option:
-Dgateway.T.trace=on

The address of the Gateway has been set to tcp://ctgwpar1 Port:2006

CICS Servers Defined:
         1. TS20IPIC – CICS TS IPIC server
         2. TX20 – TXSeries TCP server
         3. TS20 – CICS TS SNA server

Choose Server to connect to, or q to quit:
1

Program EC01 returned with data:-

        Hex: 32332f30362f31312031393a31323a35390
        ASCII text: 23/06/11 19:12:59

現(xiàn)在可通過(guò) SNA 測(cè)試 CICS 連接。為了讓 SNA 守護(hù)進(jìn)程正確啟動(dòng),必須在 WPAR 中復(fù)制 /etc/sna/sna_clnt.net 文件。
aix7host # ./ecib1
CICS Transaction Gateway Basic ECI V1 Sample

Servers defined in the Client daemon:
   1.TX20
   2.TS20

Choose server to connect to:
2
Program EC01 returned with data: 24/06/11 10:42:10

ctgwpar1 # ./ecib1
CICS Transaction Gateway Basic ECI V1 Sample

Servers defined in the Client daemon:
   1.TX20
   2.TS20

Choose server to connect to:
2
Program EC01 returned with data: 24/06/11 10:47:57

查看客戶(hù)端信息日志,確認(rèn)兩個(gè)程序分別在其各自的本地 LU(CTGCM01 和 CTGCM02)下運(yùn)行:
aix7host # cat /var/cicscli/cicscli_info.log
06/24/11 10:36:15.491 [0049] CCL:CCL0200I *** IBM CICS Transaction Gateway Client log for
'AIX' '8.0.0.1' Build Level 'c800-20101014' ***
06/24/11 10:36:15.508 [2239] CCL:CCL2239I Server 'TX20' is configured to use the TCP/IP
protocol with NETNAME 'cicsserv.ibm.com' and PORT '7720'
06/24/11 10:36:15.513 [2238] CCL:CCL2238I Server 'TS20' is configured to use the SNA
protocol with NETNAME 'GBIBMIYA.IY2GTG20' and LOCALLUNAME 'CTGCM02'
06/24/11 10:36:15.520 [2224] CCL:CCL2218I The initialization of the Client daemon is
complete
06/24/11 10:42:10.296 [2228] CCL:CCL2222I About to connect to server 'TS20'
06/24/11 10:42:10.493 [2229] CCL:CCL2223I Connected to server 'TS20 ' using 'SNA' to
'GBIBMIYA.IY2GTG20'

06/24/11 10:47:33.798 [0049] CCL:CCL0200I *** IBM CICS Transaction Gateway Client log for
'AIX' '8.0.0.1' Build Level 'c800-20101014' ***
06/24/11 10:47:33.807 [2239] CCL:CCL2239I Server 'TX20' is configured to use the TCP/IP
protocol with NETNAME 'cicsserv.ibm.com' and PORT '7720'
06/24/11 10:47:33.811 [2238] CCL:CCL2238I Server 'TS20' is configured to use the SNA
protocol with NETNAME 'GBIBMIYA.IY2GTG20' and LOCALLUNAME 'CTGCM01'
06/24/11 10:47:33.819 [2224] CCL:CCL2218I The initialization of the Client daemon is
complete
06/24/11 10:47:54.605 [2228] CCL:CCL2222I About to connect to server 'TS20'
06/24/11 10:47:57.176 [2229] CCL:CCL2223I Connected to server 'TS20 ' using 'SNA' to
'GBIBMIYA.IY2GTG20'

為何使用共享的系統(tǒng) WPAR?
對(duì)于共享的系統(tǒng) WPAR 拓?fù),其主要?yōu)勢(shì)在于包括 CICS TG、SNA 遠(yuǎn)程 API 客戶(hù)端和 C/C++ 編譯器在內(nèi)的系統(tǒng)軟件只需在全局環(huán)境中安裝一次,然后所有共享的系統(tǒng) WPAR 都可使用這些軟件了,無(wú)需安裝任何額外的內(nèi)容。因此與非共享的 WPAR 相比,共享的系統(tǒng) WPAR 所占用的空間相對(duì)較小。
在共享的系統(tǒng) WPAR 場(chǎng)景中(例如通過(guò) TCP/IP 與 CICS 通信),所有 CICS TG 實(shí)例的配置可以是公共的。如果必須惟一地標(biāo)識(shí) Gateway 守護(hù)進(jìn)程(例如使用 IPIC 或 SNA 協(xié)議與 CICS 進(jìn)行通信),那么每個(gè) WPAR 必須有自己的本地配置,并且該配置必須與全局環(huán)境分開(kāi)管理。共享的系統(tǒng) WPAR 還讓您可以更高效地利用 LPAR,并且可以在全局環(huán)境中創(chuàng)建工作負(fù)載管理器,從而在多個(gè) WPAR 之間分配負(fù)載。
分離的系統(tǒng) WPAR
分離的系統(tǒng) WPAR 看似一個(gè)完全獨(dú)立的 AIX 安裝,具有自己的隔離文件系統(tǒng)和網(wǎng)絡(luò)棧。使用分離的系統(tǒng) WPAR 運(yùn)行 CICS TG 的例子如下所示。圖 4 顯示了在全局環(huán)境中安裝的 CICS TG 以及三個(gè)分離的系統(tǒng) WPAR。與前面小節(jié)中共享的系統(tǒng) WPAR 不同,這些安裝是隔離的,程序和配置文件也是單獨(dú)安裝的:

圖 4. 部署分離的系統(tǒng) WPAR

為私有安裝 (private install) 設(shè)置分離的系統(tǒng) WPAR
設(shè)置分離的系統(tǒng) WPAR 的第一步是創(chuàng)建該 WPAR。在這個(gè)例子中,您要指定:
  • WPAR 名稱(chēng)是 ctgwpar4。
  • 安裝是私有的(與全局環(huán)境分離)。
  • 主機(jī)名是 ctgwpar4。
  • 網(wǎng)絡(luò)路由信息繼承自全局環(huán)境。
  • 設(shè)置網(wǎng)絡(luò)使用 en0 與給定的 IP 地址。
aix6host # mkwpar -n ctgwpar4 -l -h ctgwpar4 -r -N interface=en0 address=192.168.1.2
netmask=255.255.255.0

對(duì)于共享的系統(tǒng) WPAR 部分,WPAR 名稱(chēng)和主機(jī)名不必相同,但測(cè)試表明 SNA 遠(yuǎn)程 API 客戶(hù)端會(huì)查找 WPAR 名稱(chēng),而不是主機(jī)名。如果二者的名稱(chēng)不同,WPAR 名稱(chēng)可能無(wú)法解析為有效的 IP 地址。
設(shè)置 WPAR 的過(guò)程需要點(diǎn)時(shí)間,因?yàn)橐?WPAR 內(nèi)創(chuàng)建 AIX 環(huán)境的一個(gè)副本。該過(guò)程完成后即可啟動(dòng) WPAR:
aix6host # startwpar -v ctgwpar4
Starting workload partition 'ctgwpar4'.
Mounting all workload partition file systems.
Mounting '/wpars/ctgwpar4'.Mounting '/wpars/ctgwpar4/home'.
Mounting '/wpars/ctgwpar4/opt'.
Mounting '/wpars/ctgwpar4/proc'.
Mounting '/wpars/ctgwpar4/tmp'.
Mounting '/wpars/ctgwpar4/usr'.
Mounting '/wpars/ctgwpar4/var'.
Loading workload partition.
Exporting workload partition devices.
Starting workload partition subsystem 'cor_ctgwpar4'.
0513-059 The cor_ctgwpar4 Subsystem has been started. Subsystem PID is 11206788.
Verifying workload partition startup.
Return Status = SUCCESS.
aix6host # lswpar
Name      State  Type  Hostname   Directory         RootVG WPAR
----------------------------------------------------------------
ctgwpar4  A      S     ctgwpar4   /wpars/ctgwpar4   no

驗(yàn)證分離的系統(tǒng) WPAR 安裝
從 LPAR 中檢查已掛載的文件系統(tǒng)對(duì)于該分離的 WPAR 安裝是正確的。所創(chuàng)建的 WPAR 下的所有文件系統(tǒng)都被掛載到 /dev 上,這一點(diǎn)與共享的系統(tǒng) WPAR 不同,后者的掛載點(diǎn)(如 /wpars/CTG_WPAR1/opt)使用文件 systems/opt(只讀模式)。
aix6host # df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           327680    133972   60%    10820    25% /
/dev/hd2          7602176   4960396   35%    55415     5% /usr
/dev/hd9var        720896    373892   49%    12479    13% /var
/dev/hd3          2293760   2159324    6%      167     1% /tmp
/dev/hd1            65536     65144    1%       15     1% /home
/dev/hd11admin      131072    130692    1%        5     1% /admin
/proc                   -         -    -         -     -  /proc
/dev/hd10opt      2555904   2045364   20%    12617     3% /opt
/dev/livedump      262144    261776    1%        4     1% /var/adm/ras/livedump
/dev/fslv00        131072     82264   38%     2977    14% /wpars/ctgwpar4
/dev/fslv01         65536     64156    3%        5     1% /wpars/ctgwpar4/home
/dev/fslv02       2555904   2035252   21%    12614     3% /wpars/ctgwpar4/opt
/proc                   -         -    -         -     -  /wpars/ctgwpar4/proc
/dev/fslv03        131072    128420    3%       10     1% /wpars/ctgwpar4/tmp
/dev/fslv10       7602176   4874528   36%    53437     5% /wpars/ctgwpar4/usr
/dev/fslv11        131072     53320   60%     2755    19% /wpars/ctgwpar4/var

與共享的 WPAR 一樣,分離的系統(tǒng) WPAR 有其自己的 IP 地址,因此用戶(hù)使用 rlogin 和 TCP/IP 主機(jī)名可遠(yuǎn)程登錄該 WPAR。分離的系統(tǒng) WPAR 在用戶(hù)看來(lái)就像普通的 AIX 系統(tǒng);每個(gè)文件系統(tǒng)看似都是全局的,而 WPAR 外部的任何內(nèi)容都看不到。
aix6host # rlogin ctgwpar4
*******************************************************************************
*  Welcome to AIX Version 6.1!                                                                                                *
*                                                                                                                                           *
*  Please see the README file in /usr/lpp/bos for information pertinent to                                    *
*  this release of the AIX Operating System.                                                                              *
*******************************************************************************
Last login: Thu 26 May 15:14:20 2011 on /dev/pts/0 from 192.168.1.3

ctgwpar4 # df -k
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
Global             131072     82216   38%     2991    14% /
Global              65536     64156    3%        5     1% /home
Global            2555904   2035660   21%    12614     3% /opt
Global                  -         -    -         -     -  /proc
Global             131072    128420    3%       12     1% /tmp
Global            7602176   4936516   36%    55414     5% /usr
Global             131072     49436   63%     2818    20% /var

如果沒(méi)有為 WPAR 配置 TCP/IP,您可使用 clogin (console login) 訪(fǎng)問(wèn)并配置該 WPAR,由于沒(méi)有 TCP/IP 棧,所以無(wú)法使用 CICS TG。
使用分離的系統(tǒng) WPAR 的缺點(diǎn)在于:創(chuàng)建 WPAR 時(shí)會(huì)使用默認(rèn)的分區(qū)大小,而為了提供足夠的空間安裝軟件棧,可能需要增加分區(qū)的大小。在本例中,/tmp 目錄空間太小,無(wú)法存儲(chǔ) CTG 安裝程序的副本,所以我們?cè)谌汁h(huán)境中增加其大。
aix6host # chfs -a size=+1G /wpars/CTG_WPAR1/tmp
Filesystem size changed to 2359296
Inlinelog size changed to 8 MB.
aix6host # cp installer /wpars/CTG_WPAR1/tmp

在分離的系統(tǒng) WPAR 中安裝 CICS TG
運(yùn)行產(chǎn)品安裝程序:
ctgwpar4 # ./installer -i console
Preparing to install..
.Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...

接受所有默認(rèn)值。CICS TG 應(yīng)該能成功安裝到 WPAR 中。要想驗(yàn)證安裝情況,可對(duì)比全局環(huán)境中的 /opt/IBM 與 WPAR 中的/opt/IBM
aix6host # ls -l /opt/IBM
total 16
drwxr-xr-x   28 root     system         4096 24 May 17:38 ITM
drwxr-xr-x    2 root     system         4096 24 May 16:40 sysmgtlib

ctgwpar4 # ls -l /opt/IBM
total 24
drwxrwxr-x   17 root     system         4096 26 May 15:46 cicstg
drwxr-xr-x   28 root     system         4096 24 May 17:38 ITM
drwxr-xr-x    2 root     system         4096 24 May 16:40 sysmgtlib

添加 SNA 遠(yuǎn)程 API 客戶(hù)端和 XL C 編譯器
有兩種方式安裝那些使用本機(jī) AIX 安裝程序的應(yīng)用程序:
  • 多個(gè)時(shí)間(每個(gè)系統(tǒng) WPAR 一個(gè)時(shí)間)
  • 在全局環(huán)境中使用單一時(shí)間,然后將所有文件的同步副本設(shè)置到每個(gè)系統(tǒng) WPAR 中。
SNA 遠(yuǎn)程 API 客戶(hù)端和 xlC/C++ 編譯器都使用本機(jī) AIX 安裝程序。對(duì)于本例,我們將使用單一時(shí)間方法安裝這些軟件,這樣做的好處在于盡管在單一時(shí)間安裝這些軟件,但每個(gè)軟件實(shí)例都在其自己的 WPAR 中獨(dú)立運(yùn)行。
Smit 在安裝時(shí)提供了選項(xiàng),允許您在所有分離的 WPAR 中安裝軟件。如果將該選項(xiàng)設(shè)為 no,可在以后運(yùn)行以下命令,手動(dòng)同步 WPAR:
aix6host # syncroot
syncroot: Processing root part installation status.
syncroot: Installp root packages are currently synchronized.
syncroot: RPM root packages are currently synchronized.
syncroot: Root part is currently synchronized.
syncroot: Returns Status = SUCCESS

每個(gè)系統(tǒng) WPAR 現(xiàn)在都作為一個(gè)隔離的 SNA 客戶(hù)端運(yùn)行并且可使用 C/C++ 編譯器。
在分離的系統(tǒng) WPAR 中配置 Gateway 守護(hù)進(jìn)程
您可使用配置工具配置 Gateway。此配置對(duì)于該 WPAR 而言是本地的,所以您必須確保 APPLID 和 SNA 本地 LU 是惟一的。
如果未引用 JVM,則更新 Java 的 PATH:
ctgwpar4 # export PATH=/opt/IBM/cicstg/jvm16/binPATH

配置 Gateway 守護(hù)進(jìn)程,使其具有 TCP/IP、SNA 和 IPIC 服務(wù)器定義,并確保將日志寫(xiě)入到文件中,而不是控制臺(tái)。還必須啟用 Gateway TCP 和統(tǒng)計(jì)端口處理程序。現(xiàn)在將 ini 文件保存到 WPAR 中的 /opt/IBM/cicstg/bin 中。在本例中,使用 ctgstart 啟動(dòng) Gateway 守護(hù)進(jìn)程,F(xiàn)在您應(yīng)該驗(yàn)證 Gateway 可正確啟動(dòng)并在正確的端口上進(jìn)行偵聽(tīng):
ctgwpar4 # ctgstart
*** IBM CICS Transaction Gateway log V8.0.0.1 Build Level c800-20101014 ***
(C) Copyright IBM Corporation 1996, 2010.  All rights reserved.
CTG6508I To shut down the Gateway daemon type
CTG6493I    Q or - for normal shutdown
CTG6494I    I for immediate shutdown

ctgwpar4 # more /var/cicscli/ctg_info.log
05/27/11 11:19:40:670 [2] *** IBM CICS Transaction Gateway log V8.0.0.1 Build Level
c800-20101014 ***
05/27/11 11:19:40:626 [0] CTG6400I CICS Transaction Gateway is starting
05/27/11 11:19:40:661 [0] CTG8448I Command line options updated adminport to be 2810
05/27/11 11:19:40:673 [0] CTG8400I Using configuration file /opt/IBM/cicstg/bin/ctg.ini
05/27/11 11:19:40:673 [0] CTG8461I Successfully initialized trace plug-in 'com.ibm.ctg.client.FileTrace'
05/27/11 11:19:40:676 [0] CTG6577I Java details: Version=1.6.0, Vendor=IBM Corporation, Path=/opt/IBM/cicstg/jvm16/bin/java
05/27/11 11:19:40:710 [0] CTG6981I Successfully initialized JNI library
05/27/11 11:19:40:758 [0] CTG6502I Initial Connection managers = 1, Maximum Connection managers = 100
05/27/11 11:19:40:759 [0] CTG6526I Initial workers = 1, Maximum workers = 100
05/27/11 11:19:40:763 [0] CTG6505I Successfully created the initial connection manager and Worker threads
05/27/11 11:19:40:771 [0] CTG6524I Successfully started handler for the tcp: protocol on port 2006
05/27/11 11:19:40:774 [0] CTG6524I Successfully started handler for the statsapi: protocol on port 2980
05/27/11 11:19:40:775 [0] CTG8455I Successfully started the local administration handler on port 2810
05/27/11 11:19:40:788 [0] CTG6512I CICS Transaction Gateway initialization complete
05/27/11 11:19:40:800 [0] CTG6411I Interval statistics are active. The statistics  interval length is set to 3 hours, 0 minutes and 0 seconds. The statistics end of day time is set to 00:00:00 Greenwich Mean Time.

現(xiàn)在您可以通過(guò)引用該 Gateway 的 IPIC 連接發(fā)送一個(gè)示例請(qǐng)求:
ctgwpar4 # ./ctgecib3 ctwpar4 2006
CICS Transaction Gateway Basic ECI V2 Sample 3

Usage: ctgecib3 [hostname] [port number]

Connected to CICS TG on ctgwpar4 using port 2006
Servers returned from CICS TG:
     1. TS20IPIC – CICS TS IPIC server
     2. TX20 – TXSeries TCP server
     3. TS20 – CICS TS SNA server
Choose server to connect to, or q to quit:
1
Enter text to send to the CICS program (max 12:
HELP ME!
Program EC03 returned containers:
    [BIT]  INPUTDATALENGTH = 00000007
   [CHAR]   INPUTDATACCSID =      819
   [CHAR]    OUTPUTMESSAGE = Input data was: HELP ME
   [CHAR]     CICSDATETIME = 27/05/2011 14:43:23
   [CHAR]        INPUTDATA = HELP ME
Closed connection to CICS Transaction Gateway
ctgecib3 completed successfully

驗(yàn)證 SNA 在 WPAR 中可正常工作,方法是編譯并運(yùn)行 ecia1 示例,它可測(cè)試 TCP/IP 和 SNA 等連接:
ctgwpar4 # export PATH=/usr/vac/binPATH
ctgwpar4 # make -f samp.mak

Creating Advanced ECI C Sample
        cc_r -c -g -DCICS_AIX -I../../../include -I../../include ecia1.c
cc_r -o ecia1 ecia1.o -L../../../lib -L/opt/IBM/cicstg/lib -lpthreads -lc_r
-lcclaix

ctgwpar4 # ./ecia1
CICS Transaction Gateway Advanced ECI V1 Sample

SYNTAX :
  ecia1 <Threads> <Calls> <SYNC|ASYNC> [-DEBUG]
    where
  Threads    = Number of threads to run per server (Default=5)
  Calls      = Number of ECI calls to make per thread (Default=10)
  SYNC/ASYNC = Do (a)synchronous eci calls (Default=SYNC)
  -DEBUG     = Show all messages (Default is off)

Running with:
2 Servers
5 Threads per server
10 ECI calls per thread
Call type is synchronous
MAIN : Threads all started - Starting test
MAIN : Threads all finished - Results follow:
Server : TX20    , overall average time in seconds 0.020060
Server : TS20    , overall average time in seconds 0.023860
Press enter to terminate

為何使用分離的系統(tǒng) WPAR?
分離的系統(tǒng) WPAR 可提供 LPAR 的優(yōu)勢(shì),但占用的處理器時(shí)間和內(nèi)存較少,這樣就可以進(jìn)一步將 LPAR 劃分為多個(gè)子管理資源,同時(shí)仍在同一 LPAR 內(nèi)運(yùn)行多個(gè) Gateway。更高的 LPAR 利用率允許您在全局環(huán)境中創(chuàng)建工作負(fù)載管理器,并在多個(gè) WPAR 之間分布負(fù)載。
在現(xiàn)有拓?fù)渲惺褂?WPAR
本節(jié)探討幾個(gè)可使用 WPAR 的場(chǎng)景。
擴(kuò)展使用 TCP/IP 連接的現(xiàn)有 LPAR 的容量
在該場(chǎng)景中,CICS TG 已安裝并已配置,在 LPAR 中運(yùn)行。通過(guò) TCP/IP 連接到 CICS。此處使用共享的系統(tǒng) WPAR,您可運(yùn)行多個(gè) CICS TG 配置實(shí)例,每個(gè)配置都有自己的網(wǎng)絡(luò)棧。該場(chǎng)景更好地利用了 LPAR 資源,同時(shí)單個(gè)產(chǎn)品安裝和單個(gè)配置讓維護(hù)開(kāi)銷(xiāo)也降低了。
同時(shí)運(yùn)行多個(gè) CICS TG 版本
在該場(chǎng)景中有多個(gè)機(jī)器或 LPAR,每個(gè) LPAR 中托管著不同版本的 CICS TG。這種拓?fù)浜芸赡苁褂么罅康臋C(jī)器資源或 LPAR 資源。一種更為高效的解決方案是將硬件整合到單個(gè) LPAR 中,讓每個(gè)軟件實(shí)例都作為一個(gè)分離的系統(tǒng) WPAR 運(yùn)行。
在部署前測(cè)試軟件的新版本
該場(chǎng)景與上一個(gè)類(lèi)似。使用分離的系統(tǒng) WPAR 與現(xiàn)有的應(yīng)用程序在當(dāng)前操作環(huán)境中測(cè)試 CICS TG 的新版本。這對(duì)現(xiàn)有的安裝和配置沒(méi)有任何影響。
在同一 LPAR 中運(yùn)行多個(gè)應(yīng)用程序
在同一 LPAR 中運(yùn)行多個(gè)長(zhǎng)時(shí)間的應(yīng)用程序時(shí),您可在每個(gè)應(yīng)用程序自己的 WPAR 中運(yùn)行該程序。這樣可以將每個(gè)應(yīng)用程序與系統(tǒng)的其他部分隔離,所以如果某個(gè)應(yīng)用程序出現(xiàn)故障,則故障僅限于該 WPAR 內(nèi),不會(huì)影響其他應(yīng)用程序。
結(jié)束語(yǔ)
本文介紹了兩類(lèi) WPAR:應(yīng)用程序 WPAR 和系統(tǒng) WPAR,并展示了 CICS TG 如何與這些 WPAR 互操作。本文還介紹了部署 WPAR 與 CICS TG 可實(shí)現(xiàn)顯著優(yōu)勢(shì)的各種客戶(hù)場(chǎng)景。

關(guān)于作者
Chris Mawer 是英國(guó) Hursley IBM Software Lab 的 CICS Transaction Gateway 團(tuán)隊(duì)高級(jí)測(cè)試人員。他負(fù)責(zé)領(lǐng)導(dǎo) ECI V2 和 Microsoft .NET 測(cè)試團(tuán)隊(duì)。Chris Mawer 畢業(yè)于曼徹斯特大學(xué),于 2001 年加入 IBM,成為 ICS Transaction Gateway Level 3 支持團(tuán)隊(duì)中的一員,在此他全面了解了 CICS Transaction Gateway 及其客戶(hù)。2008 年,他轉(zhuǎn)到 CICS Transaction Gateway 測(cè)試團(tuán)隊(duì),并在測(cè)試和測(cè)試策略方面扮演著重要角色。最近,他還參與了客戶(hù)場(chǎng)景和性能測(cè)試工作。




http://www.ibm.com/developerworks/cn/websphere/library/techarticles/1111_mawer/1111_mawer.html


您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP