Beruflich Dokumente
Kultur Dokumente
Users Guide
Version 1 Release 1
SC27-0968-00
Users Guide
Version 1 Release 1
SC27-0968-00
Note!
Before using this information and the product it supports, be sure to read the general information under notices.
Contents
Chapter 1. Introduction . . . . . .
Product Description. . . . . . . .
Highlights . . . . . . . . . . .
Performance and Security . . . . .
Performance . . . . . . . . .
Security . . . . . . . . . . .
Hardware and Software Requirements.
DB2 Version . . . . . . . . .
ISPF . . . . . . . . . . . .
DASD Datasets . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
1
1
1
1
2
2
2
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
3
3
3
4
4
4
4
5
5
5
6
6
6
6
6
6
6
7
7
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 9
. 9
. 9
. 9
. 9
. 10
. 10
. 10
. 10
. 10
. 12
11
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . .
. . . .
. . . .
Subsystem
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . .
. . . . . . . . .
Partitioning Indexspace
. . . . . . . . .
. . . . . . . . .
. . 15
. . 15
15
. . 16
. . 16
iii
iv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16
16
16
17
17
17
17
18
18
18
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
21
21
21
21
21
21
21
22
23
23
23
23
23
23
24
24
24
24
24
24
25
25
. . .
. . .
. . .
. . .
. . .
. . .
Field .
. . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
27
27
27
27
27
27
28
28
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
33
33
33
33
33
33
33
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
35
35
35
35
35
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
37
37
37
37
37
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
39
39
39
39
39
41
43
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . 49
Usage
. . .
. . .
. . .
Statistics
. . . .
. . . .
. . . .
Operator
. . . .
. . . .
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
51
51
51
51
Commands
. . . . .
. . . . .
. . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
53
53
53
53
Appendix. Notices . . . . . . . . . . . . . . . . . . . . . . . 55
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Contents
vi
Chapter 1. Introduction
Product Description
IBM DB2 Query Monitor for OS/390 provides real-time and historical views into
query activity throughout your DB2 subsystems. Monitoring agents that can be
started and stopped dynamically use menu-driven criteria to watch up to 64 DB2
subsystems. With Query Monitor you can pinpoint activity that is important to your
business. This enables you to spot potential problems and take steps to resolve
these problems quickly.
One true advantage of Query Monitor is that you can choose what data is gathered
during monitoring, specify when it will be gathered, and identify about whom data
will be gathered.
When thresholds are crossed, activity is flagged for investigation and possible
termination. At intervals set by you, real-time activity is saved from memory to disk
and optionally, from disk to database.
Highlights
With Query Monitor, you can:
v Spot trouble in real-time before it causes significant waste of DB2 resources
v
v
v
v
v
Security
The installation of DB2/QM requires you to have DBADMIN authority, at a minimum.
Since IBM DB2 Query Monitor displays results of executed SQL queries, it does not
compromise the integrity of the underlying DB2 subsystems it monitors. Any DB2
Copyright IBM Corp. 2000
commands DB2/QM issues on behalf of its users flow through the standard DB2
interfaces and are subject to the installations DB2 security policies.
ISPF
ISPF, version 4, is required for Query Monitor.
DASD Datasets
Query Monitors libraries can reside on 3380 or 3390 DASD. The total space
required for the target library is 79 3390 tracks. The total space required for the
distribution library is 220 3390 tracks.
Query Monitor requires the following dataset:
DATASET
MEMBERS
DIRBLKS
TRACKS
SCQMLOAD
50
46
39
SCQMPENU
91
20
16
SCQMMENU
11
SCQMSAMP
SCQMDBRM
12
15
SCQMSLIB
SCQMCLST
MONITOR
Syntax:
MONITOR(db2_subsys1,profile_name1,db2_subsys2,profile_name2.)
The MONITOR parameter is a given instance that DB2/QM records SQL
performance data for, defined for the DB2 subsystems. A given DB2/QM subsystem
can monitor up to 64 DB2 subsystems.
Example:
MONITOR(R51A,R51APROF,R51B,R51BPROF)
The above example instructs DB2/QM to start monitoring agents for DB2
subsystems R51A and R51B at startup. The parameter also instructs the monitoring
agents for DB2 subsystems R51A and R51B to use monitoring profiles R51APROF
and R51BPROF, respectively
SUBSYS
Syntax:
SUBSYS(db2qm_subsystem_name)
The SUBSYS parameter defines the DB2/QM subsystem name. A DB2/QM
subsystem does not correspond to an OS/390 subsystem. The name must be 1-4
characters in length.
Example:
SUBSYS(DBQM)
INTERVAL
Syntax:
INTERVAL(recording_interval_length)
The INTERVAL parameter defines the length of the recording interval in minutes.
The length of the recording interval can range from 1 to 86400 minutes.
Example
INTERVAL(30)
PLANS
Syntax:
PLANS(size_of_plan_measurement_block_pool)
The PLANS parameter defines the size of the DB2/QM plan measurement block
pool. DB2/QM records data related to plan execution in plan measurement blocks.
Define a plan measurement block pool size large enough to contain the maximum
amount of plans executed within the recording interval.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.
DBRMS
Syntax:
DBRMS(size_of_dbrm_measurement_block_pool)
The DBRMS parameter defines the size of the DB2/QM DBRM measurement block
pool. DB2/QM records data related to statement execution within a DBRM/Package
in DBRM measurement blocks. Define the DBRM measurement block pool size
large enough to contain the maximum amount of individual SQL statements
executed within a recording interval.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.
If DB2/QMs dataspace storage requirements exceed the limitations imposed
by this parameter, SQL measurement data may be lost. Omitting this
parameter forces DB2/QM to set the limit to the amount of blocks that can fit
into a 2GB dataspace. The amount of control blocks, or nodes available, can
be determined by issuing an F DB2QM,DISPLAY DATASPACES command
after startup.
SQL
Syntax:
SQL(size_of_sql_image_pool)
The SQL parameter defines the size of the DB2/QM SQL image block pool.
DB2/QM records SQL statement images in SQL image blocks. Define SQL image
block pool size large enough to contain the maximum amount of statement images
captured within the recording interval. Each SQL image block contains 80
characters of a given SQL image. DB2/QM can use multiple SQL image blocks to
represent up to 4096 bytes of a given SQL image.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.
If DB2/QMs dataspace storage requirements exceed the limitations imposed
by this parameter, SQL measurement data may be lost. Omitting this
parameter forces DB2/QM to set the limit to the amount of blocks that can fit
into a 2GB dataspace. The amount of control blocks, or nodes available, can
be determined by issuing an F DB2QM,DISPLAY DATASPACES command
after startup.
AUTHID
Syntax:
AUTHID(DB2 AUTHID)
Chapter 2. Tailoring Query Monitor Files
The AUTHID parameter defines the DB2 AUTHID that DB2/QM uses to establish a
connection to DB2 during interval processing.
Example:
AUTHID(DB2USER)
The above example identifies DB2USER as the DB2 Authid that DB2/QM will use to
connect to DB2 during interval processing.
EXPROF
Syntax:
EXPROF(EXCEPTION_PROFILE_NAME)
The EXPROF parameter defines the name of the exception profile that DB2/QM
loads at startup.
Example:
EXPROF(R51AEXPF)
The above example instructs DB2/QM to use the exception profile EXPRF1.
EXCEPTIONS
Syntax:
EXCEPTIONS(EXCEPTION_SCAN_INTERVAL_LENGTH)
The EXCEPTIONS keyword defines the length of the exception scan interval in
seconds. The default scan interval length is 30 seconds.
Example:
EXCEPTIONS(10)
As a job
Submit the DB2/QM JCL from TSO or ISPF.
Example:
//CQMJOB JOB, DB2QM,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//STEP1
EXEC CQMPROC
As a job
Issue the MVS STOP command to stop the DB2/QM job. Follow the procedures for
stopping a DB2/QM started task, above.
Note: The MVS CANCEL command can terminate a DB2/QM subsystem.
Avoid using the MVS FORCE command to terminate a DB2/QM
subsystem. Unpredictable results may occur otherwise, including the
termination of any monitored DB2 subsystems.
Invoking QM
You will tailor two CLISTs found in SCQMSAMP to invoke QM. Change the CLIST
CQM as follows:
v PROC 0 CLISTLIB()
v PROC 0 CLISTLIB(hlq.SCQMSAMP)
Change the CLIST CQMCLIST as follows:
v PROC 0 HILEVEL(&HILEVEL)
v PROC 0 HILEVEL(hlq)
And also change:
v ALLOC FILE(DB2PARMS) DA(&HILEVEL.DB2.CONTROL) SHR REUSE
v ALLOC FILE(DB2PARMS) DA(hlq.DB2.CONTROL) SHR REUSE, where the hlq
will be the data set high level qualifier of the one control file created in
CQMCNTFL or the hlq of the preexisting CONTROL file, if this step was skipped.
To invoke QM, execute the CLIST CQMCLIST.
==>
==>
==>
DB2 Subsystem ID
Enter the subsystem identifier (SSID) for the DB2 subsystem you want to configure.
This is a four-character maximum field. You must run through the following
configuration steps and specify the appropriate SSID in this field for each
subsystem against which you want to run DB2 Query Monitor.
10
11
Plan Name
Enter the eight-character plan name for DB2 Query Monitor. This is the same plan
name used in member CQM#BIND in the SCQMSAMP library when you bound the
plan for DB2 Query Monitor in the preceding steps.
Note: You must reconfigure subsystem information for each DB2 that records
DB2/QM interval data.
12
Verifying Installation
1. Start a DB2/QM subsystem to monitor a given DB2 subsystem. For information
on monitoring DB2 subsystems, see the MONITOR parameter in Chapter 2,
Tailoring Query Monitor Files.
2. Issue the following query against the monitored DB2 subsystem using a tool
such as DB2s SPUFI:
SELECT * FROM SYSIBM.SYSDUMMY1;
3. Enter the DB2/QM ISPF Dialog. Enter option 1 from the DB2/QM Primary
Option menu. You should see the thread you created by entering the query in
Step #2.
13
14
15
16
the interval is set to 60 minutes, then the calculation is: n = (90)(2)(60) = 10800
(120)(10800) = 1296000
ROUND(1296000/1024) = 1266
1266 + 72 = 1338
Tablespace PRIQTY 1338
Tablespace SECQTY 268
Indexspace PRIQTY 268
Indexspace SECQTY 134
17
is: Let n equal the number of estimated DBRM/SQL statement combinations per
interval.
Let ROUND be the process of rounding up to the nearest integer.
18
19
20
Overview
IBM DB2 Query Monitor allows system administrators and/or DBAs to monitor DB2
resource consumption and pinpoint inefficient or improperly coded SQL statements.
IBM DB2 Query Monitor performs this task with minimal system overhead, and
without running expensive DB2 traces.
IBM DB2 Query Monitor allows the user to view statistics about current and
historical SQL activity. It also allows dynamic monitoring of DB2 subsystems. Users
may define profiles that filter performance data at the monitoring- and display
interface levels. Additionally, exception conditions can be set up to alert users when
specific SQL related thresholds exceed defined limits.
DB2 QM Subsystems
A DB2 QM Subsystem records SQL performance statistics related to one or more
DB2 Subsystem. A DB2 QM Subsystem may run as a started task or job.
Each DB2 QM Subsystem can monitor and record SQL performance data for up to
64 DB2 Subsystems; however, a given DB2 Subsystem cannot be monitored by
more than one DB2 QM Subsystem. Interval data for all DB2 Subsystems defined
in a DB2 QM Subsystem is stored in one DB2.
TSO/ISPF Facility
The TSO/ISPF facility of DB2 Query Monitor allows the end user to display DB2
SQL performance data. This feature allows the end user to determine what impact
certain SQL processing has on DB2 resources. End users of the ISPF facility can
view SQL performance data at the plan level and at the DBRM/Package statement
level.
Intervals
Intervals are segments of time defined by the administrator, into which data is
divided once captured. When you view past SQL activity you are viewing data for a
discrete period in time.
Current interval data resides in memory; whereas, prior interval data resides in
partitioned table spaces.
Intervals are defined by the INTERVAL startup parameter. For further information on
setting Intervals refer to Chapter 2, Tailoring Query Monitor Files.
21
SORT: When presented with a panel of scrollable or tabular data, you can sort the
data by column using the SORT command.
The command structure for sorting is as follows: SORT COLUMN_NAME D
Columns are referenced by the column name or column number. Type column
names as they appear on the column heading, except when the column name
contains a space (for which you must use an underscore (_)). Column numbers are
not labeled on the panel; instead, they are numbered from left to right across the
panel. The CMD column is column 1, and columns to the right are numbered
sequentially.
Data can be sorted in either ascending (A), or descending (D) order. To specify sort
order, append the A or D to the end of the SORT command. The default is
ascending.
For example, to sort column 2 in descending order, type: SORT 2 D at the
command line. This sorts the data in descending order by column 2.
FIND: The FIND command allows you to find a unique string within a panel of
data.
The command structure for FIND is as follows: FIND ABC
If the specified string is found, the cursor moves to the first position of the found
string. If the specified string is not found, the message Find string not found is
displayed.
Be as specific as possible you use the FIND command to receive an optimal return.
Scrolling: When presented with data that exceeds the size of the panel, indicators
have been provided to alert you that additional data exists outside the visible panel.
Four character spaces on line 3 of the upper right-hand corner of the panel indicate
a scrollable page. Pages may be scrollable horizontally, vertically, or both.
A plus sign (+) and/or a minus sign (-) indicates that there is additional data
vertically. Use PF8 to scroll down. Use PF7 to scroll up.
The less-than sign (<) and/or the greater-than sign (>) indicates that there is
additional data horizontally. Use PF10 to scroll to the left. Use PF11 to scroll to the
right.
Color Coding: DB2 Query Monitor uses color to convey information. If you are
working on a terminal or other panel that does not support color displays, you will
not see this feature.
Printing: You can print the contents of any IBM DB2 Query Monitor panel by
typing PRINTX at any Option line. There is no system feedback, although the
current display is written to the RSCPRINT DD of your TSO session.
Profiles
There are several types of profiles, each providing means to customize data
monitoring and collection.
22
Monitoring Profile
The Monitoring Profile defines what activity each monitoring agent will capture, such
as activity involving connections, users, plans, or DBRMs of a DB2 subsystem.
Agents
Monitoring Agent refers to the interface that DB2 QM installs within a DB2
subsystem to capture SQL performance data.
Application Profile
The Application Profile defines what data will be displayed out of the data collected.
Each user can have his or her own profile.
Exception Profile
The Exception Profile specifies acceptable limits of processing.
Exceptions
An exception is a condition that occurs when a defined threshold has been
exceeded.
The Exception Profile specifies what threads are within acceptable limits. When a
thread is outside an acceptable limit, an exception is generated and displayed in
red on the screen.
Thresholds
A threshold is a defined limit on SQL processing initiates an exception condition
when it has been exceeded.
Thresholds can be set in the Exception Profile panel.
Thresholds can be set up for:
v Total SQL calls
v
v
v
v
v
v
Total Getpages
Lock requests
CPU time
Elapsed time
Application CPU time
Application elapsed time
23
User:
------------------------------------------------------------------------------1.
2.
3.
4.
5.
S.
Setup
X.
24
S. Setup
Use the Setup command to tailor DB2 parameters in the control file, which allows
DB2/QM interval processes to connect to DB2. See Chapter 12, Setup, for more
information.
Type S to display the Enter DB2 System Parameters panel.
25
26
(Active/Interval)
(Detail/Summarize)
-------------------------------------------------------------------------------Cmd
SSID Intv
DB2 Elapsed
SQL Calls
Valid Line Commands: (Sql detail, Instruction totals, Buffers, Delays, Locks)
Function
The Thread Activity panel shows SQL thread activity in the current interval.
Display Threads
Active/Interval: This setting allows the user to display threads that are currently
active in DB2 or threads that have been active sometime within the current interval.
Detail/Summarize: This setting allows the user to display the data about thread
activity on a detail level or to summarize by plan name.
Features
Data
The following columns are part of the Thread Activity panel:
1.
2.
3.
4.
5.
Copyright IBM Corp. 2000
27
6.
7.
8.
9.
10.
DB2 Elapsed
SQL Calls
X Exec
Connectn (DB2 Connection Name)
APPL Elapsed
11.
12.
13.
14.
15.
16.
17.
APPL CPU
Total Getpages
Plan Name
Token
Accounting Token
Requesting Site (IP address of client for distributed thread)
NETID (Network ID)
18.
19.
20.
21.
LUNAME
AUTHID (DB2 Auth)
Plan Start Time
Plan End Time
28
Locks: Type L to go to the Thread Locking Events panel, which shows lock
statistics.
SQL Detail: Type S to display the DB2 Query Monitor Detail panel. This panel
displays activity for DBRMs and/or packages that execute under a plan.
This is the DB2 Query Monitor Plan Detail panel:
CQM$DPLN V1R1 -------- Query Monitor Plan Detail -------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:
Plan:
DB2 SSID:
Totals or Averages:
(Total of all executions/Average of each execution)
------------------------------------------------------------------------------Cmd DBRM/PKG
Collection ID
DB2 Elapsed
SQL Calls
The following line commands are valid on the DB2 Query Monitor Detail panel:
Instruction totals:: Type Iin the line command field of the Thread Activity panel to
display the SQL Instruction Counts panel. This panel displays counts by instruction
type that executes under a plan.
29
Plan:
Totals or Averages:
DB2 SSID:
------------------------------------------------------------------------------Instruction
-----------
Totals Instruction
------ -----------
Totals Instruction
------ -----------
Totals
------
The following line commands are valid on the SQL Instruction Counts panel:
Buffers: Type B in the line command field of the Thread Activity panel to display
the Plan Bufferpool Statistics panel. This panel will display bufferpool statistics..
This is the Plan Bufferpool Statistics panel:
CQM$BTHR V1R1
------- Plan Bufferpool Statistics ------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:
Plan:
DB2 SSID:
Plan Execution Count:
Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------Bufferpool:
Get Page Requests
Buffer Pages Updated
Synchronous Pages Read
Synchronous Pages Written
Sequential Prefetch Requests
List Prefetch Requests
Dynamic Prefetch Requests
Successful Hiperpool Reads
Hiperpool Read Failures
Successful Hiperpool Writes
Unsuccessful Hiperpool Writes
Async Pages Read
Async Pages Read by Hiperpool
Valid Commands: (End)
The following line commands are valid on the Plan Bufferpool Statistics panel:
30
Delays: Type D to display the Thread Delays panel. This panel shows statistics on
events that cause delays in the execution of plans or packages.
This is the Thread Delays panel:
CQM$ETHR V1R1
-------------- Thread Delays ------------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:
Plan:
DB2 SSID:
Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------+
Delay Event
Lock or Latch Delays
Synchronous I/O Delays
Other Read Delays
Other Write Delays
Service Task Switch Delays
Archive Log Quiesce Delays
Archive Log Read Delays
Drain Lock Delays
Claim Release Delays
Page Latch Delays
Stored Procedure Delays
Notify Message Delays
Global Contention Delays
Valid Commands: (End)
Event Count
Delay Time
The following line commands are valid on the Thread Delays panel:
Locks: Type L to display the Thread Locking Events panel. This panel shows lock
statistics.
This is the Thread Locking Events panel:
CQM$LTHR V1R1 ---------- Thread Locking Events --------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:
Plan:
DB2 SSID:
Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------+
Lock Event
Lock Deadlocks
Lock Suspensions
Lock Timeouts
Latch Suspensions
Other Suspensions
Lock Requests
Unlock Requests
Query Requests
Change Requests
Other Requests
Claim Requests
Claim Failures
Drain Requests
Valid Commands: (End)
Event Count
31
32
Function
The Interval panel allows you to view performance data for previous intervals. The
first panel you see is a list of intervals through which you can scroll. You can use
the three valid line commands, Select, Unload Data, and Load history to work
with specific intervals.
Features
Data
The following columns are part of the Interval panel:
v Avail
v Start Date
v
v
v
v
v
Start Time
End Date
End Time
Prtn (Partition)
Offloaded Dataset
Description
SELECT
UNLOAD DATA
LOAD HISTORY
33
Command
Description
NEXT
This command displays the next interval. PF6 also performs this command.
PREV
This command displays the previous interval. PF4 also performs this
command.
CURRENT
Issued from an Interval Thread Activity panel, this command displays the
current Thread Activity panel.
34
Subsystem
Active
Monitored
DB2 QM SSID
Profile
Function
This panel allows you to turn monitoring agents on and off for specific DB2
subsystems.
Features
Data
Data columns in this panel include:
v Subsystem
v Active
v Monitored
v DB2 QM SSID
35
36
Function
The View DB2 Commands Executed panel allows you to view command activity.
Features
Data
Data columns in this panel include:
v Job Name
v Authid
v Timestamp
v Command Text
37
38
1)
Monitoring
cap
2)
be
3)
Exception
ex
Function
Use the panels in the Profile option to set the criteria for what data is collected,
what data is displayed, and what data generates exceptions.
Features
The Profile panel is a menu that provides access to three types of profiles:
v Monitoring
v Application
v Exception
Monitoring Profiles
The Monitoring Profile acts as a filter to determine what activity each monitoring
agent will capture.
39
Function: The Monitoring Profiles panel allows you to create new monitoring
profiles, and to make changes to existing ones.
Features: Profile data is displayed and can be accessed through line commands.
Data: Data columns on this panel include:
v Profile
v Description
v Last User
v Upd Timestamp
Valid Line Commands: The following line commands are valid on the Monitoring
Profiles panel:
Line Command
Description
CREATE
UPDATE
DELETE
Create Profile: Type C to create a profile. Type the profile name and description
then press Enter. A second window appears where you may select the type of
profile to create (AUTHID, CONNECTN, JOB, PLAN, or SSID). Type C next to the
desired profile type, then press Enter to display the Update Detail window where
you may complete the new profile.
40
Update Profile: Type U to update a profile. At the Update Detail window, you may
change the specifics of the profile. A message is issued after you update the profile
to indicate that it was successfully updated.
CQM$PRFT V1R1 --- Update
--Option ===> __________________________________ Scroll ===> PAGE
Description ________________________________________
Valid Cmds: Create,Update,Delete
------------------------------------------------------------Cmd Type
Inc/Exc Fltr Data QM Pln SQLOrd Interv Host V
Delete: Type D to delete a profile. A message displays that prompts you to confirm
your decision, followed by a second message confirming the deletion was made.
Application Profiles
The Application Profile serves as a filter to determine what data will be displayed on
ISPF, from the data that was collected. This is the default selection from the Work
with Profiles panel.
41
Profile
Description
Function: The Application Profiles panel is where you manage all application
profiles.
Features: You can select, create, update, and delete application profiles from this
panel.
Data: Data columns in this panel include:
v Profile
v Description
v Last User
v Upd Timestamp
Valid Line Commands: The following line commands are valid on the Application
Profiles panel:
Line Command
Description
SELECT
CREATE
UPDATE
DELETE
42
to the desired profile type, then press Enter to display the Update Detail window
where you may complete the new profile.
CQM$PRFC V1R1 --- Create Profile --Option ===> _________________________________________
Profile Name _____________
Description
___________________________________
(Yes/No)
(Yes/No)
(Yes/No)
(Yes/No)
Exception Profiles
The Exception Profile specifies what threads are within acceptable limits. When a
thread is outside an acceptable limit, an exception is generated and displayed in
red on the screen.
Thresholds can be set on the following items:
v Total SQL Calls
v Total Getpages
v Lock Requests
v Lock Escalations
v CPU Time
v
v
v
Elapsed Time
Application CPU Time
Application Elapsed Time
43
Profile
Description
Function: The Exception Profiles panel is where you manage exception profiles.
The Exception Profiles panel displays a list of current profiles to which you can
make changes.
Features: You can create, update and delete exception profiles from this panel.
Data: Data columns in this panel include:
v Profile
v
v
v
v
Description
Last User
Upd
Timestamp
Valid Line Commands: The following line commands are valid for the Exception
Profile panel:
44
Create: Type C to create a new profile. The Create Profile window is displayed:
CQM$EXCC V1R1 ---- Create Profile ---Option ===> ______________________________________________
Profile Name ______________
Description
_______________________________________
____________
____________
____________
____________
__ : __ : __
__ : __ : __
__ : __ : __
__ : __ : __
__
__
__
__
:
:
:
:
__
__
__
__
:
:
:
:
__
__
__
__
45
46
==>
==>
==>
==>
Use Option #2 from the menu above to work with Query Monitor parameters. The
Update Parameters for DB2 Subsystem panel opens. At this panel you may specify
the plan name to display objects. A sample panel is shown below.
47
48
==>
Instructions
From the main panel, type 1 to select View Current Activity. The Thread
Activity panel is displayed.
From the Thread Detail or the Interval Thread Detail panel, type S on the
CMD line. The Plan Detail panel is displayed.
From the Plan Detail panel, type S on the CMD line. The DBRM Detail
panel is displayed.
From the DBRM Detail panel, type S on the CMD line. The SQL Instruction
Text panel is displayed.
From the main panel, type 1 to select View Current Activity, then type B for
Buffer. The Thread Bufferpool Statistics panel is displayed.
From the main panel, type 1 to select View Current Activity, then type I for
Instruction counts. The SQL Instruction Counts panel displayed.
From the main panel, type 1 to select View Current Activity, then type L for
Locks. The Thread Locking Events panel is displayed.
From the Thread Activity or the Interval Thread Activity panel, type D. The
Thread Delays panel is displayed.
49
50
Displaying Activity
To display activity within the DB2/QM dataspace pools, enter the DISPLAY
DATASPACES command.
Refer to Chapter 15, DB2 Query Monitor Operator Commands, for more
information about the DISPLAY DATASPACES command.
Syntax
F db2qmtask,DISPLAY DATASPACES
Output
CQM3240I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
To determine space usage in a particular pool, subtract the available nodes from
the total nodes, and then multiply by the node size. This will determine the amount
of storage in use for control blocks in the given pool.
For example, in the above output the amount of space used by the SQL dataspace
would be 11,232 bytes.1
(22,335,490 - 22,335,373) * 96 = 11,232
Copyright IBM Corp. 2000
51
____________________________________
1
The actual space used may be anywhere from 11,232 bytes to one megabyte
because DB2/QM frees storage on a segment boundary.
52
Valid Commands
The valid DB2/QM operator commands are listed below.
DISPLAY DATASPACES
The DISPLAY DATASPACES command displays statistics related to DB2/QMs
dataspace usage. For more information on this command, see Chapter 14,
DB2/QM Memory Usage Statistics.
INTERVAL
Use the INTERVAL command to dynamically invoke DB2/QMs interval processor.
During normal operation, DB2/QM creates interval data when a recording interval
expires or during DB2/QM shutdown.
53
54
Appendix. Notices
This information was developed for products and services offered in the U.S.A. IBM
may not offer the products, services, or features discussed in this document in other
countries. Consult your local IBM representative for information on the products and
services currently available in your area. Any reference to an IBM product, program,
or service is not intended to state or imply that only that IBM product, program, or
service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However,
it is the users responsibility to evaluate and verify the operation of any non-IBM
product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10594-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to
you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this publication at any
time without notice.
Any references in this publication to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those
Web sites. The materials at those Web sites are not part of the materials for this
IBM product and use of those Web sites is as your own risk.
Licensees of this program who wish to have information about it for the purpose of
enabling: (i) the exchange of information between independently created programs
and other programs (including this one) and (ii) the mutual use of the information
which has been exchanged, should contact:
55
IBM Corporation
J74/G4
555 Bailey Avenue
P.O. Box 49023
San Jose, CA 95161-9023
U.S.A.
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
Any performance data contained herein was determined in a controlled
environment. Therefore, the results obtained in other operating environments may
vary significantly. Some measurements may have been made on development-level
systems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurement may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those
products, their published announcements or other publicly available sources. IBM
has not tested those products and cannot confirm the accuracy of performance,
compatibility or any other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the suppliers of those
products.
All statements regarding IBMs future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
All IBM prices shown are IBMs suggested retail prices, are current and are subject
to change without notice. Dealer prices may vary.
This information is for planning purposes only. The information herein is subject to
change before the products described become available.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which
illustrates programming techniques on various operating platforms. You may copy,
modify, and distribute these sample programs in any form without payment to IBM,
for the purposes of developing, using, marketing or distributing application programs
conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly
tested under all conditions. IBM, therefore, cannot guarantee or imply reliability,
serviceability, or function of these programs.
56
If you are viewing this information softcopy, the photographs and color illustrations
may not appear.
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or
other countries or both:
Advanced Peer-to-Peer
Networking
AIX
AIX/6000
CICS
CICS/MVS
CICS/VSE
DATABASE 2
DB2
Distributed Relational
Database Architecture
DRDA
DXT
GDDM
IBM
MVS/ESA
MVS/XA
OfficeVision/VM
OS/2
PL/I
PROFS
QMF
SQL/DS
Virtual Machine/Enterprise
Systems Architecture
VM/XA
VSE/ESA
Other company, product, and service names, which may be denoted by a double
asterisk (**), may be trademarks or service marks of others.
Appendix. Notices
57
58
Overall satisfaction
Very Satisfied
h
Satisfied
h
Neutral
h
Dissatisfied
h
Very Dissatisfied
h
Neutral
h
h
h
h
h
h
Dissatisfied
h
h
h
h
h
h
Very Dissatisfied
h
h
h
h
h
h
How satisfied are you that the information in this book is:
Accurate
Complete
Easy to find
Easy to understand
Well organized
Applicable to your tasks
Very Satisfied
h
h
h
h
h
h
Satisfied
h
h
h
h
h
h
h Yes
h No
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any
way it believes appropriate without incurring any obligation to you.
Name
Company or Organization
Phone No.
Address
SC27-0968-00
___________________________________________________________________________________________________
Cut or Fold
Along Line
_ _ _ _ _ _ _Fold
_ _ _and
_ _ _Tape
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please
_ _ _ _ _do
_ _not
_ _ staple
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Fold
_ _ _and
_ _ Tape
______
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES
IBM CORPORATION
Department BWE/H3
P.O. Box 49023
San Jose, CA 95161-9023
U.S.A.
_________________________________________________________________________________________
Fold and Tape
Please do not staple
Fold and Tape
SC27-0968-00
Cut or Fold
Along Line
File Number:
Program Number: 5675E67
SC27-0968-00