To use the monitors, you:
To add a monitor, choose:
Figure 37 shows an example of adding the SHOW ACTIVE monitor for the SQLDBA database.
Figure 37. How to Add a SHOW ACTIVE Monitor
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*--------------------------- MONITOR UTILITY ----------------------------* |
|| | |
|| DATABASE => SQLDBA | |
|| | |
|| *************************************************************************** | |
|| | |
|| OPTION => 04 01 START KERNEL 02 STOP KERNEL | |
|| 03 LIST MONITORS 04 ADD MONITOR | |
|| 05 MODIFY MONITOR 06 DELETE MONITOR | |
|| 07 DISPLAY MONITOR 08 VIEW DATA | |
|| 09 RESET DATA 10 PRINT REPORT | |
|| | |
|| *************************************************************************** | |
|| | |
|| MONITOR => 01 01 SHOW ACTIVE 02 SHOW LOCK | |
|| 03 SHOW DBEXTENT 04 SHOW LOG | |
|| 05 SHOW CONNECT 06 SHOW DBSPACE 00001 | |
|| 07 COUNTER * | |
|| | |
|*------------------------------------------------------------------ SQC40 ----* |
| |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT |
+--------------------------------------------------------------------------------+
When you press ENTER to process the choices you have made on the Monitor Menu, you see the Monitor Maintenance menu. The Monitor Maintenance menu shows you the status of the monitor in the current database. You use this menu to make a specific monitor active or not. You also can schedule when you want the monitor to run. You can choose to reset the data the monitor has collected as well as define and print reports from here.
Figure 38. Adding a Monitor on the Monitor Maintenance menu
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*------------------------- MONITOR MAINTENANCE -------------------------* |
|| | |
|| DATABASE => SQLDBA MONITOR => ACTIVE | |
|| | |
|| DESCRIPTION => monitor our active users | |
|| ACTIVE? => 1 (1=YES/2=NO) | |
|| 1 2 3 4 5 6 7 | |
|| RUN DAYS => 2 1 1 1 1 1 2 (1=YES/2=NO) | |
|| START TIME => 1400 (HHMM) | |
|| STOP TIME => 1600 (HHMM) | |
|| INTERVAL => 0005 (HHMM) | |
|| RESET DATA? => 2 (1=YES/2=NO) | |
|| RESET DAY => 1 (1-7) | |
|| PRINT REPORT? => 1 (1=YES/2=NO) | |
|| | |
|| ************************ REPORT PARAMETERS ************************ | |
|| | |
|| REPORT NAME => ACTIVE CLASS => A | |
|| PRI => 3 DISP => D (D,H,L,K) | |
|*------------------------------------------------------------------ SQC42 ----* |
| |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT F12=CANCEL |
+--------------------------------------------------------------------------------+
The monitor shown above is active and scheduled to run Monday-Friday (days 2-6), every five minutes, from 14:00 to 16:00. Additional options include printing the report and controlling the resetting of the data collected in the monitor table.
You can specify:
Disposition defaults to D.
When Adding a SHOW ACTIVE, SHOW CONNECT, SHOW DBEXTENT, SHOW LOCK or a SHOW LOG monitor, you can also specify a threshold for the monitor.
Figure 39 shows how to set the CHECKPOINT WAIT and USER WAIT thresholds for the SHOW ACTIVE monitor that belongs to database SQLDBA.
Figure 39. SHOW ACTIVE Threshold Specification
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*------------------------ MONITOR THRESHOLDS --------------------------* |
|| | |
|| DATABASE => SQLDBA MONITOR => ACTIVITY | |
|| | |
|| *************************** SHOW ACTIVE *************************** | |
|| CHECKPOINT WAIT => 1 (1=YES/2=NO) | |
|| USER WAIT => 1 (1=YES/2=NO) | |
|| | |
|| *************************** SHOW CONNECT *************************** | |
|| AGENT NOT PROCESSING => 2 (1=YES/2=NO) | |
|| INACTIVE => 2 (1=YES/2=NO) | |
|| | |
|| ***************************** SHOW LOCK ***************************** | |
|| CHECKPOINT => 2 (1=YES/2=NO) | |
|| ANY LOCKING => 2 (1=YES/2=NO) | |
|| | |
|| *************** SHOW LOG AND SHOW DBEXTENT *************** | |
|| PERCENT USED => __ % | |
|| | |
|*------------------------------------------------------------------ SQC42 ----* |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT F12=CANCEL |
+--------------------------------------------------------------------------------+
To activate threshold checking, for the SHOW ACTIVE, SHOW CONNECT, or SHOW LOCK monitors, specify "1" (YES). To deactivate threshold checking, specify "2" (NO).
To initiate SHOW LOG or SHOW DBEXTENT threshold checking, specify PERCENT USED as a number between 1 and 99. Figure 40 is a partial screen image showing how to set the SHOW LOG monitor to issue a VSE console message if the monitor detects a value of 75% or greater.
Figure 40. SHOW LOG Threshold Specification
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*------------------------ MONITOR THRESHOLDS --------------------------* |
|| DATABASE => SQLDBA MONITOR => LOG | |
|| | |
|| | |
|| *************** SHOW LOG AND SHOW DBEXTENT *************** | |
|| PERCENT USED => 75% | |
|*------------------------------------------------------------------ SQC42 ----* |
| |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT F12=CANCEL |
+--------------------------------------------------------------------------------+
The fields displayed on the Monitor Threshold screen set thresholds for:
Once you have defined a monitor, you need to enable it. Choose Option 1, Start Kernel from the Monitor Utility menu. |A kernel must be "started" in each database for which any |monitor is defined before that monitoring activity can take place.
Once you are using a monitor, you may decide you want to change some or all of its settings. For example, you may decide you want the monitor to execute more frequently. If you want to modify a monitor, choose Option 5 on the Monitor Menu. You will see the Monitor Maintenance menu where you can make your changes to the monitor. Figure 41 shows how to enter 2 in the ACTIVE? field to deactivate the SHOW ACTIVE monitor.
Figure 41. Updating (Deactivating) a Monitor
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*------------------------- MONITOR MAINTENANCE -------------------------* |
|| | |
|| DATABASE => SQLDBA MONITOR => ACTIVE | |
|| | |
|| DESCRIPTION => MONITOR OUR ACTIVE USERS | |
|| ACTIVE? => 2 (1=YES/2=NO) | |
|| 1 2 3 4 5 6 7 | |
|| RUN DAYS => 2 1 1 1 1 1 2 (1=YES/2=NO) | |
|| START TIME => 1400 (HHMM) | |
|| STOP TIME => 1600 (HHMM) | |
|| INTERVAL => 0005 (HHMM) | |
|| RESET DATA? => 2 (1=YES/2=NO) | |
|| RESET DAY => 1 (1-7) | |
|| PRINT REPORT? => 1 (1=YES/2=NO) | |
|| | |
|| ************************ REPORT PARAMETERS ************************ | |
|| | |
|| REPORT NAME => ACTIVE CLASS => A | |
|| PRI => 3 DISP => D (D,H,L,K) | |
|*------------------------------------------------------------------ SQC42 ----* |
| |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT F12=CANCEL |
+--------------------------------------------------------------------------------+
Figure 42 shows how to enter 2 to execute the SHOW ACTIVE monitor every two minutes instead of the five minutes originally defined in Figure 41.
Figure 42. Updating (Deactivating) a Monitor
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*------------------------- MONITOR MAINTENANCE -------------------------* |
|| | |
|| DATABASE => SQLDBA MONITOR => ACTIVE | |
|| | |
|| DESCRIPTION => MONITOR OUR ACTIVE USERS | |
|| ACTIVE? => 2 (1=YES/2=NO) | |
|| 1 2 3 4 5 6 7 | |
|| RUN DAYS => 2 1 1 1 1 1 2 (1=YES/2=NO) | |
|| START TIME => 1400 (HHMM) | |
|| STOP TIME => 1600 (HHMM) | |
|| INTERVAL => 2 (HHMM) | |
|| RESET DATA? => 2 (1=YES/2=NO) | |
|| RESET DAY => 1 (1-7) | |
|| PRINT REPORT? => 1 (1=YES/2=NO) | |
|| | |
|| ************************ REPORT PARAMETERS ************************ | |
|| | |
|| REPORT NAME => ACTIVE CLASS => A | |
|| PRI => 3 DISP => D (D,H,L,K) | |
|*------------------------------------------------------------------ SQC42 ----* |
| |
|PRESS ENTER TO PROCESS |
|ENTER F1=HELP F3=EXIT F12=CANCEL |
+--------------------------------------------------------------------------------+
The View Data Option displays the selected monitor report at the user's terminal. An example of the View Data Option for the SHOW ACTIVE monitor is below. This information is useful in monitoring trends or resource consumption of your database.
Figure 43. Monitor Report Data
+--------------------------------------------------------------------------------+
| mm/dd/yyyy CONTROL CENTER hh:mm:ss |
|*---------------------------- MONITOR DATA ---------------------------* |
|| DATABASE => SQLDBA MONITOR => ACTIVE | |
|| | |
|| | |
|| COMM LOCK CHKPT PAGE BLOCK I/O | |
|| DATE TIME NACT NIW R/O R/W NEW WAIT WAIT WAIT WAIT WAIT WAIT | |
|| ---------- -------- ---- --- --- --- --- ---- ---- ----- ---- ----- ---- | |
|| 2000-01-18 16.25.10 3 2 1 0 0 0 0 0 0 0 0 | |
|| 2000-01-18 17.06.56 3 2 1 0 0 0 0 0 0 0 0 | |
|| 2000-01-19 16.16.37 3 2 1 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.17.05 3 2 1 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.20.01 3 2 1 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.22.01 3 0 3 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.24.01 3 0 3 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.26.01 3 1 2 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.28.01 3 1 2 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.49.18 3 2 1 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 16.55.18 3 1 2 0 0 2 0 0 0 0 0 | |
|| 2000-01-19 17.01.18 3 1 2 0 0 2 0 0 0 0 0 | |
|*------------------------------------------------------------------ SQC44 ----* |
| |
| |
|F1=HELP F3=EXIT F4=TOP F5=BOT F7=BWD F8=FWD F10=LEFT F11=RIGHT F12=CANCEL |
+--------------------------------------------------------------------------------+
To understand the monitor measurements, refer to the appropriate sections of the DB2 Server for VSE & VM Operation manual.
There are two methods that can be used to stop a monitor. You can disable ALL monitors in a specific database by selecting the STOP KERNEL
option from the Monitor Utility menu, or you can disable a single monitor by deactivating it from the Monitor Maintenance menu. To restart all monitors, stopped due to the kernel being stopped, select the START KERNEL from the Monitor Utility menu, or to restart a single monitor, reactivate it from the Monitor Maintenance menu. |For a monitor to be active, a kernel must be running in its |database.