Thursday, June 12, 2008

Listing LPAR information from HMC command line interface

To list managed system (CEC) managed by HMC

# lssyscfg -r sys -F name

To list number of LPAR defined on the Managed system (CEC)

# lssyscfg -m SYSTEM(CEC) -r lpar -F name,lpar_id,state

To list LPAR created in your system use lsyscfg command as mentioned below.

# lssyscfg -r prof -m SYSTEM(CEC) --filter "lpar_ids=X, profiles_names=normal"


m-> Managed System name
lpar_ids -> Lpar ID (numeric Id for each LPAR created in the Managed system (CEC)
profile_name -> To choose profile of LPAR

To start console of LPAR from HMC

# mkvterm -m SYSTEM(CEC) --id X

m- > managed system (ex -p5-570_xyz)
id - > LPAR ID

To finish a VTERM, simply press ~ followed by a dot .!

To disconnect console of LPAR from HMC

# rmvterm -m SYSTEM(CEC) --id x

To access LPAR console for diffrent Managed system from HMC


Activating Partition

hscroot@hmc-570:~> lssyscfg -m Server-9110-510-SN100xxx -r lpar -F name,lpar_id,state,default_profile VIOS1.3-FP8.0,1,Running,default linux_test,2,Not Activated,client_default hscroot@hmc-570:~> chsysstate -m Server-9110-510-SN100xxxx -r lpar -o on -b norm --id 2 -f client_default

The above example would boot the partition in normal mode. To boot it into SMS menu use -b sms and to boot it to the OpenFirmware prompt use -b of.

To restart a partition the chsysstate command would look like this:

hscroot@hmc-570:~> chsysstate -m Server-9110-510-SN100xxxx -r lpar --id 2 -o shutdown --immed --restart

And to turn it off - if anything else fails - use this:
hscroot@hmc-570:~> chsysstate -m Server-9110-510-SN100xxxx -r lpar --id 2 -o shutdown --immed
hscroot@hmc-570:~> lssyscfg -m Server-9110-510-SN100xxxx -r lpar -F name,lpar_id,state
linux_test,2,Shutting Down

Deleting Partition

hscroot@hmc-570:~> lssyscfg -m Server-9110-510-SN100xxxx -r lpar -F name,lpar_id
hscroot@hmc-570:~> rmsyscfg -m Server-9110-510-SN100xxxx -r lpar --id 2
hscroot@hmc-570:~> lssyscfg -m Server-9110-510-SN100xxxx -r lpar -F name,lpar_id


Elmo Is Bold said...

But from within a particular LPAR, what can you find out from the command line about the LPAR?

Actually, how can you find out whether or not it IS an LPAR you have logged into?

Santosh Gupta said...

In AIX 5.3 there is a command called lparstat . If particular system is LPAR it will show its CPU/memory. You can also see in topas -C which monitors CEC .it will show you how many LPAR running in Pseries box.

Spirit said...

I know that my AIX box is LPARed.
And I am on one partition.

I don't have access to HMC.
Can I know from my machine what are the other LPARs and whether they are up and running or not?


Santosh Gupta said...

Topas -C will monitor whole CEC & will report utilisation of All LPAR in the Physical box.

Zubbi said...

how can i find just the lpar id after creating one using mksyscfg command..

Rafael Velez said...

Nice article, thanks for the reference, I have a server coming up in vtmenu, I don't want to troubleshoot it yet, but want it to be removed from there, is there any command to do that?

Rafael Velez