Share: |


 

BMC offers two products that assist with the monitoring and operation of z/Enterprise machines. Each z/Enterprise machine has two Service Elements and one or more HMCs (Hardware Management Consoles).

 

1 .MainView AutoOPERATOR is an automation and management program operating within z/OS.

 

2. MainView Console Management is a LINUX based product that improves operator productivity and offers automation and management for z/Enterprise machines.

 

MainView AutoOPERATOR REXX EXECs can invoke the IMFEXEC HMC command to perform these tasks:

- Obtain the System z topology of the current interconnected Central Processor Complexes (CPCs) as well as the images, capacity records and activation profiles on a particular CPC.

- Query various CPC, image (LPAR), capacity record, and activation profile information.

- Set various configuration values related to CPC, image, and activation profiles.

- Issue commands against both the CPC and image (LPAR) to perform minor or even significant hardware- and software-related functions.

 

The IMFEXEC HMC capability may be interwoven with the existing automation to improve system throughput/reliability or reduce financial costs (eg. MSU based IBM charges).

 

MainView Console Management can improve operator and system programmer productivity (vs. the IBM HMC) by:

- Flexibly consolidating the displays from a user selected number of consoles onto one screen.

- Providing scroll-back of console messages, even to point before SYSLOG is operational, to the welcome screen before the IPL occurs.

- Organizing LPARs into user defined groups with tree navigation which helps to prevent IPLing the wrong LPAR.

- Granular security and auditing for operator actions, at a finer level than the IBM HMC.

- Secure remote operation, allowing operators to be at remote sites, or for them to operate multiple remote locations.

 

MainView Console Management also offers automation and monitoring capability:

- Rules that can monitor events and take specified actions.

- User scripts that can encapsulate complex sequence an actions, improving operator reliability.

- The event sources for Rules include HMC events, as well as generic SNMP traps such as those from FICON directors or other TCP/IP based devices.

MainView Console Management is supported on LINUX and may run on typical hardware or in a zLINUX VM guest machine.

 

Using IMFEXEC HMC in AutoOPERATOR REXX EXECs

 

Since this is a very powerful feature, in addition to the normal SAF controls, there is a special option which must be enabled in parameter member AAOEXPxx.

 

EXHMC=NO YES DEFAULT=NO

NO CONTROLS WHETHER IMFEXEC HMC IS AVAILABLE FOR

USE OR NOT

 

The IBM instructions on the RACF resources and permissions needed are in the MVS Callable Service manual in section 7 Base Control Program internal interface (BCPii). The BCPii communicates with the Service Element(s).

 

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2C171/CCONTENTS
 

It is recommended that read-only permissions be granted for your initial experiments ie. IMFEXEC HMC Cmd and IMFEXEC HMC Set are not allowed.

 

With these preliminaries out of the way, you may run your first IMFEXEC HMC sample to list your local machine resources.

 

/* REXX */

/* Example 1 HMC commands which do not require a Token */

ARG EXNAME P1 P2 .

"IMFEXEC HMC LIST(CPCS)"

"IMFEXEC MSG 'HMC LIST CPCS NUM="LINE.0 "CC="IMFCC "RC="IMFRC"'"

 

IF IMFCC = 0 THEN

DO I = 1 TO LINE.0

"IMFEXEC MSG 'LINE"I"="VALUE('LINE.'I)"'"

END I

"IMFEXEC HMC LIST(LOCALCPC)"

"IMFEXEC MSG 'HMC LIST LOCALCPC NUM="LINE.0 "CC="IMFCC "RC="IMFRC"'"

IF IMFCC = 0 THEN

DO I = 1 TO LINE.0

"IMFEXEC MSG 'LINE"I"="VALUE('LINE.'I)"'"

END I

"IMFEXEC HMC LIST(LOCALIMAGE)"

"IMFEXEC MSG 'HMC LIST LOCALIMAGE NUM="LINE.0 "CC="IMFCC "RC="IMFRC"'"

IF IMFCC = 0 THEN

DO I = 1 TO LINE.0

"IMFEXEC MSG 'LINE"I"="VALUE('LINE.'I)"'"

END I

"IMFEXEC MSG '."EXNAME "EID="IMFEID "ENDED'"

EXIT

 

The output below shows there are two machines IBM390PS.Alamo and IBM390PS.Goliad. The AutoOPERATOR is running on IBM390PS.Alamo (LocalCPC) in LPAR SJSC (LocalImage)

 

15:03:45 %HMC14

15:03:45 EM0026I EXEC HMC14 EID= 00001 STARTED ON 11-JUL-12 AT 15:03:45

15:03:46 EM1523I LIST CPCS

15:03:46 HMC LIST CPCS NUM=0002 CC=0000 RC=0000

15:03:46 LINE1=IBM390PS.ALAMO

15:03:46 LINE2=IBM390PS.GOLIAD

15:03:46 EM1523I LIST LOCALCPC

15:03:46 HMC LIST LOCALCPC NUM=0001 CC=0000 RC=0000

15:03:46 LINE1=IBM390PS.ALAMO

15:03:46 EM1523I LIST LOCALIMAGE

15:03:46 HMC LIST LOCALIMAGE NUM=0001 CC=0000 RC=0000

15:03:46 LINE1=SJSC

15:03:46 .HMC14 EID=00001 ENDED

15:03:46 EM0027I EXEC HMC14 EID= 00001 ENDED ON 11-JUL-12 AT 15:03:46

 

