Friday, March 20, 2009

HMC Tips II - Partitions and Profiles

1. To list all machines configured in a hmc

# lssyscfg -r sys

2. To list all lpars(partitions) in a power machine

# lssyscfg -r lpar -m Managed_System

3. To activate/start an LPAR :

# chsysstate -r lpar -m Managed_System -o on -n LPAR_Name -f Profile_ name

4. To deactivate/shutdown an LPAR :

# chsysstate -r lpar -m Managed_System -o shutdown --immed -n LPAR_Name

5. To open the console of a partition :

# mkvterm -m Managed_System -p LPAR_Name

6. To close the console of a partition:

# rmvterm -m Managed_System -p LPAR_Name

7. To list the profile of a partition:

# lssyscfg -r prof -m Managed_System --filter "lpar_names=LPAR_Name,profile_names=Profile_Name"

8. To change the min/desired/maximum memory settings of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_mem=512,desired_mem=19456,max_mem=20480"

9. To change the min/desired/maximum processor units of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_proc_units=0.2,desired_proc_units=0.5,max_proc_units=2.0"

10. To change the min/desired/maximum virtual processor of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_procs=1,desired_procs=2,max_procs=6"

11. To change capped/uncapped setting in a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,sharing_mode=uncap,uncap_weight=128"

Possible values for sharing_mode are cap and uncap.
Possible values for uncap_weight are from 0 to 128.

12. To change the name of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,new_name=New_Profile_Name"

13. To change the name of a partition :

# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,new_name=New_LPAR_Name"

14. To change the default profile of a partition :

# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,default_profile=Partition_Profile_Name"

15. To set "power off the machine after all partitions are shutdown" for a power machine :

# chsysscfg -r sys -m Managed_System -i "power_off_policy=0"

Possible values are

0 -> Power off after all partitions are shutdown
1 -> Do not power off after all partitions are shutdown

16. To rename a system profile :

# chsyscfg -r sysprof -m Managed_System -i "name=Sys_Prof_Name,new_name=New_Sys_Prof_Name"

17. To add 2 more partition profiles to a system profile :

# chsyscfg -r sysprof -m Managed_System -i "name=,"lpar_names+=partition3,partition4",
"profile_names+=profile3,profile4""


--- Rest in the next ---

5 comments:

Azzurro said...

Hello Mr. Sivasankaran :

Wonderful blog, I love it.

I have a question about the following commands:

"9. To change the min/desired/maximum processor units of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_proc_units=0.2,desired_proc_units=0.5,max_proc_units=2.0"

10. To change the min/desired/maximum virtual processor of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_procs=1,desired_procs=2,max_procs=6"
"

Is it mandatory to reboot a partition when modifying max_procs or max_proc_units to be effective?


Yours sincerelly,

Raja said...

yes. But its not a pure reboot.
Just a reboot never picks up a profile change.

To pickup new profile changes, you need to reactivate the lpar. I mean shutdown the partition and activate it thru HMC.

Whenever you change the profile settings you need to do this.

Only when you do DLPAR activity, you dont need any reboot.

Azzurro said...

Thanks for your help.

Anonymous said...

Use chhwres instead of chsyscfg. If you have enough ressources, you're not forced to re-activate your profile!

Ex.:

chhwres -m MANAGED_SYSTEM -p LPAR_NAME -r proc -o s -a "uncap_weight=50"

Grz
Pallarpu

Anonymous said...

Hi

Please add my mail id to this post.