hmc command line interface

23
HMC Command Line Interface HMC Command Line Interface HMC Command Line Interface (CLI) support is provided so that users can write scripts to automate their system management tasks. Therefore, it is the intent to provide a command line interface for every HMC function that users may want to automate. Command line interfaces for other HMC functions will also be provided as required. The command line interface is not available from a remote HMC. From a local HMC, the interface is available by right-clicking on the desktop (outside of the HMC web user interface screen). Click on 'Terminals' and 'rshlogin'. A restricted shell command line window will appear. AudienceAll parts of this course are directed toward IBM customers. Prerequisites A basic understanding of web site navigation is all you need. No prior knowledge of command line interface information is assumed. However, before doing any work with managed systems, be sure you have an understanding of the difference between logical partitions (LPARs), partition profiles, and system profiles. Migration Considerations While the HMC for Power6 systems does not support legacy systems, it is still desirable to support the existing syntax when possible. Because eServer p6 hardware and requirements are vastly different from legacy hardware and requirements, the syntax of many commands has been changed, and the old syntax has been deprecated. Deprecated syntax is not supported on eServer p6 and OpenPower systems. When a command is issued using deprecated syntax, if there is a replacement command that performs an equivalent function then an error message is displayed that gives the new command syntax to use. If there is not a replacement command available, then a general invalid syntax error message is displayed. Command Help Help text is available for each HMC command. The help text for a command consists of the command usage statement, a brief description of the command's function, a brief description of each of the command's parameters, and a list of any attributes that can be specified with the command. (An index of all Command Attributes can be found here.) The help text refers you to the man pages and

Upload: maddyprak

Post on 20-Apr-2015

178 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: HMC Command Line Interface

HMC Command Line Interface HMC Command Line InterfaceHMC Command Line Interface (CLI) support is provided so that users can write scripts to automate their system management tasks. Therefore, it is the intent to provide a command line interface for every HMC function that users may want to automate. Command line interfaces for other HMC functions will also be provided as required.The command line interface is not available from a remote HMC. From a local HMC, the interface is available by right-clicking on the desktop (outside of the HMC web user interface screen). Click on 'Terminals' and 'rshlogin'. A restricted shell command line window will appear.AudienceAll parts of this course are directed toward IBM customers.PrerequisitesA basic understanding of web site navigation is all you need. No prior knowledge of command line interface information is assumed. However, before doing any work with managed systems, be sure you have an understanding of the difference between logical partitions (LPARs), partition profiles, and system profiles.Migration ConsiderationsWhile the HMC for Power6 systems does not support legacy systems, it is still desirable to support the existing syntax when possible. Because eServer p6 hardware and requirements are vastly different from legacy hardware and requirements, the syntax of many commands has been changed, and the old syntax has been deprecated. Deprecated syntax is not supported on eServer p6 and OpenPower systems.When a command is issued using deprecated syntax, if there is a replacement command that performs an equivalent function then an error message is displayed that gives the new command syntax to use. If there is not a replacement command available, then a general invalid syntax error message is displayed.Command HelpHelp text is available for each HMC command. The help text for a command consists of the command usage statement, a brief description of the command's function, a brief description of each of the command's parameters, and a list of any attributes that can be specified with the command. (An index of all Command Attributes can be found here.) The help text refers you to the man pages and publications for examples and additional information.The intent of a command's help text is to remind you what the parameters and attribute names are for the command. As such, it is not intended to give detailed information for the first-time user. First-time users should go to the man pages or publications for detailed information about commands.To display help text, all HMC commands support the --help parameter. In addition, the help text is displayed for a command when a command is entered without any parameters.When the --help parameter is included with a command, any other parameters entered with the command are ignored, and the help text for the command is displayed.

Page 2: HMC Command Line Interface

Command ConventionsThe following UNIX conventions are used for command names:· mk is used for create/make actions.· ls is used for list/query actions.· ch is used for change/modify actions.· rm is used for remove/delete actions.Commands are of the form: verb followed by an abbreviated name of the object on which the command will be performed. For example, lssyscfg is the command to list system configuration, lshmcusr is the command to list HMC users, etc.Commands must always have a return value. A return code of 0 is returned if the command was successful, and a non-zero return code is returned if the command failed.If a command fails, an appropriate error message is printed. All command error messages are printed to stderr. All other command output are printed to stdout.In general, commands should not print warning messages, and should not require interactive input from users. Since many users will write scripts to issue HMC commands, warning messages and interactive input would not be useful.Whenever parameter data consists of non-alphanumeric characters, the data must be enclosed in double quotes.All parameters that are a single character must be preceded with a single dash. All parameters longer than a single character must be preceded with a double dash.Non-numerical parameter and attribute values should be meaningful. Meaningful string values are preferred over arbitrary numerical values.Attribute names should be consistent across all commands. The same is true for parameter names, parameter values, filter names, and attribute values. Words that are abbreviated should always be abbreviated in the same way. Common abbreviations should be used to reduce the number of characters the user needs to type.The names of attributes and filters that accept lists should be plural.All commands must have man pages.All commands must support the --help parameter.All list commands must support the -F parameter. This facilitates tokenizing the output. List commands should also print a well-formatted report if the -F parameter is not specified.Note: throughout this course, command elements that are representative examples are enclosed in "arrow" brackets. Here is an example:lssyscfg -r sys -m In this example, means that in a real command, you would enter the actual name of the managed system.A value for is required for most commands. This can either be the user-defined name for the managed system, or be in the form MODEL-TYPE*SERIAL.A value for is always preceded by the -m flag.Setting the Power Off Policy

Page 3: HMC Command Line Interface

The default power off policy for a managed system is that the system powers itself down when the last partition has been powered down. It is recommended that the managed system's power off policy be set to 1, so that the managed system continues to run after the last partition has been powered off.To do this, type the following command:chsyscfg -r sys -m -i "power_off_policy=1"Powering Off the Manufacturing Installed PartitionThe preconfigured manufacturing partition with an ID of 1 has been assigned all of the system's resources. You will need some free resources when you create partitions. Therefore, it is recommended that you power off the manufacturing installed partition before creating partitions.To do this, type the following command:chsysstate -r lpar -m -o off --id lCommands by Task:Activate CoD Advanced Functions - chvetActivate On/Off CoD resources - chcodActivate partition - chsysstateActivate system profile - chsysstateAdd memory to a partition - chhwresAdd processors to a partition - chhwresChange the number of Utility CoD processors - chcodCreate LPAR - mksyscfgCreate LPAR profile - mksyscfgCreate system profile - mksyscfgDeactivate all On/Off CoD processors - chcodDeactivate all On/Off CoD resources - chcodDelete LPAR - rmsyscfgDelete LPAR profile - rmsyscfgDelete system profile - rmsyscfgDisplay activation code generation information - lsvetDisplay activation history log - lsvetEnter a Capacity on Demand (CoD) code - chcodFast power off the managed system - chsysstateGet LPAR state - lssyscfgHard partition reset - chsysstateList all partitions in a managed system - lssyscfgList all systems managed by the HMC - lssyscfgList CoD capacity information - lscodList CoD code generation information - lscodList CoD history log - lscodList HMC remote access settings - lshmcList HMC network settings - lshmcList HMC VPD information - lshmcList HMC version - lshmcList I/O resources for a managed system - lshwresList Licensed Internal Code levels - lslicList LPAR profile properties - lssyscfgList LPAR properties - lssyscfg

Page 4: HMC Command Line Interface

List managed system properties - lssyscfgList memory resources - lshwresList On/Off CoD billing information - lscodList processor resources - lshwresList reference code entries - lsrefcodeList system profile properties - lssyscfgList virtual I/O resources for a managed system - lshwresModify LPAR profile properties - chsyscfgModify LPAR properties - chsyscfgModify managed system properties - chsyscfgModify system profile properties - chsyscfgMove a physical I/O slot from one partition to another - chhwresMove memory from one partition to another - chhwresMove processors from one partition to another - chhwresPower off the managed system - chsysstatePower on the managed system - chsysstateRe-IPL the managed system - chsysstateRemove a physical I/O slot from a partition - chhwresRemove memory from a partition - chhwresRemove processors from a partition - chhwresSet a Utility CoD processor minute usage limit - chcodSoft partition reset - chsysstateUpdate Licensed Internal Code - updlicValidate a system profile - chsysstateCommands by Name:asmmenu - launch the ASM interfacebkconsdata - back up critical HMC databkprofdata - back up profile data for the managed-systemchaccfg - change access control configurationchcod - perform Capacity on Demand (CoD) operationsenter a CoD codeactivate an amount of CoD resourceschange the number of Utility CoD processorsdeactivate all On/Off CoD processorsdeactivate all On/Off CoD resourcesset a Utility CoD processor minute usage limitchhmc - change HMC configuration informationchhmcusr - change HMC user attributechhwres - change system memory and processor resourcesadd memory to a partitionadd processors to a partitionmove memory from one partition to anothermove processors from one partition to anotherremove memory from a partitionremove processors from a partitionchkmedia - check media readinesschled - change LEDchlparutil - change utilization data collection settingschsacfg - change Service Agent configurationchsvcevent - update serviceable events on the HMCchsyscfg - change system configurationmodify LPAR properties

