Could you please provide me the a Job with IQL statements or Data Collector options in CA SYSVIEW for DB2 to generate a report for CPU Utilization by DB2 in percentage on a daily basis and for the last two or three months also?.
Release : 20.0
Component : CA SYSVIEW Performance Management Option for DB2 for z/OS
We cannot generate the report in percentage, because the value to use as a total (on which a percentage is based) is not known.
For example, I want to run a DB2 stats report using SMF data from August 4, 2019. How long had the DB2 subsystem been up at the time that those SMF records were written?. The DB2 STATS SMF records do not contain the start date/time of the DB2 Subsystem, so it cannot be computed.
In the CA SYSVIEW for DB2 panels, while DB2 Subsystem is running, we can check the ASCB control block for the active DB2 Subsystem and get the start time, which is why we can do it the online IQL requests.
The BTSTASM1 report is in the CDBATREQ library with all the other IQL Requests. You can use a GLOBALS DD statement in your batch job to specify an override INTERVAL = 1 DAY to get a daily report.
The JCL would look like this:
//[email protected] EXEC PGM=NSIGHTRW
//STEPLIB DD DISP=SHR,DSN=R200.LOADLIB
//DB2DDN DD DISP=SHR,
//SYSPARMS DD DISP=SHR,
//OBIDTBL DD DISP=SHR,DSN=IDB2.TABLE.OBID
//DBGPRINT DD SYSOUT=*
//OUTX DD SYSOUT=*
//DBGIN DD DSN=R200.CDBATREQ(BTSTASM1),DISP=SHR
//BTSTASM1 DD SYSOUT=*
//GLOBALS DD *
GLOBALS INTERVAL = 1 DAY
You can use the GLOBALS WHERE clause instead of INTERVAL. Then you can say something like WHERE EVENT-DATE > x and EVENT-DATE < y to get a customized range.