Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

REXX to know the CPU and MSU consumption.

990 views
Skip to first unread message

Ricardo Gomez Ramirez

unread,
Nov 29, 2015, 11:35:32 AM11/29/15
to
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*
ric...@gomezr.com

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

Lizette Koehler

unread,
Nov 29, 2015, 3:36:38 PM11/29/15
to
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

Ricardo Gomez

unread,
Nov 29, 2015, 6:45:51 PM11/29/15
to
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

Lizette Koehler

unread,
Nov 29, 2015, 7:14:43 PM11/29/15
to
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

Ed Finnell

unread,
Nov 29, 2015, 9:09:38 PM11/29/15
to
http://2000clicks.com/links/Computers/IBMMainframeHistory/mipsmvs.htm


In a message dated 11/29/2015 5:45:50 P.M. Central Standard Time,
ric...@GOMEZR.COM writes:

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”


Mike Schwab

unread,
Nov 29, 2015, 9:26:33 PM11/29/15
to
0 new messages