Page 5: HMC Command Line Interface

modify LPAR profile propertiesmodify managed system propertiesmodify system profile properties

chsyspwd - change system passwordchsysstate - change system stateactivate partitionactivate system profilefast power off the managed systemhard partition resetpower off the managed systempower on the managed systemre-IPL the managed systemsoft partition resetchvet - activate Capacity on Demand advanced funtionsenter an activation codecpdump - copy dumpscpsysplan - copy system plandefsysplanres - define system plan resourcedeploysysplan - deploy system plandump - perform dump operationgetdump - get dumpgetupgfiles - get upgrade fileshmcshutdown - shut down the HMChmcwin - proide screen capture on the HMCinstallios - install the Virtual I/O Serverlogssh - log ssh command usagelpar_netboot - retrieve MAC address and physical location code from network adapters for a partition or instruct a partition to network bootlpcfgop - perform a partition configuration image operationlsaccfg - list access control configuration informationlscod - list Capacity on Demand resources for a managed systemlist CoD capacity informationlist CoD code generation informationlist CoD history loglist On/Off CoD billing informationlsdump - lists dump informationlshmc - List HMC Configuration Informationlist HMC remote access settingslist HMC network settingslist HMC VPD informationlist HMC versionlshmcusr - list HMC user informationlshwinfo - list environmental informationlshwres - list the hardware resources of a managed systemdetermine DRC indexes for physical I/O slotsdetermine memory region sizelist I/O resources for a managed systemlist memory resourceslist processor resourceslist virtual I/O resources for a managed system

lsled - list LEDslslic - list Licensed Internal Code (LIC) levelslist LIC levels active on a managed systemlist LIC levels available in a repository

lslock - list lock informationlslparutil - list utilization datalsmediadev - list storage media deviceslsrefcode - list reference code entries for partitions or

Page 6: HMC Command Line Interface

managed systemslist reference code entries for all partitionslist reference code entries for a managed system

lssacfg - list Service Agent configuration informationlssvcevents - list console or serviceable eventslssyscfg - list system configuration information

get LPAR statelist all partitions in a managed systemlist all systems managed by the HMClist LPAR profile propertieslist LPAR propertieslist managed system propertieslist system profile properties

lssysconn - list system connectionslssysplan - list system planslssysplanres - list system plan resourceslvet - list Capacity on Demand advanced functionsdisplay activation code generation informationdisplay activation history logmigrcfg - migrate configurationmkaccfg - create access control objectmahmcusr - create an HMC usermksyscfg - create system configurationcreate LPAR profilecreate system profile

mksysconn - create system connectionmksysplan - make system plan filemkvterm - open a virtual terminal sessionmonhmc - monitor HMC subsystems and system resourcespedbg - Product Engineering debug toolspesh - provide PE Shell accessrmaccfg - remove access control objectrmhmcusr - remove an HMC userrmlock - remove lockrmlparutil - remove utilization datarmprofdata - remove profile datarmsyscfg - remove system configurationdelete LPARdelete LPAR profiledelete system profile

rmsysconn - remove system connectionrmsysplan - remove system planrmsysplanres - remove system plan resourcermvterm - close a vertual terminal sessionrsthwres - restore hardware resourcesrstprofdata - restore profile datarstupgdata - restore upgrade datasaveupgdata - save upgrade datasendfile - transfer file from the HMC to a remote systemstartdump - start dumpupdhmc - update code on the HMCupdlic- update Licensed Internal Code (LIC)retrieve, install, activate updatesretrieve and install updatesremove the last updatechange LIC update control to HMCchange LIC update control to operating systemviosvrcmd - issue virtual I/O server command

Page 7: HMC Command Line Interface

