IBM Support

QMGTOOLS: Performance Super Collection (STRPSC)

Question/Answer


Question

What should I collect for performance issues?

Answer

QMGTOOLS has several programs to help collect performance data. One is the STRPSC command. It will collect Job Watcher data, PEX data, a trace connection, DB trace, and collection services performance data.
 

Important Note

If an error message, CPFAF02, occurs after starting PEX using this tool, check to see that no other PEX traces are active. You can view all PEX sessions on the system using command ENDPEX <enter>.

If the PEX session is named QPMINTPEXD, then Collection Services is active and using a collection profile that is not the default. To view the status of Collection Services, type GO PERFORM and choose the option to collect performance data (normally option 2). From this menu, you should see the parameter "Collection profile". The default is *STANDARDP. A profile of *ENHCPCPLN will result in a PEX session, QPMINTPEXD, being started. Temporary turn off Collection Services in order to run this PEX.

If there is a user defined PEX session, end that, and repeat the steps to start the collection again.

Reference error message ID: CPFAF02, diagnostic code 010020, diagnostic data 139-8195

 

Installing QMGTOOLS

If QMGTOOLS is not installed, follow this URL :

http://www-01.ibm.com/support/docview.wss?uid=nas8N1011297

 

 

Quick Start Guide

Step 1 First check to see if the required PTFs are applied. There are 2 options.

  • -

     

     
    Option 1 - Use QMGTOOLS to check for PTFs

    Run command : QMGTOOLS/CMPPEXPTF

    This command will attempt to FTP to IBM's public FTP site and compare the recommended PTFs for PEX/Job Watcher. If this command fails (unable to FTP, etc.), follow Option 2

    Option 2 - Compare the iDoctor website

    Perform an internet search for IBM iDoctor. Once at the IBM iDoctor website, on the right frame should contain links for PTFs. Example below :


    Screen shot of arrow pointing to required PTFs from idoctor website

 

Step 2 Start the super collection


  • -

     

    For most common issues, use this command to start up the data collection :

     


    QMGTOOLS/STRPSC FUNCTION(*START) PEXDFN(*XSM)

    2 jobs will be submitted, IBMJW and PEXMON.

    IBMJW jobuser BATCH ACTIVE PGM-QJW
    PEXMON jobuser BATCH ACTIVE PGM-QPEXLOOP

    Data being collected will be PEX, Job Watcher, and Collection Services data.

     

 


Step 3 Stop the super collection

 

  • -



    When you believe you have captured the issue, stop and dump the data. The default library that the data is dumped is IBMPEX.

    Run command : QMGTOOLS/STRPSC FUNCTION(*STOP)
    Run command : QMGTOOLS/STRPSC FUNCTION(*DUMP)

    A job DMPPEX is submitted, when that job is done, the library can be saved and sent to IBM.

 


Step 4 Send the data to IBM

 

 

 

Detailed Instructions

Step 1 First check to see if the required PTFs are applied. There are 2 options.

 

 

  • -

     

     
    Option 1 - Use QMGTOOLS to check for PTFs

    Run command : QMGTOOLS/CMPPEXPTF

    This command will attempt to FTP to IBM's public FTP site and compare the recommended PTFs for PEX/Job Watcher. If this command fails (unable to FTP, etc.), follow Option 2

    Option 2 - Compare the iDoctor website

    Perform an internet search for IBM iDoctor. Once at the IBM iDoctor website, on the right frame should contain links for PTFs. Example below :


    Screen shot of arrow pointing to required PTFs from idoctor website

 


Step 2 Select Performance/Misc data collection

  • -



    Get to the main QMGTOOLS menu by running command : GO QMGTOOLS/MG. From there select the menu option Performance/Misc collection.


 


Step 3 In the Performance Menu, select Combined PEX/Jobwatcher/Collection Service trace:





