Gathering performance data with Collection Services

 

If you are not running Collection Services or your collection objects are not current, you can start Collection Services in any of these ways to analyze the i5/OS® operating environment.

Ensure that Collection Services has been configured to collect the data you require, and that it runs long enough to accurately represent your operating environment.

The following example uses the Collector APIs.

  1. Run Collection Services for at least one or two days, and make sure that peak and off-peak workloads are represented. Type this command:
    CALL PGM(QYPSSTRC) PARM('*PFR      ' '*STANDARDP' X'00000000')

    This command starts Collection Services and uses the Standard plus protocol for the collection profile. Once you start Collection Services with this command, it will collect performance data and store it in the collection object until you either explicitly stop it or restart the system. (If collection was run for more than one day, more than one collection object will be produced.) This profile collects all the data categories typically needed by the tools in Performance Tools for iSeries, including communications protocol data. The default configuration also starts a batch job CRTPFRDTA, which creates the performance database files.

  2. Collection Services stores the data in an object type of *MGTCOL. You can convert this object into performance database files for later analysis. To retain the object for future use, you can save the objects to tape or to a save file (SAVF). Collection Services can delete collection objects from the system at any time after the retention period has expired. The default retention period is 24 hours. If you do not want Collection Services to delete your collection objects for you, change your retention period to permanent (set a retention period of *PERM) as shown in the example that follows.

    The following command example shows the shipped default values with the exception of the retention period value. A retention period of *PERM requires a value of 0. Furthermore, make this change before or during the data collection. The change does not affect any collection objects that are already cycled.

    To change the retention period by using the Change Collection Services Attributes API, type the following command:

    By using the following code example, you agree to the terms of the Code license and disclaimer information.

    CALL PGM(QYPSCSCA) PARM('*PFR      ' /* collection */ 
                                 X'00000384'  /* interval 900 sec */ 
                                 'QPFRDATA  ' /* library          */ 
                                 X'00000000'  /* retention period is permanent  */ 
                                 X'00000000'  /* cycle time  00:00:00 */ 
                                 X'00000018'  /* cycle interval 24Hrs */ 
                                 X'00000001'  /* start CRTPFRDTA */ 
                                 '*STANDARDP' /* default profile */ 
                                 X'00000000') /* return code  */
                                

  3. If you want to explicitly stop the collector after the desired data is obtained, type this command:
    CALL PGM(QYPSENDC) PARM('*PFR      '  X'00000000')

 

Parent topic:

Gathering performance data for benchmark