Powering On the Managed SystemUse the chsysstate command to power on the managed system. This power on option is similar to a "White Button" power on. Enter the following:chsysstate -r sys -m -o onPowering Off the Managed SystemUse the chsysstate command to power off the managed system. This can be done in two ways.To power off a managed system normally, type the following:chsysstate -r sys -m -o offYou can also perform a fast power off (operator panel function 8) of a managed system. To do this, type the following command:chsysstate -r sys -m -o off --immedUpdating Licensed Internal CodeUse the updlic command to retrieve, install, and activate Licensed Internal Code on a managed system. Use the -q parameter to determine if the update is disruptive.To determine if the latest CPC update from IBM Retain is disruptive:updlic -m -o a -t cpc -l latest -r ibmretain -qTo change LIC update control on the managed system from HMC to operating system:updlic -m -o oListing HMC Current ConfigurationUse the lshmc command to list the current remote access settings, network settings, version, and Vital Product Data (VPD) information for the HMC.To list the remote access settings for ssh, websm, and http:lshmc -rTo list the HMC hostname and network IP address:lshmc -n -F hostname,ipaddrTo list the HMC Vital Product Data (VPD) information:lshmc -vDisplay the HMC version information:lshmc -VListing all Systems Managed by the HMCUse the lssyscfg command to list system configuration and managed system MTMS information. To list the properties of all systems managed by this HMC, enter the following:lssyscfg -r sysTo list only the user-defined names, model types, serial numbers, and states for all of the systems managed by this HMC, enter:lssyscfg -r sys -F name,type_model,serial_num,state --headerNote that after executing this command, concatenated with * then with represents the MODEL-TYPE*SERIAL, or MTMS, for the managed system.Listing a Managed System's PropertiesTo list a specific managed system's properties, enter:lssyscfg -r sys -m Modifying the Managed System PropertiesUse the chsyscfg command to change the properties of a managed system. The

Page 8: HMC Command Line Interface

following example shows how to change the managed system's user-defined name and power off policy:chsyscfg -r sys -m –i "new_name=newsys1,power_off_policy=0"Valid attributes, specified with the –i flag, include:new_namepower_on_sidepower_off_policypower_on_speedservice_lpar_idpower_on_speed_overrideservice_lpar_name

Instead of entering configuration information on the command line with the -i flag, the information can be placed in a file and the filename specified with the -f flag.For more information about the valid attributes listed in this command example, refer to the Command Attributes table.Listing Reference Codes for a Managed System or PartitionUse the lsrefcode command to list SRC entries for a managed system or partition. Entries may be filtered by lpar name or lpar id.To list the last 10 SRC entries for the managed system:lsrefcode -m -r sys -n 10To list the current SRC entry for each partition on the managed system:lsrefcode -m -r lparDisplay the last 50 SRC entries for partition p1:lsrefcode -m -r lpar -n 50 --filter "lpar_names=p1"Restarting the Managed SystemTo restart the managed system, enter:chsysstate -r sys -m -o off --immed --restartListing Licensed Internal Code Levels for a Managed SystemUse the lslic command to list the LIC levels (cpc or power) on a partition or managed system that have been installed, activated, and accepted. You may also list available levels in a repository.To list current CPC LIC levels on a managed system:lslic -m -t cpcTo list available POWER LIC levels in a repository:lslic -m -t power -r Listing Capacity on Demand Information for a Managed SystemUse the lscod command to list memory and processor Capacity on Demand information for a managed system, including capacity, code generation, and CoD history logs for Capacity Upgrade on Demand (CUoD) and On/Off Capacity on Demand (OOCoD). More CoD operations are covered in 10.0 CLI: Performing Capacity on Demand (CoD) Operations.To list On/Off CoD processor capacity information:lscod -m -t cap -r proc -c onoffTo list CUoD memory activation code generation information:lscod -m -t code -r mem -c cuodTo list the Capacity on Demand history log:lscod -m -t hist

Page 9: HMC Command Line Interface

