This chapter describes the remote commands that you can run to perform HMC functions.
You can perform basic HMC functions remotely by using a command line. These commands are located in the /opt/hsc/bin subdirectory. To enable or disable remote commands, see Enabling and Disabling Remote Commands.
Use the flags in the order shown in this table.
Command | Flags | Function |
---|---|---|
chcuod | -o
Indicates the change Capacity Upgrade on Demand operation to perform. -m The machine type and serial number of the managed system to execute the operation. This name must be enclosed in double quotes and of the form mmm*sssss where mmm is the machine model type and sssss is the machine's serial number. -k The Capacity Upgrade on Demand activation key to be sent to the managed system. | Changes attributes for Capacity Upgrade on Demand |
chhwres |
-r "resources to change"where < resources = < [mem|cpu|slot|led] -o "operation type"where < operation type = <[a|m|r|s] -p"source-partition-name" -t"target-partition-name" (for dynamic logical partitioning move only) -i"drawer-id (for dynamic logical partitioning adapter operation only) -s"slot-id (for dynamic logical partitioning adapter operation only) -q"quantity (number of processors of amount of memory to add, move, or remove; should not be specified for slot resources) -m"managed system" -w"timeout Elapsed time in minutes after which the chhwres operation will be aborted -d"detail-level An integer between 0 and 5 which specifies the level of detail that should be displayed upon return on chhwres operation. -x led-index The index number of the LED that is being set -y led-type [sys | ident] The type of LED; either system attention of identify -v led-setting [on | off] The value to set the LED to
| Dynamic logical partitioning commands - can dynamically add, move, or remove processors, memory , or adapters; or turning managed system LEDs on or off. |
get_cec_mode | -m "managed system" | Indicates whether the managed system is in full mode or partition mode |
get_cec_mtms | -m "managed system" | Returns the machine type and serial number in the following format: machinetype_serialnumber |
get_cec_state | -m "managed system" | Returns the current state of a managed system |
get_cec_version | -m "managed system" | Returns the managed system's supported version. |
get_op_panel | -m "managed system" | Displays operator panel LED contents for the specified partition |
| -p "partition name" | |
get_partiton_state | -m "managed system" | Returns the current state of a partition |
| -p "partition name" | |
lshwres |
-r resource-type [ALL | io | cpu | mem | led] the resources to list. -m"managed-system -p"partition-name This value is specified if you want to view resources of a certain partition. If you want to view resources for the whole managed system, don't specify a partition. -y"led-type [sys | ident] Type of LEDs to list
-F format. A list of names representing desired properties to query, delimited by colons. Valid values are [system, name, key, state, status, id, parent,
location, classcode, assign_to, index, location_code, max, min, allocated,
free, lmb_size, drawer_id, slot_id, slot_type, phys_loc]
| Lists hardware resources of a managed system, or of a given partition on a managed system. |
power_off_cec | -m "managed system" | Powers off a managed system |
power_on_cec | -c "managed system" | Powers on a managed system; -m starts it in either full or partition mode. |
-m full | lpar | ||
| -b boot setting
where boot setting = norm | dd | sms | of | ds | std Use the Standby (std) boot setting when booting to Partition (lpar) mode. Use the other five boot settings when booting to Full Machine Partition (full) mode: Normal (norm), Diagnostic Default Boot List (dd), SMS (sms), OpenFirmware OK Prompt (of), and Diagnostic Stored Boot List (ds). | |
query_cecs | (none) | Returns the user-defined names of all the systems managed by the HMC. Returns "managed system" in the following format, name_type-model (for example, server_7017-S90) |
query_partition_names | -m "managed system" | Returns the names of all defined partitions on a managed system |
query_profile_names | -m "managed system"
-p "partition name " | Returns profile names for the specified partition on the managed system |
rechwres |
-m"managed-system -p"partition name" -r[ resource type] -o[ a | r | m | ] -u"processor id" -i"drawer id" -s"slot id" -help
|
|
reset_partition | -m "managed system" | Performs a hard or soft reset of the operating system loaded on a partition |
| -p "partition name" | |
| -t < reset type > where < reset type > = < hard | soft > |
|
start_partition | -p "partition name" | Starts a partition with a given profile |
-f "profile name" | ||
| -m "managed system" |
You can run the HMC's high-level commands that reside on the server from any client PC. The following examples use the ssh and rexec clients available with the OpenSSH protocol network connectivity suite:
For the examples, assume the following:
[user@myclient user]$ ssh -l hmcuser hmc.mydomain.com /opt/hsc/bin/query_cecs hmcuser@hmc.mydomain.com's password: Property File Name : null Using default configuration settings. Managed Systems : ----------------- Managed System 1
[user@myclient user]$ rexec -l hmcuser -p mypassword hmc.mydomain.com /opt/hsc/bin/query_cecs Property File Name : null Using default configuration settings. Managed Systems : ----------------- Managed System 1
In the preceding examples, the ssh method is recommended over the rexec method, because the ssh method transports a secure cleartext copy of hmcuser's password across the network.
To enable unattended script execution between an ssh client and an HMC, do the following:
The following steps are examples from an ssh client running AIX:
ssh-keygen -t rsa
Then, the following files are created in the $HOME/.ssh directory:
private key: id_rsa public key: id_rsa.pub
The write bits for both group and other are turned off. Ensure that the private key has a permission of 600.
ssh userid@host name "mkdir /home/userid/.ssh"
where userid is the user ID you created and host name is the HMC host name.
scp $HOME/.ssh/id_rsa.pub userid@host name: "/home/userid/.ssh/myid_rsa.pub"
ssh userid@host name "cat/home/userid/.ssh/myid_rsa.pub > /home/hmcmanager/.ssh/authorized_keys2"
ssh userid@host name "rm /home/userid/.ssh/myid_rsa.pub"
To delete the key from the HMC, do the following:
scp userid@host name :.ssh/authorized_keys2 /tmp/mykeyfile"
scp /tmp/mykeyfile userid@host name ".ssh/authorized_keys2"
ssh userid@host name "rm ./ssh/authorized_keys2"