Information
Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Ops Monitor for Db2 13.1 image-2024-5-19_8-5-1.png .

Printing data per traced thread


Use the following procedure to print a trace report showing all data per traced thread.

The history traces display shows the most recent traces at the top, but you can sort on any column and use the locate command to help you find other trace logs. For example, you can sort on USERID to group all your own trace logs together.

To print a trace report showing all data per traced thread

  1. On the HT view, type P in the CMD column next to the trace log data set that you want to print.The Batch Trace Print dialog, where you can specify options to print a batch report, is displayed (Following figure).

     BMC Software ------------ BATCH TRACE PRINT ----------------  PERFORMANCE MGMT
     COMMAND ===>                                                    TIME --- 15:00
     Update job ==> N (Y/N - update job statement)                (END to edit JCL)
     Title line 1 ==>
     Title line 2 ==>
     Data Selection:
      From date  ==> 16SEP2003  Time  ==> 1125
      To   date  ==> 17SEP2003  Time  ==> 1412
        PLAN     ==>
        AUTHID   ==>
        CONNECT  ==>
        CORR     ==>
        LOC      ==>
        DB2PKG   ==>
     REPORT SELECTION:
        LTRAC ==> NO                          (YES/NO)
        STRAC ==> NO                          (NO,ALL,SUMMARY,section1,section2..)
        DTRAC ==> NO                          (YES/NO)
        POPUP ==> NO                          (NO/ALL/SQL/event1,event2,....)
        TSUM  ==>          (A/C/L/P/T)        SORT     ==>       (for any TSUMx)
        TSTAT ==> NO       (SUMMARY/ALL/NO)   INTERVAL ==> 1H    (for TSUMT only)
  2. If you are using this option for the first time, you must update your job statements.
    1. Specify:Update Job ==> Y
    2. Press Enter.
    3. On the job statement data entry panel, fill in the required information.
    4. Press F3 to return to the HT view.
  3. Specify:Update Job ==> N
  4. Fill in the options for a report.

    Title line 1 ==> any title (Optional) Centered in first report header.

    Title line 2 ==> any title (Optional) Centered in second report header.

    Data Selection is optional. The selection fields can be used to reduce the amount printed from a long trace.

    Data Selection:

    From date ==> ddmmmyyyy Time ==> hhmmm

    To date ==> ddmmmyyyy Time ==> hhmmm

    The date and time fields are primed with the start and end date-time of the trace. You can modify them to select a shorter time period.

    PLAN ==> plan name

    AUTHID ==> authorization id

    CONNECT ==> connection name

    CORR ==> correlation id

    LOC ==> location name

    DB2PKG ==> db2 package name

    The Data Selection identifiers allow you to select only a subset of threads that you need to analyze further, such as one particular plan from a Thread History (THRDHIST) trace.

    In this example, all data per thread traced from STRAC is printed:

    REPORT SELECTION:

    LTRAC ==> N

    STRAC ==> ALL

    DTRAC ==> N

    POPUP ==> N

    TSUM ==>

    TSTAT ==> N

    There are many different reports that can be generated, either singly or combined. See Batch-trace-print for some examples. For a full explanation of the options and to see sample reports, see the printing a trace section in Using.

    The reports are based on printouts of the online displays, so the options are selected by using the names of these displays, like LTRAC, STRAC, DTRAC. In this tutorial you have chosen STRAC=ALL as the most useful report for application tuning. It shows the following information for each thread traced:

    • Basic Db2 accounting record data
    • Environmental Indicators section
    • Elapsed Time Analysis section
    • SQL Statement Execution Counts section
    • Buffer Pool Usage Analysis section, including Global Buffer Pools
    • Lock Activity section, including Global Locks
    • I/O Parallelism section
    • Routines section (stored procedures and user-defined functions)
    • DDF Summary section (if distributed work was done)
    • Package/DBRM Overview section (if accounting trace 7 is active)

    These sections are included for detail traces that captured the relevant events:

    • SQL Summary section with summary statistics per SQL statement (SQL events)
    • Database Summary section with scans per page set (SCAN events)
    • Database Lock and I/O section with locks and I/O data per page set (I/O or lock events)
    • Sort Summary section (if any sorts were performed) (any detail trace)
  5. Press Enter to validate your specifications.These options are saved in your profile and are used to initialize the fields the next time this panel is requested.

    Error
    Warning

    Be careful! Select only the data that you want to print. This report is per thread execution (like an accounting trace report from DB2PM) and can generate a large amount of output.

  6. Press F3 to review the generated JCL in edit mode.The options you specified are inserted into a pattern job DZJPTRAC in BBPROF. You may want to copy this JCL into your own UBBPROF profile data set and modify it.
  7. Review the remaining options.There are many more print options than can be shown on the panel, such as lines per page or maximum pages to print. The sample job contains a short description of these options. Scroll to the bottom to review them.
  8. Submit the job.COMMAND ===> SUB

    You can also SAVE the JCL for later execution, or CANCEL it completely.

  9. When the job is complete, review the output.
  10. Press F3 to return to the Batch Trace Print dialog. You can issue another request now if desired.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Monitor for Db2 12.2