Querying and Altering the GroupProfileCapacity

 

This example EXEC demonstrates querying and altering the GroupProfileCapacity. It will flip-flop the GroupProfileCapacity between 899 and 900.

 

/* REXX */

/*

EXAMPLE:

%HMC27

flip GroupProfileCapacity between 899 and 900

need RACF Update permission to HWI.TARGET.ibm390ps.alamo.sjsd

*/

ARG EXNAME P1 P2 .

"IMFEXEC MSG '."EXNAME "EID="IMFEID "STARTED'"

TRACE N

CP1 = 'IBM390PS.ALAMO'

IM1 = 'SJSD'

"IMFEXEC HMC CONNECT( CPC("CP1") OUTTOKEN(CPC_TOKEN) )"

IF IMFCC /= 0 THEN EXIT

"IMFEXEC HMC CONNECT( IMAGE("im1") OUTTOKEN(IMG_TOKEN) )" ,

"TOKEN(CPC_TOKEN)"

IF IMFCC /= 0 THEN EXIT

call query10 'groupProfileCapacity'

if result = 900 then

capacity = 899

else

capacity = 900

call set10 'groupProfileCapacity' capacity

call query10 'groupProfileCapacity'

"IMFEXEC HMC DISC TOKEN(IMG_TOKEN)"

"IMFEXEC HMC DISC TOKEN(CPC_TOKEN)"

"IMFEXEC MSG 'HMC27 Set finished'"

exit

/* -------------------------------- */

query10:

arg p1

IF IMFCC /= 0 THEN EXIT

"IMFEXEC HMC CONNECT( IMAGE("im1") OUTTOKEN(IMG_TOKEN) )" ,

"TOKEN(CPC_TOKEN)"

IF IMFCC /= 0 THEN EXIT

call query10 'groupProfileCapacity'

if result = 900 then

capacity = 899

else

capacity = 900

call set10 'groupProfileCapacity' capacity

call query10 'groupProfileCapacity'

"IMFEXEC HMC DISC TOKEN(IMG_TOKEN)"

"IMFEXEC HMC DISC TOKEN(CPC_TOKEN)"

"IMFEXEC MSG 'HMC27 Set finished'"

exit

/* -------------------------------- */

query10:

arg p1

"IMFEXEC HMC QUERY("p1") TOKEN(IMG_TOKEN)"

HMC_CC = IMFCC

IF HMC_CC = 0 THEN

DO I = 1 TO LINE.0

"IMFEXEC MSG 'hmc27 query" p1 "LINE."I "="VALUE('LINE.'I)"$$'"

END I

else

"IMFEXEC MSG 'hmc27 query" p1 "imfcc="hmc_cc"'"

/* return the value - always on line.1 */

return value('line.1')

/* -------------------------------- */

set10:

arg p1 p2

"IMFEXEC HMC SET("p1","p2") TOKEN(IMG_TOKEN)"

HMC_CC = IMFCC

"IMFEXEC MSG 'hmc27 set" p1 p2 "imfcc="hmc_cc"'"

return

 

Changing the number of processors in a LPAR

 

This example EXEC changes the number of IFL processors from zero to one (or one to zero).

 

/* REXX */

/*

FOR TESTING IMFEXEC HMC

EXAMPLE:

%HMC26

set IFL count for the ImageActivation profile

*/

ARG EXNAME P1 P2 .

/*

"IMFEXEC MSG '."EXNAME "EID="IMFEID "STARTED'"

*/

TRACE N

CP1 = 'IBM390PS.GOLIAD'

IM1 = 'TEST2'

"IMFEXEC HMC CONNECT( CPC("CP1") OUTTOKEN(CPC_TOKEN) )"

IF IMFCC /= 0 THEN EXIT

 

"IMFEXEC HMC CONNECT( IMAGEACT("im1") OUTTOKEN(IMG_TOKEN) )" ,

"TOKEN(CPC_TOKEN)"

IF IMFCC /= 0 THEN EXIT

call query10 'numSharedIfl'

/*

if current number of processors = 0 then modify it to 1

if current number of processors = 1 then modify it to 0

*/

if result = 0 then

num_processors = 1

else

num_processors = 0

call set10 'numSharedIfl' num_processors

call query10 'numSharedIfl'

"IMFEXEC HMC DISC TOKEN(IMG_TOKEN)"

"IMFEXEC HMC DISC TOKEN(CPC_TOKEN)"

"IMFEXEC MSG 'HMC26 Set finished'"

exit

/* -------------------------------- */

query10:

arg p1

"IMFEXEC HMC QUERY("p1") TOKEN(IMG_TOKEN)"

HMC_CC = IMFCC

IF HMC_CC = 0 THEN

DO I = 1 TO LINE.0

"IMFEXEC MSG 'hmc26 query" p1 "LINE."I "="VALUE('LINE.'I)"$$'"

END I

else

"IMFEXEC MSG 'hmc26 query" p1 "imfcc="hmc_cc"'"

/* return the number of processors - always on line.1 */

return value('line.1')

/* -------------------------------- */

set10:

arg p1 p2

"IMFEXEC HMC SET("p1","p2") TOKEN(IMG_TOKEN)"

HMC_CC = IMFCC

"IMFEXEC MSG 'hmc26 set" p1 p2 "imfcc="hmc_cc"'"

Return