IBM TXSeries CICS8.2.2 For Linux 下 WLM配置說明文檔-單機版

1 開始配置 TXSeries 的 WLM 前,需要先了解幾個 WLM 的概念。
a) PLEX: Plex is a group of intercommunicating TXSeries Systems.
b) COR: COR is Client Owning Region. This region handles the incoming requests from the clients.
c) AOR: AOR is Application Owning Region. The business applications are deployed in an AOR.
d) ROUTING MONITOR: Applications that monitor the WLM plex.
e) WAP: WAP is WLM Application Program Cache. The WAP is the central control point of a CICS WLM configuration. The initial configuration information and updates to the
configuration are deposited in the WAP.
f) WCM: WCM is WLM cache manager located on each server on which a workload management routing decision occurs. The WAP cache transfers data to the local WCM
cache.
g) HMON : It is Health Monitor application that monitors health of the regions in WLM.
以下是 WLM 的目錄結構:
目錄 描述
/opt/ibm/cicssm Directory contains all the WLM runtime components, samples
/opt/ibm/cicssm/msg Directory contains language specific message catalogue files for WLM components
/opt/ibm/cicssm/lib Directory contains WLM runtime components
/opt/ibm/cicssm/bin Directory contains WLM runtime executables and setup scripts
/opt/ibm/cicssm/samples Makefile to setup WLM environment, sample client applications
/var/cicssm Directory contains all the WLM specific configuration, data and log files.
/var/cicssm/log Directory contains console messages from the WLM processes. Trace and debug messages are also created under this directory, if enabled.
/var/cicssm/repos Directory contains the WLM configuration file
2 TxseriesWLM Region 配置
此文檔中, COR 為 CORSC、 AOR 為 AOR1SC、 AOR2SC
2.1 COR ( Client Owning Region ) 配置
2.1.1 創建 COR
執行命令:
cicscp –v create region CORSC DefaultFileServer=/.:/cics/sfs/rhel7SFS
2.1.2 更新 Region 定義
a ) RD 定義
#SysId 用於 wlm 的配置,也是 AOR CD 到 COR 的 CD 名稱
#出口程序需要緩存在內存中,不退出,所以需要設置 ProgramCacheSize
cicsupdate -c rd -r CORSC LocalSysId=COR1
cicsupdate -c rd -r CORSC ProgramCacheSize=10//主要為了緩存 3 個出口程序
b) PD 定義
#以下三個 PD 是 wlm 的出口程序, COR 都需要配置上
cicsadd -c pd -r CORSC BHGDPL PathName=/opt/ibm/cicssm/bin/bhgdpl UserExitNumber=50 Resident=yes
cicsadd -c pd -r CORSC BHGDPLSP PathName=/opt/ibm/cicssm/bin/bhgdplsp UserExitNumber=51 Resident=yes
cicsadd -c pd -r CORSC BHGDTR PathName=/opt/ibm/cicssm/bin/bhgdtr UserExitNumber=25 Resident=yes
#測試用的 PD,此 PD 不需要寫具體路徑,只需要寫 RemoteSysID,此 ID 為
#COR 到 AOR 的默認路由,也是 COR 里 CD 的名稱之一
cicsadd -c pd -r CORSC IBMTRAN RemoteSysId=AOR1 RSLKey=public
c) LD 定義
#TCPService 的值需要在/etc/services 裡面配置(CORSC,AOR1SC,AOR2SC的LD定義里的TCPService的值 在/etc/services的設置在文章最後附上)
cicsadd -c ld -r CORSC LD01 Protocol=TCP TCPAddress=rhel7 TCPService=tcpcor1sc
d) CD 定義
cicsadd -c cd -r CORSC AOR1 ConnectionType=cics_tcp RemoteLUName=AOR1SC ListenerName=LD01 RemoteTCPAddress=rhel7 RemoteTCPPort=29002
cicsadd -c cd -r CORSC AOR2 ConnectionType=cics_tcp RemoteLUName=AOR2SC ListenerName=LD01 RemoteTCPAddress=rhel7 RemoteTCPPort=29003
2.1.3 環境變量配置
保證 environment 中 LIBPATH 中包含/opt/ibm/cicssm/lib 部分,否則加載出
口程序無法加載成功, COR 無法在 WAP 中註冊。
LIBPATH=/opt/ibm/cicssm/lib:/opt/ibm/cics/lib
2.2 AOR ( Application Owning Region ) 配置
2.2.1 創建 AOR
cicscp -v create region AOR1SC
cicscp -v create region AOR2SC
2.2.2 更新 Region 定義
a ) RD 定義
#SysId 用於 wlm 的配置,也是 COR CD 到 AOR 的 CD 名稱
cicsupdate -c rd -r AOR1SC LocalSysId=AOR1
cicsupdate -c rd -r AOR2SC LocalSysId=AOR2
#以下配置是用於 AOR 與 WAP 的通訊,啟動、停止的時候往 wlmlistener
發送相關數據消息通知 WAP AOR 啟動、停止了。 If the AOR region is part of more
than one environment, you need to use the | symbol after the IP address and port
number, For example
#WLMListenerList=”{IP_address_01,Port_01}|{IP_address_02,Port_02}”.
cicsupdate –c rd –r AOR1SC WLMListenerList=”{rhel7,19124}”
cicsupdate –c rd –r AOR2SC WLMListenerList=”{rhel7,19124}”
b) PD 定義
#以下 PD 是 AOR 的實體測試程序
cicsadd -c pd -r AOR1SC IBMTRAN PathName=ibm_disptran_server RSLKey=public
cicsadd -c pd -r AOR2SC IBMTRAN PathName=ibm_disptran_server RSLKey=public
c) LD 定義
#TCPService 的值需要在/etc/services 裡面配置(CORSC,AOR1SC,AOR2SC的LD定義里的TCPService的值 在/etc/services的設置在文章最後附上)
cicsadd -c ld -r AOR1SC LD01 Protocol=TCP TCPAddress=rhel7 TCPService=tcpaor1sc
cicsadd -c ld -r AOR2SC LD01 Protocol=TCP TCPAddress=rhel7 TCPService=tcpaor2sc
d) CD 定義
cicsadd -c cd -r AOR1SC COR1 ConnectionType=cics_tcp RemoteLUName=CORSC ListenerName=LD01 RemoteTCPAddress=rhel7 RemoteTCPPort=29001
cicsadd -c cd -r AOR2SC COR1 ConnectionType=cics_tcp RemoteLUName=CORSC ListenerName=LD01 RemoteTCPAddress=rhel7 RemoteTCPPort=29001
2.3 CTG 配置
配置 ctg.ini,將三個 region 都配置到其中,並要求 RegionName 和 ServerName 一
樣,否則 WLM 組件將不能正確監控 Region 的運行狀態。
配置如下所示:
SECTION SERVER = CORSC
Description = TCPIPServer
protocol = TCPIP
NetName = 192.168.179.18
port = 29001
ConnectTimeout = 15
TcpKeepAlive = Y
ENDSECTION

