SYSVIEW Performance Monitor for DB2 is designed to assist in monitoring the mainframe DB2 database. One of its most powerful tools is the Exception Processor, which can deliver automatic notifications when specified DB2 events occur. The Exception Processor can monitor 4 types of DB2 events. These types are:
Subsystem monitoring focuses on the MSTR, DBM1, DIST and IRLM address spaces and provides a comprehensive predefined list of conditions to evaluate. Statistics such as EXCP rates, Paging, Log Processing, System Stats, Buffer Pool and SQL Counts can be monitored.
Database monitoring focuses on one or more databases. Statistics such as the number of opens or extents for a pageset or if a database/pageset is in a restricted status can be monitored.
Application monitoring is the main exception type used and processes thread information in real-time or uses Accounting information in an individual/summarized method or can process individual SQL statements in real-time without a performance trace. There are more that a thousand predefined Exceptions that can be used.
IQL monitoring uses an Insight Query Language (IQL) request to monitor the DB2 system. When the WHERE clause of the request is met, an exception event is generated. This type of monitor is the most flexible in that every IFCID record can be processed to determine when an event should be declared and exception.
The rest of this article is dedicated to showing how the Exception Processor IQL monitoring can be implemented.
There are 2 steps needed to setup an IQL Exception. First, an IQL request need to written, stored in the user request library and eventually started. Second, the IQL Exception needs to created and activated.
EXCP0001: TRACE (COLFMT=OFF)Two more examples of requests that produce exceptions can be found in the HLQ.CDBATRQ library. Members APPLEXCP and SYSEXCPT are provided as samples.
*
* Throw an exception when AUTH-ID ABCDEFG makes a distributed connection* << THREAD-STATS
'EXCP0001'
WHERE AUTH-ID = 'ABCDEFG'
AND PLAN-NAME = 'DISTSERV'
>>
INTERVAL 10 SECONDS
EXCP ;
Send to TSO user #1 . . ABCDEFG starting at level . C (I=Info, W=Warn,For the next two screens, just press ENTER to take the defaults. You should then end up on a screen that states:
Exception Data Set Updated The exception data set has been modified. This change can not be made dynamically and requires that the exception system be restarted. Press F6 to restart the exception system now or use the F3 End key to defer the change until the next time the exception system is restarted.Press the PF6 key to refresh the Exception Processor definitions.
STATUS SSN IQL exception IDACTIVE **** EXCP0001
From the Insight Main Menu, enter the T command to bring up the TOOLS menu, then 4 to display a LIST of requests. Now, enter the command L EXCP0001, to locate the request that we wrote. Place an S command next to the entry and press ENTER to bring up the start qualification screen. In the duration field, put the value 0010 to have this request run for only 10 minutes, then press ENTER. You will get a warning message stating DBG55037W Request cannot be DISPLAYed, but that is OK.
Next, go to the Thread Active screen and display the running threads. (You will not see your thread yet.)
Next run an application that requires a distributed thread. Execute a long running SQL statement - after 10-15 seconds, the Thread Active screen should display an entry as follows.
Menu Print Tools Help CA-Insight V6.3 P01F ABCDEFG 08/26/04 13:35: DXXX CZZZ 1 All 2 Connections 3 Curr Contn 4 Contn Hist 5 Lock Summary 6 More. FOCUS O R/THRDACTV Threads Identified to DB2 Item 1-5 o All Actions: S=Select, T=SQL, L=Locks, E=Except, R=Rmt, C=Cancel, M=More... Auth ID Corr ID Plan Conn Last DB2 Elap DB2 CPU ________ ____________ ________ Type Status Event HH:MM:SS MM:SS.TT Crit -------- ------------ -------- ---- -------- ------ -------- -------- ---- _ JEFF db2bp.exe DISTSERV DBAT DDF 4 0.41 1
Now, by accessing the Exception Monitor screen and choosing option 5, you will see that the exception was triggered and the action you specified would have been initiated.
Menu Print Tools Help CA-Insight V6.3 P01F ABCDEFG 08/26/04 13:3 DXXX CZZZ 1 All 2 Subsystem 3 Application 4 Database 5 IQL Type . IN-AL (IN-ALERT, IEXCDISP IQL Based Exceptions In Alert TRIPPED) Actions: H=Help, G="Goto" screen, U=Update current and permanent, T=Temp u -------------------------- IQL BASED EXCEPTIONS ----------------------- _ CRIT 13:34:12-CURRENT EXCP0001
Congratulations! You now have the components needed to monitor any IFCID value and generate an exception. You can also use the Insight User's Guide, Chapter 15 to find more information on this subject.
Release : 20.0
Component : CA SYSVIEW Performance Management Option for DB2 for z/OS
See Overview and Implementation.