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

Reply via email to