Step 4 Starting up the super collection

 

  • -



    The main command is QMGTOOLS/STRPSC. These are the parameters and their meanings when starting up the super collection.

     
    Function *START - start the super collection
    *STOP - stop the super collection
    *DUMP - stop and dump data from the super collection
    *DELETE - stop and delete data from the super collection (this does not delete data already in the data library, just data that has not been dumped)
    Data library Where to store the data
    Clear data library Y, N
    Clear the data library first before starting
    Stop time If you wish to have the super collection stop at some specified time, specify the time in hh:mm where hh is the hour and mm is the minutes
    Delete prv PEX ssn Delete previous PEX session (Y/N)
    Setting this makes sure that there is not previous sessions exist in the buffer. Default is N.
    Start PEX Y/N
    Yes or no to start PEX
    Session prefix when starting Default is IBMPEX for the session prefix. As the super collection cycles through PEX or JW, it will append a number at the end, like IBMPEX01, IBMPEX02, and so forth.

    The number of PEX/JW collections are based on the PEX2KEEP parameter (Number of PEX to keep).
    Pex definition name There are several supplied PEX definitions depending on the performance issue. You can either use a predefine definition or put in a PEX definition that you have defined.

    *XSM - Geographic Mirroring (catch all definition)
    *CPU - High CPU (TPROF)
    *CPUSW - CPU w/ task switch
    *DISK - Busy disk/long disk ops
    *HEAPALL - trace all heap
    *HDLHEAP - trace handle based heap
    *RESHEAP - trace resident heap
    *SYSHEAP - trace system heap
    *LCLHEAP - trace local heap
    *USRHEAP - trace user heap
    *ACTGRPHP - trace activation heap
    *LONGSAVE - Long save trace
    *TASKSWT - Task Switch trace
    *TSKSWPMCO - Task Switch w/ PMCO events
    *ASM - Creates/Destroys
    *MUTEX - Mutex lock and unlock events

    If leaving the default of *SELECT, you will be prompted later to select a definition.
    Pex filter If a PEX filter was created, specify it here.
    Add addtional events Add additional events to collect. Currently the only one is *FAULT to collect fault events
    Pex interval The interval to collect when collecting CPU events. Either leave as *DFT or put in the interval.
    Max PEX size in gigabytes Size of PEX in gigabytes. 4 gigabytes is the default.
    Number of PEX to keep The number of PEX collections to keep. Default is 3.
    % left of size before cycle The % left in the PEX size before the program starts a new PEX session and ends the current PEX session. Default is 10%.
    # of events before cycling PEX When specified, this will over ride the previous parameter. The number of PEX events collected before the program cycles to then next PEX collection and end the current collection. Default is *NONE.
    Trigger on message ID Up to 3 message IDs can be monitor to trigger the program to stop. The messages ID are monitored in QSYSOPR and QHST. Default is *NONE.
    Start Job Watcher (R610 & up) Start Job Watcher for releases R610 above. Default is Y.
    JW collectioni interval Job Watcher collects a snapshot of the system every xx seconds. Default is 10 seconds.
    # of JW collections to keep How many JW collections to keep. Default is 2.

    JW will cycle every 3600 seconds or 1 hour.
    Maximum storage for JW Maximum storage for JW in gigabytes. Default is 4 gigabytes.
    Include inactive jobs Y/N

    Specifies whether detailed data for all jobs and tasks, including inactive jobs and tasks, will be collected for the first interval. Default is N.
    JW SQL detail Collect SQL statements. Default is *NONE.
    *NONE - does not collect any SQL statements
    *LOW - collects *SQLCURSTMT *ALWAYS
    *MED - collects *SQLSTMT *ALWAYS
    *HIGH - collects *SQLDETAIL *ALWAYS
    JW activation group data Collect activation group data. N is the default. If yes, *ACTGRPDTL is added to the JW definition.
    JW socket data Collect socket data. N is the default. If yes, *SOCKETJOBS is added to the JW definition.
    JW Java data Collect java data. N is the default. If yes, *JAVA and *JAVASTACK is added to the JW definition.
    Collection services (R610 & up) Check for collections services and start it if not started. Y is the default.
    Dump XSM SST macros When ending the super collection, dump the SST macros for XSM. Default is N.
    Trace connection Start a trace connection. If yes, set the trace connection size in megabytes. Default is N and 900 megabytes is the size.
    DBMON option Start DBMON. If so, either *ALL for job or specific job name to trace (generic* is allowed). Specify the size of DBMON in megabytes.
    Start AA monitor This starts up the AA monitor at the same time (it will also be ended when this super collection is ended). Refer to this URL for information :

    http://www-01.ibm.com/support/docview.wss?uid=nas8N1022199
    Exit program/library This is reserved for support center use.
    Jobq/Jobq library What jobq to submit the super collection.

 


Step 5 Jobs

 

  • -



    The common 2 jobs when the super collection is started are PEXMON and IBMJW. If starting a trace connection, job TRCCNN_ will be submitted. If starting DB monitor trace, job DBMONWRAP will be submitted.

    IBMJW jobuser BATCH ACTIVE PGM-QJW
    PEXMON jobuser BATCH ACTIVE PGM-QPEXLOOP
    TRCCNN_ jobuser BATCH ACTIVE PGM-TRCCNNCLP
    DBMONWRAP jobuser BATCH ACTIVE PGM-DBMONWRAP_

 


Step 6 Ending the collection

 

  • -



    There are 2 ways to end the collection, *END or *DUMP.

    *END is when you want to suspend the data collection and dump at a later time. This is useful if you don't want to impact performance and dump later when the system is idle. For this, run command QMGTOOLS/STRPSC FUNCTION(*STOP).

    *DUMP, refer to the next step.

 


Step 7 Dumping the data

 

  • -



    Choosing *DUMP will stop the super collection if it is active and dump the data. Here are some parameters that presented when *DUMP is used.


     
    Session prefix Dump all the session prefix or just a specific prefix. The session prefix was specified during the start of the super collection. Default is *ALL.
    Wait for CS data to cycle Default of Y will wait until CS is cycled before copying that to the data library. CS data by default will cycle every 15 minutes.
    Dump PEX to *MGTCOL Dump PEX into an object of type *MGTCOL or in files. Default is Y.
    Jobq/Jobq library What jobq to submit the dump job, default is QSYSNOMAX.

    A job called DMPPEX is submitted and will dump data into the data library specified during the start of the super collection.

 


Step 8 Sending data to IBM for analysis

 

 

Detail Information On Supplied PEX Definitions

*XSM - Geographic Mirroring (catch all definition)

TYPE(*TRACE) JOB((*ALL)) TASK(*ALL) TRCFULL(*WRAP) INTERVAL(200) TRCTYPE(*SLTEVT)
SLTEVT(*YES) BASEVT((*TASKAVAIL) (*TASKSWTIN) (*TASKSWTOUT) (*TASKSWTOUTINT)
(*TASKSWTOUTQ *NONE *FORMAT2)) DSKEVT((*READSTR) (*READEND) (*WRTSTR)
(*WRTEND) (*RMTWRTSTR) (*RMTWRTEND)) CMNEVT((*IP) (*TCP)
(*PMCO *NONE *FORMAT2))

*CPU - High CPU (TPROF)

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL *ALL *ALLSBS)) TASK(*ALL) TRCFULL(*WRAP)
INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*PMCO *NONE *FORMAT2))

*CPUSW - CPU w/ task switch

TYPE(*TRACE) JOB((*ALL *ALL *ALLSBS)) TASK(*ALL) TRCFULL(*WRAP)
INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*TASKAVAIL *NONE *FORMAT1)
(*TASKSWTIN *NONE *FORMAT1) (*TASKSWTOUT *NONE *FORMAT1)
(*TASKSWTOUTQ *NONE *FORMAT2) (*TASKSWTOUTINT *NONE *FORMAT1)
(*PMCO *NONE *FORMAT2) (*CPUSWTIN *NONE *FORMAT1) (*CPUSWTOUTY *NONE *FORMAT1)
(*CPUSWTOUTP *NONE *FORMAT1)) DSKEVT((*READSTR *NONE *FORMAT1)
(*READEND *NONE *FORMAT1) (*WRTSTR *NONE *FORMAT1) (*WRTEND *NONE *FORMAT1))
CMNEVT(*NONE)

*DISK - Busy disk/long disk ops

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL *ALL *ALLSBS)) TASK(*ALL) TRCFULL(*WRAP)
TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT(*NONE) DSKEVT((*WRTSTR *NONE *FORMAT1)
(*WRTEND *NONE *FORMAT1) (*READSTR *NONE *FORMAT1) (*READEND *NONE *FORMAT1))

*HEAPALL - trace all heap