To Display On/Off Capacity on Demand memory billing information:lscod -m -t bill -r mem -c onoffCreating LPARsUse the mksyscfg command to create a partition.The following is an example of how to create an AIX/Linux partition:mksyscfg -r lpar -m –i "lpar_id=2,name=aixlinux_lpar2,profile_name=prof1, lpar_type=aixlinux,boot_mode=norm, desired_procs=1,min_procs=1, max_procs=1,min_proc_units=0.1, desired_proc_units=0.5,max_proc_units=0.5, proc_type=shared,sharing_mode=cap,desired_mem=400, min_mem=400, max_mem=400,auto_start=1, power_ctrl_lpar_ids=0,io_slots=553713666/65535/1"The following is an example of how to create an i5/OS (OS/400) partition:mksyscfg -r lpar -m –i "lpar_id=3,name=os400_lpar3,profile_name=prof1, lpar_type=os400, desired_procs=1,min_procs=1,max_procs=1, min_proc_units=0.1,desired_proc_units=0.5, max_proc_units=0.5,proc_type=shared, sharing_mode=cap,desired_mem=400, min_mem=400, max_mem=400,auto_start=1,power_ctrl_lpar_ids=0, io_slots=553713699/65535/1, load_source_slot=553713699, console_slot=553713699,min_interactive=0, desired_interactive=0, max_interactive=0"Valid attributes, specified with the –i flag, include:namedesired_proc_unitsmin_proc_unitslpar_idmax_proc_unitsecs_slotprofile_namelpar_io_pool_idssni_windowslpar_typeio_slotsalt_console_slotcluster_idboot_modesni_device_idssharing_modemax_virtual_slotsconsole_slotdesired_procsauto_startsni_config_modemin_procspower_ctrl_lpar_idsalt_load_source_slotmax_procsvirtual_opti_pool_id

Page 10: HMC Command Line Interface

virtual_serial_adaptersdesired_memhsl_opti_pool_idload_source_slotmin_memmin_interactivevirtual_scsi_adaptersmax_memdesired_interactiveuncap_weightproc_typemax_interactivevirtual_eth_adapterslnstead of entering configuration information on the command line with the -i flag, the information can instead be placed in a file, and the filename specified with the -f flag.For more information about the valid attributes listed in this command example, refer to the Command Attributes table.Listing All Partitions in a Managed SystemUse the lssyscfg command to list all partitions in a managed system. To do this, enter:lssyscfg -r lpar -m To list only the names, IDs, and states of all partitions in a managed system, enter:lssyscfg -r lpar -m -F name,lpar_id,state --headerListing LPAR PropertiesUse the lssyscfg command to list the properties of a specific partition. Type the following:lssyscfg -r lpar -m --filter "lpar_ids="Note that the partition name can be specified instead of the partition ID by using the lpar_names filter in place of the lpar_ids filter. Also, more than one partition may be specified in the filter list.For information on using the lshwres command to list a partition's I/O, virtual I/O, processor, and memory resources, see Listing Hardware Resources.Getting the LPAR StateUse the lssyscfg command to display the state of a partition. Type the following:lssyscfg -r lpar -m --filter "lpar_names=" -F stateNote that the partition ID can be specified instead of the partition name by using the lpar_ids filter in placeof the lpar_names filter. Also, more than one partition may be specified in the filter list.Listing All Partitions in a Managed SystemUse the lssyscfg command to list all partitions in a managed system. To do this, enter:lssyscfg -r lpar -m To list only the names, IDs, and states of all partitions in a managed system, enter:lssyscfg -r lpar -m -F name,lpar_id,state --header

Page 11: HMC Command Line Interface

Listing LPAR PropertiesUse the lssyscfg command to list the properties of a specific partition. Type the following:lssyscfg -r lpar -m --filter "lpar_ids="Note that the partition name can be specified instead of the partition ID by using the lpar_names filter in place of the lpar_ids filter. Also, more than one partition may be specified in the filter list.For information on using the lshwres command to list a partition's I/O, virtual I/O, processor, and memory resources, see Listing Hardware Resources.Getting the LPAR StateUse the lssyscfg command to display the state of a partition. Type the following:lssyscfg -r lpar -m --filter "lpar_names=" -F stateNote that the partition ID can be specified instead of the partition name by using the lpar_ids filter in placeof the lpar_names filter. Also, more than one partition may be specified in the filter list.Using a Soft Partition ResetUse the chsysstate command to perform a soft reset of a partition. Type the following:chsysstate -r lpar -m -o reset -n The partition ID can be specified instead of the partition name by using the --id parameter instead of the -n parameter.Using a Hard Partition ResetUse the chsysstate command to perform a hard reset of a partition. Type the following:chsysstate -r lpar -m -o off --id The partition name can be specified instead of the partition ID by using the -n parameter instead of the --id parameter.Deleting an LPARUse the rmsyscfg command to remove a partition. Type the following:rmsyscfg -r lpar -m -n This command removes the specified partition and all of its associated partition profiles from the specified managed system. The partition’s profiles are also removed from any system profiles that contain them.The partition ID can be specified instead of the partition name by using the --id parameter instead of the -n parameter

