630 likes | 1.54k Views
IBM TXSeries CICS 管理 (1). 刘睿. 概要. 观察 TXSeries CICS/CICS TG 的运行状态和错误日志 TXSeries CICS/CICS TG 的运行部件 TXSeries CICS/CICS TG 的资源管理 TXSeries CICS/CICS TG 的安全管理 TXSeries CICS 的 XA 常用的 TXSeries CICS/CICS TG 命令 TXSeries CICS/CICS TG 的平台注意事项. 观察 TXSeries CICS/CICS TG 的运行状态和错误日志.
E N D
概要 • 观察TXSeries CICS/CICS TG的运行状态和错误日志 • TXSeries CICS/CICS TG的运行部件 • TXSeries CICS/CICS TG的资源管理 • TXSeries CICS/CICS TG的安全管理 • TXSeries CICS的XA • 常用的TXSeries CICS/CICS TG命令 • TXSeries CICS/CICS TG的平台注意事项
TXSeries和CTG运行错误日志的分布 • Region错误日志 • /var/cics_regions/<域名>/console.###### • /var/cics_regions/<域名>/symrecs.###### • /var/cics_regions/<域名>/data/CSMT.out • /var/cics_regions/<域名>/dump/dir1/… • SFS错误日志 • /var/cics_servers/SSD/cics/sfs/<ServerId>Imsg • CUC/CTG错误日志 • /var/cicscli/CICSCLI.LOG //UNIX • <CUC/CTG目录>/bin/cicscli.log
观察CICS运行状态-域和文件服务器状态 • cicscp status allcicslistservers • UNIX:cicslssrc –a | grep cics • WINDOWS:cicscheckup –A
观察CICS控制台信息 • 使用命令:cicstail -r <域名> • 控制台信息的来源 • console文件 • CSMT.out文件
Region启动时的控制台信息 ERZ010167I/0454 2006-07-07 16:55:10.645361000 CICSNT01 3816/0001 : 已将区域‘CICSNT01’配置为支持 Encina 结构化文件服务器(SFS)。 ERZ010136I/0363 2006-07-07 16:55:10.675404000 CICSNT01 3816/0020 : 正在创建 CICS 进程‘cicsld’ ERZ010136I/0456 2006-07-07 16:55:10.705448000 CICSNT01 3816/0020 : 正在创建 CICS 进程‘cicslm’ ERZ024083I/0307 2006-07-07 16:55:10.815057000 CICSNT01 3332/0001 : 日志守护进程等待访问主日志文件 ERZ010136I/0365 2006-07-07 16:55:10.815606000 CICSNT01 3816/0020 : 正在创建 CICS 进程‘cicsam’ ERZ010136I/0426 2006-07-07 16:55:10.965822000 CICSNT01 3816/0020 : 正在创建 CICS 进程‘cicsrl’ ERZ010136I/0366 2006-07-07 16:55:11.065966000 CICSNT01 3816/0020 : 正在创建 CICS 进程‘cicsic’ ERZ024080I/0267 2006-07-07 16:55:11.206216000 CICSNT01 4024/0001 : 恢复管理器结束,带有主日志文件 ERZ024081I/0315 2006-07-07 16:55:11.325792000 CICSNT01 3332/0001 : CICS 日志守护进程就绪 ERZ010141I/0373 2006-07-07 16:55:11.366446000 CICSNT01 4024/0001 : 应用程序管理器正在启动 MinSever 个服务器 ERZ010160I/0436 2006-07-07 16:55:11.375777000 CICSNT01 3740/0007 : 正在创建侦听器‘LI1’的 CICS 进程‘cicsip’ ERZ010144I/0375 2006-07-07 16:55:11.606057000 CICSNT01 4088/0001 : 已启动应用程序服务器 101 ERZ010144I/0375 2006-07-07 16:55:11.606014000 CICSNT01 4076/0001 : 已启动应用程序服务器 102 ERZ010163I/0439 2006-07-07 16:55:11.606108000 CICSNT01 3740/0001 : 正在等待侦听器‘LI1’初始化 ERZ044008I/0009 2006-07-07 16:55:11.787216000 CICSNT01 3264/0001 : CICS 侦听器‘LI1’进程‘cicsip’为‘127.0.0.1 [1435]’而启动 ERZ010137I/0368 2006-07-07 16:55:12.106734000 CICSNT01 4076/0001 : CICS 初始化事务已启动 ERZ021052I/0163 2006-07-07 16:55:12.166820000 CICSNT01 4076/0001 : 正在打开文件 ... ERZ021053I/0164 2006-07-07 16:55:12.196864000 CICSNT01 4076/0001 : ...文件打开完成 ERZ022001I/1233 2006-07-07 16:55:12.226907000 CICSNT01 4076/0001 : 正在处理瞬时数据队列 ... ERZ022113I/1234 2006-07-07 16:55:12.317036000 CICSNT01 4076/0001 : 已处理瞬时数据队列! ERZ023017I/0732 2006-07-07 16:55:12.347080000 CICSNT01 4076/0001 : 处理临时存储队列... ERZ023028I/0733 2006-07-07 16:55:12.457238000 CICSNT01 4076/0001 : 临时存储队列已经处理完毕! ERZ061026I/4005 2006-07-07 16:55:12.497296000 CICSNT01 4076/0001 : 根据异步处理请求来处理本地队列 ... ERZ061027I/4006 2006-07-07 16:55:12.517324000 CICSNT01 4076/0001 : 本地队列已被处理 ERZ024089I/0313 2006-07-07 16:55:12.557563000 CICSNT01 3332/0001 : 启动检查点 ERZ010138I/0369 2006-07-07 16:55:12.557382000 CICSNT01 4076/0001 : CICS 初始化事务已结束 ERZ010120I/0243 2006-07-07 16:55:12.637497000 CICSNT01 4076/0001 : 完成处理启动和关闭程序列表 ERZ010020I/0068 2006-07-07 16:55:12.698313000 CICSNT01 3816/0020 : *** CICS 启动已完成 ***
显示CTG/CUC的联机状态 • 察看连接:cicscli /l • 察看统计信息:ctgadmin -a stats …
如何使用CTG V7.1之后新增加的统计功能 • 配置方法,详细配置可参考CTG 管理指南第15章,监控和统计统计可以分为间隔统计和每日统计。可以通过配置ctg.ini来设置统计间隔和每日统计产生时间。重启CTG生效。statint=030000 stateod=000000比如,比如上例配置,将每隔3个小时产生一次统计,00:00:00产生每日统计。 如果ctg在5:20启动,则会在下面时间产生统计信息:5:20,6:00,9:00,12:00,15:00,18:00,21:00产生间隔统计,在00:00产生日统计。可以根据需要设置间隔统计和日统计。 • 分类 • 与性能相关的统计参数值,统计参数值分为4种: C: Current(当前值) I: Interval(间隔统计值) L: Lifetime(从gateway启动到当前时间的值) S: Start(gateway启动时候的值) • 统计参数值监控的资源类型需要关注的有CM - Connection manager CD - Client daemon CS - CICS Server (all) WT - Worker thread PH - Protocol handler SE - System Environment GD - Gateway daemon <Region> - CICS Server (instance) • 得到统计数据的命令举例#例:得到所有的统计数据ctgadmin -a stats -gs#例:Show the worker thread resource group, the maximum number of connection managers, and the Gateway daemon resource group:ctgadmin -a stats -gs wt:cm_smax:gd#例:Getting help on statistics:ctgadmin -a stats -?
如何使用CTG V7.1之后新增加的统计功能(举例) CM: CM_CCURR=738 (当前创建的连接管理线程个数) CM_CALLOC=135 (当前分配的连接管理线程个数) CM_IALLOCHI=227 (统计间隔内(3小时)高峰期分配的连接管理线程个数) CM_IALLOC=471200 (统计间隔内(3小时)连接管理线程被分配的次数) CM_ITIMEOUTS=0 (统计间隔内(3小时),无法成功给java客户端应用分配连接管理线程而超时的次数 CM_LTIMEOUTS=0 (从ctg启动到当前,无法成功给java客户端应用分配连接管理线程而超时的次数) CM_CWAITING=0 (当前正在等待分配worker thread的 连接管理线程的个数) WT: WT_CCURR=676 (当前创建的worker thread个数) WT_CALLOC=101 (当前分配的worker thread个数) WT_IALLOCHI=199 (统计间隔内(3小时)高峰期分配的worker thread个数) WT_ITIMEOUTS=0 (统计间隔内(3小时)无法成功给连接管理线程分配worker thread而超时的次数) WT_LTIMEOUTS=0 (从ctg启动到当前,无法成功给连接管理线程分配worker thread而超时的次数) GD: GD_LALLREQ=574164377 从ctg启动到当前CTG的gateway处理的请求个数 GD_IALLREQ=471157 统计间隔内(3小时)CTG的gateway处理的请求个数 GD_LAVRESP=33 从ctg启动到当前gateway处理请求的平均响应时间,单位为ms。 GD_IAVRESP=41 统计间隔内(3小时)CTG的gateway处理请求的平均响应时间,单位为ms。 CD: CD_LALLREQ=4140874 CTG的client进程从启动到现在处理ECI请求的个数
使用TXSeries v7.1的Web控制台监控CICS域 • 设置MDcicsupdate -c md -r CICS01 MonitorStatus=yes AdminConsoleMonitorStatus=yescicscp -v stop region CICS01 cicscp -v start region CICS01 StartType=cold • 设置Web控制台 • 打开“http://<主机名>/txseries/admin”, • 选择“Monitoring Profiles”,修改DEFAULT Profile或者定义新的Profile。注意属性“Sampling Interval(Minutes)”默认为5。 • 进入:<域> -> Monitoring -> Current View,选择Profile,并Start。通过Refresh来更新视图。
TXSeries和CICS TG的服务部件 • TXSeries • Region • CICS Application Server Process - cicsas • Encina File Server • SFS • CICS TG / CICS UC • Client Daemon - cclclnt • Gateway Daemon - ctgstart
TXSeries的产品目录结构(AIX) • /usr/lpp/cics • bin • include • lib • src • examples • onephase • xa • … • samples • utils • msg
TXSeries的产品目录结构(HPUX, Solaris) • /opt/cics • bin • include • lib • src • examples • onephase • xa • … • samples • utils • msg
TXSeries的产品目录结构(Windows) • driver:\opt\TXSeries\cics (默认) • bin • include • lib • src • examples • onephase • xa • … • samples • utils • msg
TXSeries的数据目录结构 • /var • cics_clients • cics_regions • Region • console.*, symrecs.*, environment… • bin • classes • data • CSMT.out, CCIN.out… • database • RD, PD, TD, CD, LD, UD, XAD… • dumps • dir1 • log • maps • cics_servers • archives • GSD • SCD • SSD
CICS TG的产品目录结构 • bin • CTG.ini • Classes • ctgclient.jar, ctgserver.jar… • copybook • deployable • cicseci.rar • docs • include • lib • samples • … …
CICS TG的进程组成 • cclclnt - Client Daemoncclclnt进程 • ctgstart - Gateway Daemonjava -Xmx128M -Xms128M -Xjni:arrayCacheMax=32768 -Dcom.ibm.ctg.cicscli="" -classpath "..." com.ibm.ctg.util.CTGLaunch CTG
TXSeries资源定义的分类 • Region • Region Definition (RD) • Communication Definition (CD) • Journal Definition (JD) • Monitor Definition (MD) • File Definition (FD) • Program Definition (PD) • Transaction Definition (TD) • Temporary Storage Definition (TSD) • Transient Data Queue Definition (TDD) • XA Definition(XAD) • User Definition(UD) • SFS • SSD • PPC Gateway • GSD
Region资源数据库的类型 • 资源数据库的类型: • CICS运行数据库/var/cics_regions/<region>/database/XX/XX.<region>/XX.autoXX=CD FD GD JD LD MD PD RD TD TDD TSD UD WD XAD例:/var/cics_regions/<region>/database/XAD/XAD.<region>/XAD.auto • CICS永久数据库/var/cics_regions/<region>/database/XX/XX.stanzaXX=CD FD GD JD LD MD PD RD TD TDD TSD UD WD XAD例:/var/cics_regions/<region>/database/XAD/XAD.stanza • 启动类型: • 热启动 • 冷启动
在CICS资源中的一些缩写方式 • %RRegion Name • %HHost Name • %SSFS or PPC Gateway Server Name
资源定义中的通用属性 • KEY (unique for this kind of resource) • ActivateOnStartup (Activate the resource at cold start?) yes|no • AmendCounter (Number of updates) 0 • GroupName (Group to which resource belongs) "" • Permanent (Protect resource from modification?) no • ResourceDescription (Resource description) 30-byte
有关资源定义的常用命令 • cicsget {-?|-c className [-r regionName] {-l|[resourceName]}} • cicsadd {-?|-c className [-r regionName] [-P|-B] [-f fileName] [-m modelId] resourceName [[attributeName=attributeValue]...]} • cicsupdate {-?|-c className [-r regionName] [-P|-R|-B] [-f fileName] [resourceName] [[attributeName=attributeValue]...]} • cicsdelete {-?|-c className [-r regionName] [-P|-R|-B] [-f fileName] resourceName [resourceName...]}
收听器定义(LD) • Protocol(例:TCP) • TCPAddress(例:localhost) • TCPService(例:cics1435) • TCPProcessCount
数据库接口定义(XAD) • SwitchLoadFile(例:db21pc.dll) • XAOpen(例:sample,db2admin,password)
用户定义(UD) • CICSPassword (例:TEST) • RSLKeyList(例:1) • TSLKeyList
程序定义(PD) • PathName(例:gettime) • RSLKey(例:public) • RemoteSysId • RemoteName • Resident
交易定义(TD) • ProgName(例:ECTSQ) • TClass (no, 1-10) • RSLKey • TSLKey • RSLCheck • TSLCheck 例:增加一个ECIT的镜像交易定义。对应使用CPMI做为模板,用户可自己定义一个交易级别。如下例定义交易级别为1。cicsadd -c td -r <regionname> -m CPMI ECIT TClass=1 例:改变CPMI的TCLASS从no到1cicsupdate -c td -r CICSNT01 CPMI Permanent=no TClass=1
通讯定义(CD) • ConnectionType(例:cics_tcp) • RemoteLUName(例:CICSNT02) • RemoteTCPAddress(例:localhost) • RemoteTCPPort(例:1436) • ListenerName
CICS资源的安全设置(1) • UD/RSLKeyList:none(默认), 1~24(可多选)。 • UD/TSLKeyList:1~64(可多选,默认为1)。 • PD/RSLKey:1-24, public, private(默认)。若public,任意用户可以访问;若private,只有从“TD:RSLCheck=none”的Transaction可以访问。 • TD/RSLKey:1-24, public, private(默认)。若public,任意用户可以访问;若private,只有从“TD:RSLCheck=none”的Transaction可以访问。 • TD/TSLKey:1-64(默认为1), public。若public,任意用户可以访问。CICS提供的交易的TD/TSLKey必须设置为缺省值1。另外数值1也相当于public。 • TD/RSLCheck:internal(默认), external, none。 • TD/TSLCheck:internal(默认), external。
CICS资源的安全设置(2) • 已淘汰的DCE相关设置: • RD:AuthenticationService=CICS // 缺省值为 CICS • RD:RuntimeProtection=none // 缺省值为 none • 认证交易 • CESN • CESF • 设置启动交易 • cicsterm -t <Tran ID> • cicsteld -t <Tran ID>
CICS资源的安全设置(3) — RD:SafetyLevel NONE RD CICS transactions SafetyLevel = none | normal | guard USER transactions NORMAL CICS transactions USER transactions • Ignored on Solaris (same as none) • Normal incurs performance cost • Only use if storage corruption occurs • Guard is Windows only • Less performance cost than Normal • Default is None • Avoid changing GUARD CICS transactions USER transactions
使用Default User • 未认证的请求都会使用 Default User • 限制Default User的权限: • Transactions (CEMT, CECI, CEDF) • Programs • Resource (files, TD, TS) RD DefaultUserId="CICSUSER" Resources Transactions Programs
UD – U1 TSLKeyList=“31 | 32 | 33” RSLKeyList=“1 | 2 | 3 | 4 | 5 | 6” TD – T1 TSLCheck=internal TSLKey=31 RSLCheck=internal RSLKey=1 ProgName=“P1” PD – P1 Use F1, J1, TS1, TD1 RSLKey=2 FD – F1 RSLKey=3 JD – J1 RSLKey=4 TSD – TS1 RSLKey=5 TDD – TD1 RSLKey=6 U1 – P1 OK U1 – T1 OK Authentication Sample (I)
UD – U1 TSLKeyList=“31 | 32 | 33” RSLKeyList=“1 | 2 | 3 | 4 | 5 | 6” TD – T1 TSLCheck=internal TSLKey=31 RSLCheck=none RSLKey=private ProgName=“P1” PD – P1 Use F1, J1, TS1, TD1 RSLKey=private FD – F1 RSLKey=private JD – J1 RSLKey=private TSD – TS1 RSLKey=private TDD – TD1 RSLKey=private U1 – P1 Error U1 – T1 OK Authentication Sample (II)
X/Open DTP模型 The X/Open Distributed Transaction Processing (DTP) model envisages three software components: • An application program (AP) defines transaction boundaries and specifies actions that constitute a transaction. • Resource managers (RMs, such as databases or file access systems) provide access to shared resources. • A separate component called a transaction manager (TM) assigns identifiers to transactions, monitors their progress, and takes responsibility for transaction completion and for failure recovery.
XA接口 • The XA is a specification defined by X/Open that describes the protocol for transaction coordination, commitment and a recovery between a TM and one or more RMs. • In a X/Open DTP Model , the transaction manager and the Resource manager communicate using the XA Interface. • The interfaces are nothing but a set of routines implemented by both RM and TM to communicate to each other. • The XA interface is not an ordinary Application Programming Interface (API). It is system level interface between a RM and a TM. • The ax_*( ) routines to let an RM call a TM. All TMs must provide these routines.These routines let an RM dynamically control its participation in a transaction branch. • The xa_*( ) routines are supplied by RMs operating in the DTP environment and called by TMs.A TM must call the xa_*( ) routines in a particular sequence.
XA接口(续) List of XA Interfaces.
CICS在X/Open DTP模型中的实现 The X/Open DTP standard uses an application program (AP), resource manager (RM), and transaction manager (TM) model. In the CICS implementation, the CICS application program is the AP, the RDBMS is the RM, and CICS is the TM. CICS plays the role of a Transaction Manager in X/Open DTP model. It can coordinate distributed transactions to relational databases that support the XA interface. The XA interface is not an application programming interface (API) rather it is a system-level interface between a TM and a RM in the X/Open DTP Model. DB2 Oracle Sybase MQ etc.,
cicscp命令 • cicscp [options] command [object] [attributes]