Monitoring the CICS DB2 attachment facility

You monitor the CICS® DB2® attachment facility by using commands addressed to both DB2 and the CICS DB2 attachment facility itself.

Monitoring the CICS DB2 attachment facility using CICS DB2 attachment facility commands

You can monitor the status of CICS-DB2 threads, and the corresponding CICS transactions using them, using the DSNC DISPLAY PLAN or TRAN command provided by the CICS DB2 attachment facility. For more information, see CICS-supplied transactions for CICS DB2. You can also use commands provided by CICS, such as the CEMT or EXEC CICS INQUIRE command, on the DB2CONN or on individual DB2ENTRYs. Used on the DB2CONN, the commands enable you to monitor the status of the overall connection between CICS and DB2, as well as the use of the pool. Used on an individual DB2ENTRY, the commands enable you to monitor the use of the DB2ENTRY.

Monitoring the CICS DB2 attachment facility using DB2 commands

Once a connection between CICS and DB2 is established, terminal users authorized by CICS security can use the DSNC transaction to route commands to the DB2 system. These commands are of the form:

     DSNC-DB2command

For example, the DSNC -DIS THREAD command can show CICS DB2 threads.

The command is routed to DB2 for processing. DB2 checks that the authorization ID passed from CICS is authorized to issue the command entered.

Responses are routed back to the originating CICS user. The command recognition character (CRC) of a hyphen, (-), must be used to distinguish DB2 commands from CICS DB2 attachment facility commands. For DB2 commands issued from CICS, the CRC is always -, regardless of the subsystem recognition character.

Both CICS and DB2 authorization are required to issue DB2 commands from a CICS terminal:

For more information see CICS-supplied transactions for CICS DB2.

Monitoring the CICS DB2 attachment facility using CICS DB2 statistics

In addition to the limited statistics output by the DSNC DISP STAT command and those output to the STATSQUEUE destination of the DB2CONN during attachment facility shutdown, a more comprehensive set of CICS DB2 statistics can be collected using standard CICS statistics interfaces:

The CICS DB2 global and resource statistics are described in detail in the CICS Performance Guide.

CICS DB2 statistics are supported for all types of CICS statistics, namely:

The CICS sample statistics program, DFH0STAT, supports DB2 statistics. It uses EXEC CICS COLLECT STATISTICS commands with the DB2CONN and DB2ENTRY keywords to collect statistics. It also uses EXEC CICS INQUIRE commands for the DB2CONN and DB2ENTRYs to collect data. An example of the output from DFH0STAT is shown in Figure 35.

Figure 35. Example output from DFH0STAT: the DB2 Connection report
Applid IYK2Z2G1  Sysid JOHN  Jobname CI13JTD5    Date 09/09/2001  Time 10:38:50                 CICS 6.2.0                PAGE     2
 
DB2 Connection
 
  DB2 Connection Name. . . . . . . . . . . :  RCTJT
  DB2 Group ID . . . . . . . . . . . . . . :                       Resync Group Member. . . . . . . . . . . : N/A
  DB2 Sysid. . . . . . . . . . . . . . . . :  DE2D
  DB2 Release. . . . . . . . . . . . . . . :   6.2.0

  DB2 Connection Status. . . . . . . . . . :  CONNECTED            DB2 Connect Date and Time . . . :  09/09/2001  10:37:19.21354
  DB2 Connection Error . . . . . . . . . . :  SQLCODE
  DB2 Standby Mode . . . . . . . . . . . . :  RECONNECT

  DB2 Pool Thread Plan Name. . . . . . . . :
  DB2 Pool Thread Dynamic Plan Exit Name . :  DSNCUEXT

  Pool Thread Authtype . . . . . . . . . . :  USERID               Command Thread Authtype. . . . . . . . . :  N/A
  Pool Thread Authid . . . . . . . . . . . :                       Command Thread Authid. . . . . . . . . . :  JTILLI1

  Signid for Pool/Entry/Command Threads. . :  SSSSSSSS

  Create Thread Error. . . . . . . . . . . :  ABEND                Message TD Queue 1. . . . . . . . . . . :  CDB2
  Protected Thread Purge Cycle . . . . . . :  00.30                Message TD Queue 2. . . . . . . . . . . :
  Deadlock Resolution. . . . . . . . . . . :  ROLLBACK             Message TD Queue 3. . . . . . . . . . . :
  Non-Terminal Intermediate Syncpoint. . . :  NORELEASE
  Pool Thread Wait Setting . . . . . . . . :  WAIT                 Statistics TD Queue . . . . . . . . . . :  CDB2

  Pool Thread Priority . . . . . . . . . . :  HIGH                 DB2 Accounting records by . . . . . . . :  NONE

  Current TCB Limit. . . . . . . . . . . . :         100
  Current number of TCBs . . . . . . . . . :          10
  Peak number of TCBs. . . . . . . . . . . :          10

  Current number of free TCBs. . . . . . . :           5

  Current number of tasks on TCB Readyq. . :           0
  Peak number of tasks on TCB Readyq . . . :           0

  Pool Thread Limit. . . . . . . . . . . . :           3           Number of Calls using Pool Threads. . . . . :         0
  Current number of Pool Threads . . . . . :           0           Number of Pool Thread Signons . . . . . . . :         0
  Peak number of Pool Threads. . . . . . . :           2           Number of Pool Thread Partial Signons . . . :         0
  Number of Pool Thread Waits. . . . . . . :           0           Number of Pool Thread Commits . . . . . . . :         0
                                                                   Number of Pool Thread Aborts. . . . . . . . :         0
  Current number of Pool Tasks . . . . . . :           0           Number of Pool Thread Single Phase. . . . . :         0
  Peak number of Pool Tasks. . . . . . . . :           0           Number of Pool Thread Reuses. . . . . . . . :         0
  Current Total number of Pool Tasks . . . :           0           Number of Pool Thread Terminates. . . . . . :         0

  Current number of Tasks on Pool Readyq . :           0
  Peak number of Tasks on Pool Readyq. . . :           0

  Current number of DSNC Command threads . :           0           Number of DSNC Command Calls. . . . . . . . :         0
  Peak number of DSNC Command threads. . . :           0           Number of DSNC Command Signons. . . . . . . :         0
  DSNC Command Thread Limit. . . . . . . . :           2           Number of DSNC Command Thread Terminates. . :         0
                                                                   Number of DSNC Command Thread Overflows . . :         0