Use the chhwres command to to perform dynamic logical partitioning (DLPAR) operations on running partitions. DLPAR operations can be performed for memory, physical I/O slots, and processor resources.MemoryMemory can be dynamically added to a partition, removed from a partition, or moved from one partition to another. In the following commands, the quantity of memory to be added, removed, or moved must be specified with the -q flag. This quantity is in megabytes, and must be a multiple of the memory region size for the managed system.Determining Memory Region SizeTo see what the memory region size is for the managed system, enter this

Page 12: HMC Command Line Interface

command:lshwres -r mem -m –-level sys -F mem_region_sizeThe value returned is the memory region size in megabytes.Adding Memory to a PartitionTo add memory to a partition, enter this command:chhwres -r mem -m -o a -p -q Removing Memory from a PartitionTo remove memory from a partition, enter this command:chhwres -r mem -m -o r -p -q Moving Memory from One Partition to AnotherTo move memory from one partition to another partition, enter this command:chhwres -r mem -m -o m -p -t -q Physical I/O SlotsA physical I/O slot can be dynamically added to a partition, removed from a partition, or moved from one partition to another. In the following commands, the DRC index of the I/O slot to be added, removed, or moved must be specified with the -s flag.Note that only one physical I/O slot can be added, removed, or moved at a time.Determining DRC Indexes for Physical I/O SlotsTo see the DRC indexes for all of the physical I/O slots that are on the managed system, enter this command:lshwres -r io --rsubtype slot -m The DRC index for each slot is returned via the drc_index attribute.Adding a Physical I/O Slot to a PartitionTo add a physical I/O slot to a partition, enter this command:chhwres -r io -m -o a -p -s Removing a Physical I/O Slot from a PartitionTo remove a physical I/O slot from a partition, enter this command:chhwres -r io -m -o r -p -s Moving a Physical I/O Slot from One Partition to AnotherTo move a physical I/O slot from one partition to another partition, enter this command:chhwres -r io -m -o m -p -t -s

ProcessorsProcessing resources can be dynamically added to a partition, removed from a partition, or moved from one partition to another. These processing resources depend on the type of processors used by the partitions:· For partitions using dedicated processors, processing resources are dedicated processors.· For partitions using shared processors, processing resources include virtual processors and processing units.Note: Currently, AIX/Linux partitions using shared processors do not support processor DLPAR operations.In the following commands, for partitions using dedicated processors, the quantity of processors to be added, removed, or moved are specified with the --procs flag.For partitions using shared processors, the quantity of virtual processors to be

Page 13: HMC Command Line Interface

added, removed, or moved are also specified with the --procs flag. The quantity of processing units to be added, removed, or moved are specified with the --procunits flag. Both of these flags can be specified, but only one is required.Note that the quantity of processing units must be multiplied by 100 for the command. For example, to add, remove, or move .5 processing units, specify a quantity of 50.Adding Processors to a PartitionTo add processors to a partition using dedicated processors, enter this command:chhwres -r proc -m -o a -p --procs To add processors to a partition using shared processors, enter this command:chhwres -r proc -m -o a -p --procs --procunits

Removing Processors from a PartitionTo remove processors from a partition using dedicated processors, enter this command:chhwres -r proc -m -o r -p --procs To remove processors from a partition using shared processors, enter this command:chhwres -r proc -m -o r -p --procs --procunits Moving Processors from One Partition to AnotherTo move processors from a partition using dedicated processors to another, enter this command:chhwres -r proc -m -o m -p -t --procs To move processors from a partition using shared processors to another, enter this command:chhwres -r proc -m -o m -p -t --procs --procunits Processing resources can also be moved between partitions using dedicated processors and partitions using shared processors. To move processing resources from a partition using dedicated processors to a partition using shared processors, specify the quantity of processors using the --procs flag. This quantity is converted to processing units (by multiplying the quantity by 100) by the HMC for the target partition.To move processing resources from a partition using shared processors to a partition using dedicated processors, specify the quantity of processing units (which must be a multiple of 100) using the --procunits flag. This quantity is converted to processors (by dividing the quantity by 100) by the HMC for the target partition. The --procs flag cannot be specified in this case.

