Viewing partition state

From GoFacts

Jump to: navigation, search

The system and partition state can be viewed and changed through a number of HMC command-line commands. The use of the HMC command line may be preferable to the use of the HMC GUI for several reasons. For example, the GUI can be unusably slow over slow links (e.g. modem connections, links to remote sites in foreign countries, etc.) The command-line interface is also handing for writing scripts.

These commands are described in detail in IBM documentation and are summarized below.

Contents

Power 4 HMC Commands

To view partition state:

get_partition_state

To pop a hung partiton into the debugger (aka 'soft reset'):

reset_partition -m <machine> -p <partition> -t soft

To force a reboot of a hung partition (aka 'hard reset'):

reset_partition -m <machine> -p <partition> -t hard

To force a reboot of a "full system partition" (i.e. a system that is not partitioned) :

chsysstate -r sys -n <machine> -o off --immed --restart

To start a partition:

start_partition -p <partition> -f <profile name> -m <machine>

To get a listing of boot profiles:

query_profile_names -m <machine> -p <partition>

Power 5 HMC Commands

Viewing system state

To list all of the HMC-managed systems, issue the command:

lssyscfg -r sys

To list only the "name" field of all of the systems, use the -F flag, together with the name of the field (in this case, name):

lssyscfg -r sys -F name

To see system state for only a single system, issue:

lssyscfg -r sys -m <machine>

The above may be combined with the -F flag as well, to list only one attribute for one machine.

To view the partition state, issue the command:

lssyscfg -r lpar -m <machine>

To see just the names and state:

lssyscfg -r lpar -m <machine> -F name,state --header

All frames managed by the HMC may be listed as:

lssyscfg -r frame

All cages in a frame may be listed by:

lssyscfg -r cage -e <frame-name>

Cages may be processors (cpu+memory+pci slots), and are identified as contents=sys, or they may be I/O drawers, and are identified as contents=io.

To view the various profiles a partition can be booted into:

lssyscfg -r prof -m <machine> --filter lpar_names=<partition>

Changing system state, rebooting

To power on an lpar with a profile:

chsysstate -m <machine> -o on -r lpar -n <lpar name> -f <profile>

i.e. for example:

chsysstate -m alpha -o on -r lpar -n alpha-lp1 -f default

To power on a whole machine (CEC):

chsysstate -m alpha -o on -r sys

Etc. chsysstate, lssyscfg and other commands have good explanations if they're run without arguments.

Issuing a 'soft reset', to push a hung machine into KDB/XMON, is not obvious. The magic incantation is:

chsysstate -r lpar -m <machine> -n <partition> -o dumprestart

To issue a 'hard reset', to turn off a partition, no matter what:

chsysstate -r lpar -m <machine> -n <partition> -o shutdown --immed --restart

Controlling virtual cpus

To add one virtual CPU: (note these use -p instead of -n for the partition name)

chhwres -r proc -m <machine> -p <partition> -o a --procs 1

To add one-tenth of a cpu processing entitlement:

chhwres -r proc -m <machine> -p <partition> --procunits 0.1

To see nice report of: MACHINE,LPAR,PROFILE,STATE:

lssyscfg -r sys -F name | while read mngsys; do lssyscfg -r lpar -F name,curr_profile,state -m $mngsys | sed "s/^/$mngsys,/"; done

References

Personal tools