TYPE(*TRACE) JOB((*ALL *ALL *ALL)) TASK(*ALL) TRCFULL(*WRAP)
ADDTHDOPT(*ALL) LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT)
SLTEVT(*YES) MCHINST(*NONE) BASEEVT((*PCMO *NONE *FORMAT2))
STGEVT((*HDLHEAP *NONE *FORMAT1) (*RESHEAP *NONE *FORMAT1)
(*SYSHEAP *NONE *FORMAT1) (*LCLHEAP *NONE *FORMAT1)
(*USRHEAP *NONE *FORMAT1) *ACTGRPHEAP *NONE *FORMAT1))

*HDLHEAP - trace handle based heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*HDLHEAP *NONE *FORMAT1))

*RESHEAP - trace resident heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*RESHEAP *NONE *FORMAT1))

*SYSHEAP - trace system heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*SYSHEAP *NONE *FORMAT1))

*LCLHEAP - trace local heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*LCLHEAP *NONE *FORMAT1))

*USRHEAP - trace user heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*USRHEAP *NONE *FORMAT1))

*ACTGRPHP - trace activation heap

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL) TRCFULL(*WRAP) ADDTHDOPT(*ALL)
LSTALLJOB(*YES) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*ACTGRPHEAP *NONE *FORMAT1))

*LONGSAVE - Long save trace

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL *ALL *ALLSBS)) TASK(*ALL) TRCFULL(*WRAP)
TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE) OSEVT((*SAVRST *NONE *FORMAT1))

*TASKSWT - Task Switch trace

TYPE(*TRACE) JOB((*ALL *ALL *ALLSBS)) TASK(*ALL) TRCFULL(*WRAP)
TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*TASKAVAIL *NONE *FORMAT1)
(*TASKSWTIN *NONE *FORMAT1) (*TASKSWTOUT *NONE *FORMAT1)
(*TASKSWTOUTINT *NONE *FORMAT1) (*TASKSWTOUTQ *NONE *FORMAT2))
DSKEVT((*READSTR *NONE *FORMAT1) (*READEND *NONE *FORMAT1)
(*WRTSTR *NONE *FORMAT1) (*WRTEND *NONE *FORMAT1)
(*RMTWRTSTR *NONE *FORMAT1) (*RMTWRTEND *NONE *FORMAT1)) CMNEVT(*NONE)

*TSKSWPMCO - Task Switch w/ PMCO events

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL)) TASK(*ALL)
TRCFULL(*WRAP) INTERVAL(200) TRCTYPE(*SLTEVT) SLTEVT(*YES)
BASEVT((*TASKAVAIL *NONE *FORMAT1) (*TASKSWTIN *NONE *FORMAT1)
(*TASKSWTOUT *NONE *FORMAT1) (*TASKSWTOUTINT *NONE *FORMAT1)
(*TASKSWTOUTQ *NONE *FORMAT2) (*PMCO *NONE *FORMAT2)
(DSKEVT((*READSTR *NONE *FORMAT1) (*READEND *NONE *FORMAT1)
(*WRTSTR *NONE *FORMAT1) (*WRTEND *NONE *FORMAT1)
(*RMTWRTSTR *NONE *FORMAT1)

*ASM - Creates/Destroys

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL))TASK(*ALL) INTERVAL(1)
TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) STGEVT((*CRTSEG *NONE *FORMAT2)
(*DLTSEG *NONE *FORMAT2) (*EXDSEG*NONE *FORMAT2)
(*FNDSEGIZ) (*TRUNCSEG *NONE *FORMAT2))

*MUTEX - Mutex lock and unlock events

TYPE(*TRACE) JOB((*ALL/*ALL/*ALL))TASK(*ALL) INTERVAL(200)
TRCTYPE(*SLTEVT) SLTEVT(*YES) MCHINST(*NONE)
BASEVT((*PMCO *NONE *FORMAT2)) SYNCEVT((*PTRMTXLOCK *NONE *FORMAT2)
(*PTRMTXUNLOCK *NONE *FORMAT2))

 

Document information

More support for: IBM i

Component: Not Applicable

Software version: Version Independent

Operating system(s): IBM i

Software edition: Standard

Reference #: N1020482

Modified date: 12 November 2018


Translate this page: