So an internet search with IBM CALCULATE MSU  produced the following entry.  
See if it helps

http://www.ibm-mainframes.com/viewtopic.php?f=35&t=351

Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Ricardo Gomez
> Sent: Sunday, November 29, 2015 4:46 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: REXX to know the CPU and MSU consumption.
> 
> Thanks for your answer. Certainly some parts of my rexx were from Mark’s IPL 
> Info
> but it doesn’t have the value that I’m looking for, it is “Current MSU used 
> by Lpar”
> 
> Regards
> 
> > El 29/11/2015, a las 2:36 p.m., Lizette Koehler <stars...@mindspring.com>
> escribió:
> >
> > Some side notes:
> >
> > If you were not aware, there is a TSO-REXX list that covers all things REXX.
> > Also, you can review what Mark Zelden wrote in his IPLINFO REXX.
> >
> > To join TSO-REXX if you have not done so, use this URL
> > TSO REXX    http://www2.marist.edu/htbin/wlvindex?TSO-REXX
> >
> > To review code written by Mark Zelden,
> > http://www.mzelden.com/mvsutil.html
> >
> > You might get more ideas from Mark's code.
> >
> > Lizette
> >
> >
> >> -----Original Message-----
> >> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> >> On Behalf Of Ricardo Gomez Ramirez
> >> Sent: Sunday, November 29, 2015 9:25 AM
> >> To: IBM-MAIN@LISTSERV.UA.EDU
> >> Subject: REXX to know the CPU and MSU consumption.
> >>
> >> I am currently programming a REXX to let me know the current
> >> consumption of my system MSU and the 4HRA. So far I have achieved:
> >>
> >> - Get the SysName
> >> - Get the model and type
> >> - Capacity defined for the LPAR's MSU
> >> - 4HRA
> >> - And whether the LPAR is capped or not
> >>
> >> The rexx I would not have invented it, I took fragments of several
> >> sites where the end all read the Resource Control Table.
> >>
> >> However, one thing that I'd like but I have not found anywhere is how
> >> to extract the number of  MSU's that are active (in use) at that
> >> time. The value I'm looking for is the one in "MSU Act" column at CPC
> >> screen, Option
> >> 3> 3 at RMF Monitor III.
> >>
> >> With this, the specific question is how to know the current number of
> >> MSU's a partition (LPAR) is consuming?
> >>
> >> As support to help others, I share the rexx I'm currently using:
> >>
> >> /* REXX */
> >> /* Trace ?r                              */
> >>
> /********************************************************************
> >> */
> >> CVT      = C2d(Storage(10,4))                /* point to CVT         */
> >> RMCT     = C2d(Storage(D2x(CVT+604),4))      /* point to RMCT        */
> >> RCT      = C2d(Storage(D2x(RMCT+228),4))     /* Resource Control Tbl */
> >> RMCTCCT  = C2d(Storage(D2x(RMCT+4),4))       /* cpu mgmt control tbl */
> >>
> >> CCVUTILP = C2d(Storage(D2x(RMCTCCT+102),2))  /* CPU Utilization      */
> >> RCTLACS  = C2d(Storage(D2x(RCT+196),4))      /* 4 hr MSU average     */
> >> RCTIMGWU = C2d(Storage(D2x(RCT+28),4))       /* Image defined MSUs   */
> >> RCTCECWU = C2d(Storage(D2x(RCT+32),4))       /* CEC MSU Capacity     */
> >>
> /********************************************************************
> >> */
> >> /*  The CPU model is stored in packed decimal format with no sign,   */
> >> /*  so to make the model printable, it needs to be converted back    */
> >> /*  to hex.                                                          */
> >> MODEL    = C2d(Storage(D2x(CVT - 6),2))      /* point to cpu model   */
> >> MODEL    = D2x(MODEL)                        /* convert back to hex  */
> >>
> /********************************************************************
> >> */
> >>
> >> CURRDATE = Date('S')
> >> CURRTIME = Time()
> >> SYSNAME  = MVSVAR('SYSNAME')
> >> CAPPED   = 'N'
> >>
> >> PERCENT  = Format((RCTLACS/RCTIMGWU)*100,3,2)
> >>
> >> If RCTLACS <> 0 then do
> >>  If RCTLACS >= RCTIMGWU & RCTIMGWU <> RCTCECWU then ,
> >>    CAPPED = 'Y'
> >> End
> >>
> >> say SYSNAME CURRDATE CURRTIME,
> >>    'CpuModel='MODEL,
> >>    'MSU='RCTIMGWU,
> >>    'CPU_Utyl='CCVUTILP'%',
> >>    '4HRA='RCTLACS,
> >>    'Limit='PERCENT'%',
> >>    'Capp?='CAPPED
> >>
> >> ​Regards.
> >> 
> >>
> >> --
> >> *Ricardo Gomez*
> >> rica...@gomezr.com
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions, send
> > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email to
> lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to