SMF Records/SMF Type 70 RMF Processor Activity

From Wikibooks, open books for an open world
< SMF Records
Jump to: navigation, search

SMF Type 70 RMF Processor Activity[edit]

SMF Type 70 Structure[edit]

The SMF Type 70 is one of the more complicated SMF record types. Record type 70 is written when the session terminates and for each RMF measurement interval. The RMF intervals are defined in the PARMLIB and can vary in different installations. The default is 15 minutes.

The SMF Type 70 record consists of a header section followed by a RMF product section. Then follow 2 subtypes which contain the following data sections:


Subtype 1:
  • CPU control section
  • CPU data section
  • ASID Data Area section
  • PR/SM Partition data section
  • PR/SM Logical Processor data section
  • CPU Identification section


Subtype 2:
  • Cryptographic CCA Coprocessor data section
  • Cryptographic Accelerator data section
  • ICSF Services data section
  • Cryptographic PKCS11 Coprocessor data section


For more information on subtypes, data sections, field values and offsets see [L1] or [L2].


SMF record field values directly usable or used in the "Derived Values" Table[edit]

Value Description
SMF70SID System ID
SMF70SSI Subsystem ID
SMF70INT RMF Intervall
SMF70BNP Number of physical processors
SMF70CPA CPU adjustment Factor. Measured in 16th of a second.

This value has been replaced in z/OS 2.1 by SMF70CPA_actual and SMF70CPA_scaling_factor. This value is only valid until z/OS 1.13

SMF70WLA Processor capacity of the MVS image[MSU/h].

Reflect defined capacity limit when set.

SMF70LAC 4 hour average of CPU service [MSU/h]
SMF70GAU Long-term average of CPU service [MSU/h] not used by the capacity group.

If the value is negative the group is capped.

SMF70CIX Index to the CPU-identification name section that contains the EBCDIC name corresponding to the CPU type of the logical processor.
SMF70CIX CPU Type
1 CP
2
3 IFA
4 IFL
5 ICF
6 IIP
SMF70PDT Logical processor dispatch time, in microseconds.

This is the number of microseconds that were accumulated during the measurement interval (during which a physical CPU was assigned to this logical CPU).

SMF70NRM Normalization factor for zIIP.

Multiply zIIP time by this value and divide by 256 to get the equivalent time on a CP.

SMF70DSA Number of Diagnose samples during the RMF interval.
SMF70NSW Number of diagnose samples where WLM considers to cap the set of logical CPUs of type SMF70CIX within the logical partition (see also SMF70NCA).
SMF70NCA Number of diagnose samples where capping actually limited the usage of processor resources for the set of logical CPUs of type SMF70CIX within the logical partition.

Derived Values[edit]

Value Formula and Description
RMF_int RMF_int = (SMF70INT(mm) * 60) + (SMF70INT(ss)) + (SMF70INT(ttt) / 1000)

RMF interval in seconds.
The Field SMF70INT contains the duration of the RMF measurement interval, in the form mmsstttF where mm is minutes, ss is seconds, ttt is milliseconds, and F is the sign

unimsu unimsu = (16 / SMF70CPA) * 3600

The power of one general purpose processor (CP) in the respective CPC Model derived from the CPU adjustment factor contained in the Field SMF70CPA [MSU/h] (see also: actMSU). SMF70CPA is measured in 16th of a second.
The value of SMF70CPA has been replaced in z/OS 2.1 by SMF70CPA_actual and SMF70CPA_scaling_factor. The Formula here is only valid until z/OS 1.13

unimsu_iip unimsu_iip = ((16 / SMF70CPA) * 3600 * SMF70NRM) / 256

The power of one zIIP processor in the respective CPC Model derived from the CPU adjustment factor contained in the field SMF70CPA [MSU/h] and the normalization factor for zIIP contained in the field SMF70NRM (see also: actMSU and iipMSU). SMF70CPA is measured in 16th of a second.
The value of SMF70CPA has been replaced in z/OS 2.1 by SMF70CPA_actual and SMF70CPA_scaling_factor. The Formula here is only valid until z/OS 1.13

actMSU actMSU = (sum(SMF70PDT) * 3600 * 16) / (SMF70CPA * RMF_Int * 1000000)

System actual MSU of a certain processor type (here: CP) during the RMF interval.
The SMF70 Record contains for each logical processor its own "PR/SM Logical Processor Data Section". The following values of the SMF70CIX field informs about the processor type contained in the section:

SMF70CIX CPU Type
1 CP
2
3 IFA
4 IFL
5 ICF
6 IIP

The actual MSU of the system for a certain processor type can be calculated from the SMF70PDT field which contains the dispatching time of each processor. The sum of the dispatching times of all processors of the same type during the RMF interval divided by the time of the RMF interval multiplied by the capacity of one processor in [MSU/h] give the system actual MSU during the RMF interval. This is usually
actMSU = (CPU_time / Duration) * unimsu
where unimsu is the capacity of one processor in [MSU/h]. Because SMF70PDT is measured in microseconds, dividing SMF70PDT by 1000000 normalizes the dispatching time to seconds. The RMF interval time reflect the duration and should also be in seconds. For the processor type of CP the capacity of one CPU can be derived from the CP ajustment factor SMF70CPA. SMF70CPA contains the inverse capacity of one processor but in sixteenth of a second. The capacity of one processor in [MSU/h] can be derived with
unimsu = (16 / SMF70CPA) * 3600
and this leads to
actMSU = ((sum(SMF70PDT / 1000000) / RMF_Int) * ((16 / SMF70CPA) * 3600)
and the simplest Form of that is
actMSU = (sum(SMF70PDT) * 3600 * 16) / (SMF70CPA * RMF_Int * 1000000)

iipMSU iipMSU = (sum(SMF70PDT) * 3600 * 16 * SMF70NRM) / (SMF70CPA * RMFint * 1000000 * 256)

System actual MSU of a certain processor type (here: zIIP) during the RMF interval.
To determine the system actual MSU of the zIIP processors the procedure is the same as described for the CP processors except of a difference in the adjustment factor. Unfortunatelly SMF70CPA is only for the processor type of CP. But for a zIIP processor it is possible to use the SMF70CPA field by normalizing the dispatching time SMF70PDT with the zIIP normalization factor SMF70NRM. With this the dispatching time of the zIIP processor is ajusted as if it would be a CP processor.
SMF70PDT_ajusted = SMF70PDT * SMF70NRM / 256
this leads to
iipMSU = (sum(SMF70PDT) * 3600 * 16 * SMF70NRM) / (SMF70CPA * RMFint * 1000000 * 256)
and the unimsu for a zIIP Processor is
uniMSU_iip = (3600 * 16 * SMF70NRM) / (SMF70CPA * 256)

P_Cap_cons P_Cap_cons = (SMF70NSW / SMF70DSA) * 100

WLM Capping considered (LPAR, defined capacity).
Percentage where WLM considers to cap the set of logical CPUs of a certain processor type (SMF70CIX) within the logical partition during the RMF interval [% of diagnose samples]. Makes only sense for type CP (SMF70CIX=1). SMF70NSW is identical for every CP.

P_Cap_act P_Cap_act = (SMF70NCA / SMF70DSA) * 100

WLM Capping (LPAR, defined capacity).
Percentage where capping actually limited the usage of processor resources for the set of logical CPUs of type SMF70CIX within the logical partition during the RMF interval [% of diagnose samples]. Makes only sense for type CP (SMF70CIX=1). SMF70NCA is identical for every CP.

REXX Example for SMF Type 70[edit]

/*REXX-----------------------------------------------------------------
 Report of some SMF70 Data
 ---------------------------------------------------------------------*/
call initialize
call process_smf_data
exit 0
/*---------------------------------------------------------------------
 ---------------------------------------------------------------------*/
initialize: procedure expose __.
  __. = ''
  __.0border = copies('-',70)
  return
/*---------------------------------------------------------------------
 ---------------------------------------------------------------------*/
process_smf_data: procedure expose __.
  "CALL 'SYS1.LINKLIB(IFASMFDP)'"
  "REPRO IFILE(DUMPOUT) OFILE(WORKSMF)"
  "EXECIO * DISKR  WORKSMF ( FINIS STEM SMF."
  drop DASD_OUT.
  count = 1
  j = 1
  say date() time() "SMF70 Report => read " smf.0 "input records"
  /*-------------------------------------------------------------------
   -------------------------------------------------------------------*/
  do i = 1 to smf.0
     line      = smf.i
    /*-----------------------------------------------------------------
     The standard SMF record header with subtypes . . .
     We're ignoring SMFxLEN (Offset 00) and SMFxSEG (Offset 02) since
     the IDCAMS PRINT utility doesn't include the record length and
     segment descriptor fields.
     ----------------------------------------------------------------*/
    SMFxFLG = binary_b(line,offset(4),1)
    rectype = binary_d(line,offset(5),1)  /* SMFxRTY: Record type    */
    say 'Line:' right(i,6,'0') 'Record Type:' rectype
    /*-----------------------------------------------------------------
      SMF70 Records
     -----------------------------------------------------------------*/
    if (rectype = 70) then do
      SMFxTME = smftime(line,offset(6),4)
      say SMFxTME
      SMFxDTE = smfjdate(line,offset(10),4)
      olddate = substr(smfxdte,3,2)!!,       /* YYYY.DDD in YYDDD     */
                substr(smfxdte,6,3)
      Datum   = date('S',olddate,'J')        /* Date Conversion       */
      smf70sid = ebcdic(line,offset(14),4)   /* SMFxSID: System ID    */
      smf70ssi= ebcdic(line,offset(18),4)   /* SMFxSSI: Subsystem ID  */
      subtype = binary_d(line,offset(22),2) /* SMFxSTY: Record Subtype*/
    /*-----------------------------------------------------------------
      RMF Product Section
     -----------------------------------------------------------------*/
      smf70prs = binary_d(line,offset(28),4) /* Offset             */
      base = offset(smf70prs)
      smf70int = packed(line,base+018,4)    /* RMF Intervall      */
      intmm = substr(smf70int,1,2)
      intss = substr(smf70int,3,2)
      intms = substr(smf70int,5,3)/1000
      int = intmm*60+intss+intms
    /*-----------------------------------------------------------------
      SUBTYPE 1
     -----------------------------------------------------------------*/
      if (subtype = 1) then do
    /*-----------------------------------------------------------------
      CPU Control Section
     -----------------------------------------------------------------*/
        smf70ccs = binary_d(line,offset(36),4) /* Offset             */
        base = offset(smf70ccs)
        smf70bnp = binary_d(line,base+003,1)   /* #phys Processors  */
        smf70cpa = binary_d(line,base+028,4)   /* CPU ajust. Factor */
        unimsu = (16/smf70cpa)*3600            /* Power of 1 CP     */
        unimsu = translate(unimsu,,'.',',')     /*  Point to Comma */
        smf70wla = binary_d(line,base+032,4)   /* CPU Capacity (MSU/h)*/
        smf70lac = binary_d(line,base+036,4)   /* 4h Average    */
        smf70nrm = binary_d(line,base+188,4)   /* norm. fact. zIIP */
        smf70gau = binary4_d(line,base+192,4)  /* MSU til GRP Capping */
        smf70ncr = binary_d(line,base+204,4)   /* Nom. Cap MSU/h   */
        smf70npr = binary_d(line,base+208,4)   /* Nom.per Cap MSU/h   */
        smf70ntr = binary_d(line,base+212,4)   /* Nom.tem Cap MSU/h   */
        smf70cai = binary_d(line,base+216,1)   /* Cap adjust. %       */
    /*-----------------------------------------------------------------
      CPU Data Section
     -----------------------------------------------------------------*/
        smf70cps = binary_d(line,offset(44),4) /* Offset             */
        base = offset(smf70cps)
    /*-----------------------------------------------------------------
      PR/SM Partition Data Section
     -----------------------------------------------------------------*/
        smf70bcs = binary_d(line,offset(60),4) /* Offset             */
        smf70bcl = binary_d(line,offset(64),2) /* Length Section     */
        smf70bcn = binary_d(line,offset(66),2) /* Number of Sections */
        base = offset(smf70bcs)
        smf70lpm = ebcdic(line,base+000,8)     /* Partition Name     */
        smf70bdn = binary_d(line,base+010,2)   /* # log CPUs, # sect */
        smf70bds = binary_d(line,base+012,4)   /* # skip data blocks */
        smf70stn = ebcdic(line,base+028,8)     /* System    Name     */
    /*-----------------------------------------------------------------
      PR/SM Logical Processor Data Section
     -----------------------------------------------------------------*/
        smf70bvs = binary_d(line,offset(68),4) /* Offset             */
        smf70bvl = binary_d(line,offset(72),2) /* Length Section     */
        smf70bvn = binary_d(line,offset(74),2) /* Number of Sections */
        base = offset(smf70bvs)+(smf70bvl*smf70bds) /* skip if valid */
        sumpdt_cp = 0
        sumpdt_iip = 0
        do s = 0 to smf70bdn-1
          smf70pdt = binary_d(line,base+000,8)   /* disp time (mics)*/
          smf70vpa = binary_x(line,base+008,2)   /* Proc Adress     */
          smf70cix = binary_d(line,base+014,2)   /* i to CPU id sect */
    /*-----------------------------------------------------------------
 SMF70CIX indicates the type of engine in the individual "CPU" segments:
          /* SMF70CIX   CPU TYPE  */
          /*   1          CP      */
          /*   2                  */
          /*   3          IFA     */
          /*   4          IFL     */
          /*   5          ICF     */
          /*   6          IIP     */
     -----------------------------------------------------------------*/
          select
            when smf70cix = 1 then sumpdt_cp = sumpdt_cp+smf70pdt
            when smf70cix = 6 then sumpdt_iip = sumpdt_iip+smf70pdt
          end
          base = base+smf70bvl          /* +next section */
        end
        actmsu = (sumpdt_cp*3600*16)/(smf70cpa*int*1000000)
        actmsu = translate(actmsu,,'.',',')     /*  Point to Comma */
        sumpdt_iip = sumpdt_iip*smf70nrm/256    /* Ajust. zIIP     */
        iipmsu = (sumpdt_iip*3600*16)/(smf70cpa*int*1000000)
        iipmsu = translate(iipmsu,,'.',',')     /*  Point to Comma */
        say copies('-',80)
      end
    /*-----------------------------------------------------------------
      Report Values
     -----------------------------------------------------------------*/
      j=j+1
      dasd_out.j = datum';'smfxtme';'smf70sid';'smf70wla';'smf70gau';',
                   smf70lac';'actmsu';'iipmsu
      count = count + 1
    end
  end
  dasd_out.0 = count
  say dasd_out.0' Records written'
    /*-----------------------------------------------------------------
      Report Headers
     -----------------------------------------------------------------*/
  dasd_out.1 = 'DATE;TIME;System;Cap. Limit;MSU Cap. Grp.;4h Average;',
               'MSU CP;MSU zIIP'
 
  "Execio * Diskw OUTDS (finis stem dasd_out."
 
  return
/*---------------------------------------------------------------------
 Functions: 
 here you should copy all functions from the Example in Chapter 1
 ---------------------------------------------------------------------*/
                . . . . .

Example: REXX SMF70 to create a .csv file with the values of interest


SMF Type 19 Direct Access Volume · References