SECTION SERVER = AOR2SC
Description = TCPIPServer
protocol = TCPIP
NetName = 192.168.179.18
port = 29003
ConnectTimeout = 15
TcpKeepAlive = Y
ENDSECTION

SECTION SERVER = AOR1SC
Description = TCPIPServer
protocol = TCPIP
NetName = 192.168.179.18
port = 29002
ConnectTimeout = 15
TcpKeepAlive = Y
ENDSECTION
3 Txseries WLM 配置
3.1 操作系統環境檢查
檢查該文件/etc/services,確認下面兩行沒有被注釋
echo 7/tcp # Echo
echo 7/udp # Echo
RedhatLinux7默認沒有安裝inetd,所以 在/etc下找不到inetd.conf文件,需要用yum 安裝xinetd。安裝完後,就在/etc找到xinetd.conf文件, 查看xinetd.conf文件,可以看到,這個文件最後調用/etc/xinetd.d下的文件,從這個文件夾看到,有兩個文件:echo-dgram,echo-stream ,編輯這兩個文件,將disable = yes 改成 disable = no
3.2 WLM 初始化
a ) 初始化文件指定 WAP 的位置。使用 cicssm 用戶編輯
/var/cicssm/repos/cicssm.config 文件:
wap wap1 rhel7 9123
b) 使用 cicssm 用戶執行命令: (該命令在/var/cicssm/repos 下創建 wap.wap1 文件)
cicswlm configure wlm wap1
//cicswlm configure wlm -h rhel7 -w wap1 -p 9123
c) 修改 wlmlsnr.cfg 配置文件,用於指定 CICS WLM LISTENER
wap1 19124
c) 在/opt/ibm/cicssm/bin/setwlmenv.sh 設置以下環境變量:
export BHG_WAP_WAP_NAME=”rhel7 9123″
export BHG_WAP_MESSAGE_CATALOGUE=cicssm.cat
export BHG_WCM_WAP_NAME=”rhel7 9123″
export BHG_WCM_MESSAGE_CATALOGUE=cicssm.cat
export BHG_HMON_WAP_NAME=”rhel7 9123″
export BHG_HMON_MESSAGE_CATALOGUE=cicssm.cat
export BHG_WLMLOAD_MESSAGE_CATALOGUE=cicssm.cat
#如果 plex name 不是默認的 cpx1,下面三個變量必須設置
#這個 group 的名稱和 plex 裡面的 group 沒關係
export BHG_WCL_GROUP_NAME=grp1
#這個 plex name 就是配置中的 plex name
export BHG_WCL_grp1_CICSPLEX_NAME=cpx1
export BHG_WCL_MESSAGE_CATALOGUE=cicssm.cat
export LIBPATH=/opt/ibm/cicssm/lib:/usr/lib:/opt/ibm/cics/lib
export CICS_HOSTS=rhel7
3.3 創建 plexdb
#plexdb 是存儲 CICS 整個 WLM 的信息的配置文件,命令運行後將生成文件
/var/cicssm/repos/wlm.cfg
#執行以下命令進行創建:
cicswlmcfg create plexdb wlm
3.4 創建 plex
#創建一個名為 cpx1 的 plex
cicswlmcfg create plex cpx1 -d wlm
3.5 創建 wlm 中的 group
#group 是 wlm 中的分組, 這裡 group1 和 group2 分別給 cor 和 aor
cicswlmcfg create group GROUP1 -p cpx1 -d wlm
cicswlmcfg create group GROUP2 -p cpx1 -d wlm
3.6 添加 group 的成員
#將 CORSC 加入 group1, AOR1SC 和 AOR2SC 加入 group2
cicswlmcfg add region CORSC -g GROUP1 -h rhel7 -p cpx1 -d wlm
cicswlmcfg add region AOR1SC -g GROUP2 -h rhel7 -p cpx1 -d wlm
cicswlmcfg add region AOR2SC -g GROUP2 -h rhel7 -p cpx1 -d wlm
3.7 為 COR 添加到 AOR 的連接
#AOR1、 AOR2 是 CORSC 中的 CD 名稱, COR1 是各 AOR 反向的 CD 名稱。
cicswlmcfg add connection AOR1 -r CORSC -R AOR1SC -S COR1 -p cpx1 -d wlm inService=1
cicswlmcfg add connection AOR2 -r CORSC -R AOR2SC -S COR1 -p cpx1 -d wlm inService=1
3.8 添加 PD 到 AOR 所在的 group
#添加 PD 到 AOR 所在的 group,讓 PD 成為可以轉發的程序
cicswlmcfg add program IBMTRAN -g GROUP2 -p cpx1 -d wlm
4 Txseries WLM 啟動與停止
4.1 WLM 的啟動
使用 cicssm 用戶(root 用戶都無法執行)執行以下命令,依次啟動組件 wap、 wcm、
wlmlsnr 和 hmon
. /opt/ibm/cicssm/bin/setwlmenv.sh
cicswlm start wap wap1
cicswlm start wcm wap1
cicswlm verify wlm.cfg
cicswlm load wlm.cfg wap1
wlmlsnr -s start -p cpx1 -d wlm -w wap1
// cpx1 is the Plex Name / wap1 is the Wap Name/ wlm is the Config_filename
cicswlm start hmon wap1
4.2 WLM 的停止
使用 cicssm 用戶執行以下命令
. /opt/ibm/cicssm/bin/setwlmenv.sh
cicswlm stop all
cicswlm clean wlm
5 Txseries WLM 監控
加載環境變量. /opt/ibm/cicssm/bin/setwlmenv.sh
運行命令 cicswlmstat, 有如下輸出

CORSC,AOR1SC,AOR2SC的LD定義里的TCPService的值 在/etc/services的設置如下所示,就是增加tcpcor1sc,tcpaor1sc,tcpaor2sc的值,分別對應端口:29001,29002,29003.

vi /etc/service 增加如下:
tcpcor1sc 29001/tcp
tcpaor1sc 29002/tcp
tcpaor2sc 29003/tcp

常用的WLM性能監控與命令:
檢查WLM狀態
cicswlmstat
檢查WLM進程
ps -eaf|grep bhg
ps -ef | grep wlmlsnr
netstat -an | grep 19124
netstat -an | grep 9123

以下文章點擊率最高

Loading…

     

如果這文章對你有幫助,請掃左上角微信支付-支付寶,給於打賞,以助博客運營