IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > PowerVM wiki > ... > HMC > HMC hints
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
HMC hints
Added by baublys, last edited by bethd@us.ibm.com on Nov 19, 2008  (view change)
Labels: 
(None)

HMC Hints

Finding out which HMC your server is attached to

You may be sitting in front of a Linux session, and not be certain which HMC the machine is attached to. One can find out the HMC from the Linux command line. To do this, install the ppc64_utils-2.1 package, and then run the commands

:''serv_config -e hmc0''

:''serv_config -e hmc1''

etc, repeating up to 15 if necessary. This will print out the name and IP address of the attached HMC console, as well as other info.

Getting a terminal session to LPAR

In order to debug kernel problems on HMC-attached systems, one needs to get access to the "serial console". The Linux kernel debuggers, such as [[LinuxP:xmon]] and [[LinuxP:kdb]] can only be piloted from the console. All boot messages and magic-sysreq output go to the console. There are several ways to get a console for a system.

Console via HMC GUI

A console can be obtained from the HMC GUI. This console has several disadvantages, one of which is that is uses an old xterm without modern terminal features.

Console via HMC commandline

A console can be obtained from the HMC command line. This has several advantages; most notably, if you are logged in remotely to the HMC, this will use the terminal that you are currently using.

To open a console terminal:

:''mkvterm -m <machine> -p <partition>''

This can be exited with ~~.

To remove a terminal someone else is using:

:''rmvterm -m <machine> -p <partition>''

A menu-driven selection of attached machines and pertitions can be gotten via

:''vtmenu''

An escape sequence to leave vtmenu terminal session is:
:''~.''

HMC remote Reboot

Login to HMC per SSH as hscroot
issue following command
hmcshutdown -r -t0

LPAR Reboot through SSH

In order to restart the LPAR you can use HMC graphical interface or ssh to HMC and use command like this:

chsysstate -r lpar -m MACHINE_NAME -o shutdown --immed --restart --id LPARID (or -n LPARNAME)

Changing firmware update control

  • From GUI
    The Linux-based 'update_flash' firmware installer tool won't work unless the [virtualization:HMC] is told to make the operating system responsible for [[LinuxP:firmware update]]s. This page describes how to do this. This can be accomplished either via the HMC GUI, or through the HMC command line.
  • Command line method
    To make the OS responsible for the firmware updates (to allow the OS to flash_update):

:''updlic -m <name-of-fsp-machine> -o o''

To make the HMC responsible for firmware updates:

:''updlic -m <name-of-fsp-machine> -o h''

Viewing partition state

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 handy for writing scripts.

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

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 system (aka 'hard reset'):

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

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

To see system state for a system or the partitions on a system:

:''lssyscfg -r sys -m <machine>''

:''lssyscfg -r lpar -m <machine>''

To just see names and state:

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

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''

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''

==References==
*[http://publib.boulder.ibm.com/infocenter/iseries/v1r2s/en_US/index.htm?info/ipha1/hardwaremanagementconsolehmc.htm Managing your server using HMC (Hardware Management Console)]
*[http://techsupport.services.ibm.com/server/hmc/power5/tips/hmc_man_GA5.pdf HMC man pages]


 
    About IBM Privacy Contact