Creating an LPAR ProfileUse the mksyscfg command to create a partition profile. The following is an example of how to create a partition profile:mksyscfg -r prof -m -i "name=prof3,lpar_id=2,boot_mode=norm, sfp_surveillance=1,desired_procs=2, min_procs=1,max_procs=2,min_proc_units=0.1, desired_proc_units=0.5,max_proc_units=0.5, proc_type=shared,sharing_mode=cap, desired_mem=400,min_mem=400,max_mem=400,

Page 14: HMC Command Line Interface

auto_ipl=1,power_ctrl_lpar_ids=0, io_slots=553713666/65535/1"Valid attributes, specified with the -i flag, include:namelpar_id lpar_namepower_ctrl_lpar_idsdesired_procsmin_procsmax_procsdesired_memmin_memmax_memproc_typeuncap_weightsharing_modeload_source_slotalt_load_source_slotconsole_slotalt_console_slotecs_slotmin_proc_unitsdesired_proc_unitsmax_proc_unitslpar_io_pool_idsio_slotsboot_modesfp_surveillancesni_windowsvirtual_opti_pool_idhsl_opti_pool_idmin_interactivedesired_interactivemax_interactivemax_virtual_slotsvirtual_eth_adaptersvirtual_scsi_adaptersvirtual_serial_adapterssni_config_modesni_device_idsauto_ipl

The profile name (name) and the partition (lpar_id or lpar_name) must be specified. Instead of entering configuration information on the command line with the -i flag, the information can instead be placed in a file, and the filename specified with the -f flag.For more information about the valid attributes listed in this command example, refer to the Command Attributes table.Listing LPAR Profile Properties

Page 15: HMC Command Line Interface

Use the lssyscfg command to list a partition profile. Type the following:lssyscfg -r prof -m -–filter"lpar_names=, profile_names="Use the --filter parameter to specify the partition for which partition profiles are to be listed, and to specify which profile names to list. While the filter can only specify a single partition, it can specify multiple profile names for that partition.Note that the partition ID can be specified instead of the partition name by using the lpar_ids filter in place of the lpar_names filter.

Modifying LPAR Profile PropertiesUse the chsyscfg command to modify a partition profile’s properties. The following example shows how to change prof1's memory amounts:chsyscfg -r prof -m -i "name=prof1,lpar_name=lpar3,min_mem=256, max_mem=512,desired_mem=512"Valid attributes, specified with the -i flag, include:namelpar_name lpar_idnew_namedesired_procsmin_procsmax_procsdesired_memmin_memmax_memproc_typeuncap_weightsharing_modeload_source_slotalt_load_source_slotconsole_slotalt_console_slotecs_slotmin_proc_unitsdesired_proc_unitsmax_proc_unitslpar_io_pool_idsio_slotsboot_modesfp_surveillancesni_windowsvirtual_opti_pool_idhsl_opti_pool_idmin_interactivedesired_interactivemax_interactivemax_virtual_slotsvirtual_eth_adaptersvirtual_scsi_adapters

Page 16: HMC Command Line Interface

virtual_serial_adapterssni_config_modesni_device_idsauto_iplpower_ctrl_lpar_ids

Instead of entering configuration information on the command line with the -i flag, the information can instead be placed in a file, and the filename specified with the -f flag.For more information about the valid attributes listed in this command example, refer to the Command Attributes table.Deleting an LPAR ProfileUse the rmsyscfg command to remove a partition profile. Type the following:rmsyscfg -r prof -m -n -p The partition ID can be specified instead of the partition name by using the --id parameter in place of the -p parameter.

Creating a System ProfileUse the mksyscfg command to create a system profile. In the following example, the user is making a system profile named sysprof1, with partition profile prof1 for partition lpar1 and partition profile prof1 for partition lpar2.mksyscfg -r sysprof -m –i "name=sysprof1,\"lpar_names=lpar1,lpar2\", \"profile_names=prof1,prof1\""Partition IDs can be specified instead of partition names when creating a system profile. This is done by using the lpar_ids attribute instead of the lpar_names attribute.Instead of entering configuration information on the command line with the-i flag, the information can instead be placed in a file, and the filename specified with the -f flag.Activating a System ProfileUse the chsysstate command to activate a system profile. Type the following:chsysstate -r sysprof -m -o on -n Validating a System ProfileUse the chsysstate command to validate a system profile. Type the following:chsysstate -r sysprof -m -n - -testTo validate a system profile, then activate that system profile if the validation is successful, type the following:chsysstate -r sysprof -m -o on -n - -test

