IBMi.org – Bart's blog

IBM i and PowerVM features and tools

Setting CPU/MEM as absolute value from the HMC CLI

From the HMC firmware version 8, it is possible to define absolute values for DLPAR commands in order to change physical, virtual CPUs from the HMC command line. Most of the people use the HMC graphical interface, where an user sets an absolute value for CPUs or Memory. If he wants to add a CPU via DLPAR operation, he just defines the requested value.

The problem starts when he wants to change multiple LPARs with multiple parameters. In such situation, the HMC GUI is not very convenient. It’s easier and faster to prepare sets of commands and send them via the HMC command line interface (CLI). Whenever an user were adding or removing a CPU/MEM from the command line, he had to calculate a delta, and send the delta via chhwres command.

For instance, if a partition runs  with 2 CPUs and there was a request ‘increase to 7’. He had to calculate the delta, which in our scenario is 5. Then, run the command

chhwres -r proc -m SERVER –id 3 –procunits 5 -o a

If by mistake the command was typed several times, it could ends with unpredictable capacity change.

Now it is much easier. Since the firmware version 8, it is possible to send the final value, as shown below.

chhwres -r proc -m SERVER –id 3 –procunits 7 -o s

The command can be used in the same way to set a virtual CPU:

chhwres -r proc -m SERVER –id 3 –procs 4 -o s

And memory. Remember, a memory must be defined in Mb.

chhwres -r mem -m SERVER –id 3 -q 5120 -o s

Advertisements

One response to “Setting CPU/MEM as absolute value from the HMC CLI

  1. Pingback: Data3 – Common Sweden » TE’s Pick ‘n’ Mix c10/08/15

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: