HMC command line interface

Typically, HMCs are placed inside the machine room where managed systems are located, so you might not be allowed to physically access the HMC.

You can remotely access it using...

The command line interface of the IBM HMC for pSeries is useful in the following situations:

  1. If you have to manage several systems, you can achieve consistent results by using the command line interface. The command sequence can be stored in scripts and executed remotely.

  2. After you have developed a consistent way to manage your managed systems, you can automate the operations by invoking the scripts from batch processing applications (such as the cron daemon) from other systems.

    The HMC provides a set of commands so it can be used for many management tasks; however, those commands are only accessible from the remote system, and not from the HMC local console. Any TCP/IP-capable system that supports ssh can use the remote execution of command line functions.

    You have two ways to remotely execute the command line interface on the HMC using OpenSSH:

  3. Execute commands remotely.

    The following sample shows a remote user on a remote AIX system executing...

    /opt/hsc/bin/lshmc -r

    ...as the wasp5l user on the HMC (riogrande). You will be prompted to enter the login password of the hscroot user, and then the command will list the status of the remote command execution configuration:

    $ ssh wasp5l@riogrande /opt/hsc/bin/lshmc -r
    wasp5l@riogrande password: XXXXXX
    Remote Command Execution Configuration:
    Remote command execution using the ssh facility: enabled

  4. Execute commands after logging in to the HMC.

The following sample shows that the lshmc -r command is executed on the HMC after logging in to the HMC as the wasp5l user:

$ ssh wasp5l@riogrande
wasp5l@riogrande password: XXXXXX
Last login: Mon Sept 26 14:32:13 2006 from madrid.itsc.austin.ibm.com
[wasp5l@riogrande]$ lshmc -r
Remote Command Execution Configuration:
Remote command execution using the ssh facility: enabled

A collection of some HMC commands are listed in Table 3-1.

Command Short description
lshwres Lists hardware resources of a managed system
lssyscfg Lists attributes of partitions, partition profiles, or the managed system
chhwres Adds, removes, or moves hardware resources of a managed system
chsysstate Changes the state of a partition (for example, power off)
chsyscfg Changes attributes of partitions, partition profiles, or the managed system
lshwinfo Lists environmental information, such as input power levels and ambient air temperatures
lslparutil Lists utilization metrics for the managed system and partitions
viosvrcmd Issues an I/O server command line interface (ioscli) command to a Virtual I/O Server

For a full explanation of all HMC commands, refer to HMC Command Descriptions.