Deleting a System ProfileUse the rmsyscfg command to remove a system profile. Type the following:rmsyscfg -r sysprof -m -n Listing System Profile PropertiesUse the lssyscfg command to list a system profile’s properties. Type the following:lssyscfg -r sysprof -m --filter "profile_names="To list all system profiles for the managed system, type the following:lssyscfg -r sysprof -m

Page 17: HMC Command Line Interface

Modifying System Profile PropertiesUse the chsyscfg command to modify system profile properties. In the following example, the user is adding profiles prof1 for partition lpar3 and prof2 for partition lpar4 to system profile sysprof1:chsyscfg -r sysprof -m -i "name=sysprof1,\"lpar_names+=lpar3,lpar4\",\"profile_names+=prof1,prof2\""Valid attributes, specified with the –i flag, include:new_nameprofile_nameslpar_names lpar_idsnameInstead of entering configuration information on the command line with the-i flag, the information can instead be placed in a file, and the filename specified with the -f flag.For more information about the valid attributes listed in this command example, refer to the Command Attributes table.The lshwres command, which lists the hardware resources of a managed system, can be used to display I/O, virtual I/O, processor, and memory resources.Listing I/O Resources for a Managed SystemUse the following commands to list:· I/O units on the managed systemlshwres -m -r io --rsubtype unit· I/O buses on the managed systemlshwres -m -r io --rsubtype bus· I/O slots on the managed systemlshwres -m -r io --rsubtype slot· All partitions participating in an I/O pool and all slots assigned to an I/O poollshwres -m -r io --rsubtype iopool· Tagged I/O for i5/OS (OS/400) partitionslshwres -m -r io --rsubtype taggedioListing Processor ResourcesUse the following commands to list processor information for:· The managed systemlshwres -m -r proc --level sys· Partitionslshwres -m -r proc --level lpar· The shared poollshwres -m -r proc --level pool

Listing Virtual I/O Resources for a Managed SystemUse the following commands to list:· Virtual Ethernet adapterslshwres -m -r virtualio --rsubtype eth --level lpar· System level virtual Ethernet informationlshwres -m -r virtualio --rsubtype eth --level sys· Virtual OptiConnect pool informationlshwres -m -r virtualio --rsubtype virtualopti --level lpar· HSL OptiConnect pool informationlshwres -m -r virtualio --rsubtype hslopti --level lpar· Virtual serial adapterslshwres -m -r virtualio --rsubtype serial --level lpar· Virtual serial servers with open connectionslshwres -m -r virtualio --rsubtype serial --level openserial· Virtual SCSI adapterslshwres -m -r virtualio --rsubtype scsi --level lpar· Partition-level virtual slot informationlshwres -m -r virtualio --rsubtype slot --level lpar

Page 18: HMC Command Line Interface

· Virtual slot informationlshwres -m -r virtualio --rsubtype slot --level slotListing Memory ResourcesUse the following commands to list:· Memory information for a managed systemlshwres -m -r mem --level sys· Memory information for partitionslshwres -m -r mem --level lpar

Entering a Capacity on Demand CodeTo enter an CoD code:chcod -o e -m -k Activating an Amount of On/Off CoD ResourcesTo activate an amount of On/Off CoD memory for a certain number of days:chcod -m -o a -c onoff -r mem -q -d Changing the Number of Utility CoD ProcessorsTo decrease the number of Activated Utility CoD processors:chcod -m -o a -c utility -r proc -q Deactivating all On/Off CoD ProcessorsTo deactivate all On/Off CoD processors:chcod -m -o d -c onoff -r procDeactivating all On/Off CoD ResourcesTo deactivate all On/Off CoD resources:chcod -m -o d -c onoff -r memSetting a Utility CoD Processor Minute Usage LimitTo set a Utility CoD processor minute usage limit::chcod -m -o s -c utility -r proc -l Activating Capacity on Demand (CoD) Advanced FunctionsCoD advanced functions include Advanced POWER Virtualization and Endterprise Enablement. CoD advanced functions are sometimes referred to as Virtualization Engine systems technologies. To enter an activation code:chvet -m -o e -k Displaying Activation Code Generation InformationTo display activation code generation information:lsvet -m -t codeDisplaying the Activation History LogTo display activation history log:lsvet -m -t his