Figure 36. Example output from DFH0STAT: the DB2 Entries report
Applid IYK2Z2G1  Sysid JOHN  Jobname CI13JTD5    Date 09/09/2001  Time 10:38:50                 CICS 6.2.0                PAGE     3
 
DB2 Entries
 
  DB2Entry Name. . . . . . . . . . . . . . :  XP05                 DB2Entry Status . . . . . . . . . . . . :  ENABLED
  DB2Entry Static Plan Name. . . . . . . . :  TESTP05              DB2Entry Disabled Action. . . . . . . . :  POOL
  DB2Entry Dynamic Plan Exit Name. . . . . :                       DB2Entry Deadlock Resolution. . . . . . :  ROLLBACK

  DB2Entry Authtype. . . . . . . . . . . . :  N/A                  DB2Entry Accounting records by. . . . . :  NONE
  DB2Entry Authid. . . . . . . . . . . . . :  JTILLI1
                                                                   Number of Calls using DB2Entry. . . . . . . :      16,500
  DB2Entry Thread Wait Setting . . . . . . :  WAIT                 Number of DB2Entry Signons. . . . . . . . . :          10
                                                                   Number of DB2Entry Partial Signons. . . . . :           0
  DB2Entry Thread Priority . . . . . . . . :  HIGH                 Number of DB2Entry Commits. . . . . . . . . :           0
  DB2Entry Thread Limit. . . . . . . . . . :          10           Number of DB2Entry Aborts . . . . . . . . . :           0
  Current number of DB2Entry Threads . . . :           0           Number of DB2Entry Single Phase . . . . . . :       5,500
  Peak number of DB2Entry Threads. . . . . :          10           Number of DB2Entry Thread Reuses. . . . . . :       5,031
                                                                   Number of DB2Entry Thread Terminates. . . . :         464
  DB2Entry Protected Thread Limit. . . . . . . . . :         5     Number of DB2Entry Thread Waits/Overflows . :         306
  Current number of DB2Entry Protected Threads . . :         5
  Peak number of DB2Entry Protected Threads. . . . :         5

  Current number of DB2Entry Tasks . . . . . . . . :         0
  Peak number of DB2Entry Tasks. . . . . . . . . . :        28
  Current Total number of DB2Entry Tasks . . . . . :     5,500

  Current number of Tasks on DB2Entry Readyq . . . :         0
  Peak number of Tasks on DB2Entry Readyq. . . . . :        18

Important statistics fields to look at as regards performance and tuning are:

Related concepts
Accounting and monitoring in a CICS DB2 environment
Monitoring CICS transactions that access DB2 resources
Monitoring DB2 when used with CICS
Monitoring the CICS system in a CICS DB2 environment
Accounting in a CICS DB2 environment: Overview

Related references
CICS DB2 statistics
DB2 Connection Report
DB2 Entries Report
[[ Contents Previous Page | Next Page Index ]]