Saturday, May 14, 2011

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

Command Conventions
The 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
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 Partition
The 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 l
Commands by Task:
Activate CoD Advanced Functions - chvet
Activate On/Off CoD resources - chcod
Activate partition - chsysstate
Activate system profile - chsysstate
Add memory to a partition - chhwres
Add processors to a partition - chhwres
Change the number of Utility CoD processors - chcod
Create LPAR - mksyscfg
Create LPAR profile - mksyscfg
Create system profile - mksyscfg
Deactivate all On/Off CoD processors - chcod
Deactivate all On/Off CoD resources - chcod
Delete LPAR - rmsyscfg
Delete LPAR profile - rmsyscfg
Delete system profile - rmsyscfg
Display activation code generation information - lsvet
Display activation history log - lsvet
Enter a Capacity on Demand (CoD) code - chcod
Fast power off the managed system - chsysstate
Get LPAR state - lssyscfg
Hard partition reset - chsysstate
List all partitions in a managed system - lssyscfg
List all systems managed by the HMC - lssyscfg
List CoD capacity information - lscod
List CoD code generation information - lscod
List CoD history log - lscod
List HMC remote access settings - lshmc
List HMC network settings - lshmc
List HMC VPD information - lshmc
List HMC version - lshmc
List I/O resources for a managed system - lshwres
List Licensed Internal Code levels - lslic
List LPAR profile properties - lssyscfg
List LPAR properties - lssyscfg
List managed system properties - lssyscfg
List memory resources - lshwres
List On/Off CoD billing information - lscod
List processor resources - lshwres
List reference code entries - lsrefcode
List system profile properties - lssyscfg
List virtual I/O resources for a managed system - lshwres
Modify LPAR profile properties - chsyscfg
Modify LPAR properties - chsyscfg
Modify managed system properties - chsyscfg
Modify system profile properties - chsyscfg
Move a physical I/O slot from one partition to another - chhwres
Move memory from one partition to another - chhwres
Move processors from one partition to another - chhwres
Power off the managed system - chsysstate
Power on the managed system - chsysstate
Re-IPL the managed system - chsysstate
Remove a physical I/O slot from a partition - chhwres
Remove memory from a partition - chhwres
Remove processors from a partition - chhwres
Set a Utility CoD processor minute usage limit - chcod
Soft partition reset - chsysstate
Update Licensed Internal Code - updlic
Validate a system profile - chsysstate
Commands by Name:
asmmenu - launch the ASM interfacebkconsdata - back up critical HMC databkprofdata - back up profile data for the managed-systemchaccfg - change access control configuration
chcod - perform Capacity on Demand (CoD) operations
enter a CoD code
activate an amount of CoD resources
change the number of Utility CoD processors
deactivate all On/Off CoD processors
deactivate all On/Off CoD resources
set a Utility CoD processor minute usage limit
chhmc - change HMC configuration informationchhmcusr - change HMC user attributechhwres - change system memory and processor resources
add memory to a partition
add processors to a partition
move memory from one partition to another
move processors from one partition to another
remove memory from a partition
remove processors from a partition
chkmedia - check media readinesschled - change LEDchlparutil - change utilization data collection settingschsacfg - change Service Agent configurationchsvcevent - update serviceable events on the HMCchsyscfg - change system configuration
modify LPAR properties
modify LPAR profile properties
modify managed system properties
modify system profile properties

chsyspwd - change system passwordchsysstate - change system state
activate partition
activate system profile
fast power off the managed system
hard partition reset
power off the managed system
power on the managed system
re-IPL the managed system
soft partition reset
chvet - activate Capacity on Demand advanced funtions
enter an activation code
cpdump - 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 system
list CoD capacity information
list CoD code generation information
list CoD history log
list On/Off CoD billing information
lsdump - lists dump informationlshmc - List HMC Configuration Information
list HMC remote access settings
list HMC network settings
list HMC VPD information
list HMC version
lshmcusr - list HMC user informationlshwinfo - list environmental informationlshwres - list the hardware resources of a managed system
determine DRC indexes for physical I/O slots
determine memory region size
list I/O resources for a managed system
list memory resources
list processor resources
list virtual I/O resources for a managed system

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

lslock - list lock informationlslparutil - list utilization datalsmediadev - list storage media deviceslsrefcode - list reference code entries for partitions or managed systems
list reference code entries for all partitions
list reference code entries for a managed system

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

get LPAR state
list all partitions in a managed system
list all systems managed by the HMC
list LPAR profile properties
list LPAR properties
list managed system properties
list system profile properties

lssysconn - list system connectionslssysplan - list system planslssysplanres - list system plan resources
lvet - list Capacity on Demand advanced functions
display activation code generation information
display activation history log
migrcfg - migrate configurationmkaccfg - create access control objectmahmcusr - create an HMC usermksyscfg - create system configuration
create LPAR profile
create 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 configuration
delete LPAR
delete LPAR profile
delete 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 updates
retrieve and install updates
remove the last update
change LIC update control to HMC
change LIC update control to operating system
viosvrcmd - issue virtual I/O server command

Powering On the Managed System
Use 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 on
Powering Off the Managed System
Use 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 off
You 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 --immed
Updating Licensed Internal Code
Use 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 -q
To change LIC update control on the managed system from HMC to operating system:
updlic -m -o o
Listing HMC Current Configuration
Use 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 -r
To list the HMC hostname and network IP address:
lshmc -n -F hostname,ipaddr
To list the HMC Vital Product Data (VPD) information:
lshmc -v
Display the HMC version information:
lshmc -V
Listing all Systems Managed by the HMC
Use 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 sys
To 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 --header
Note 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 Properties
To list a specific managed system's properties, enter:
lssyscfg -r sys -m
Modifying the Managed System Properties
Use the chsyscfg command to change the properties of a managed system. The 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_name
power_on_side
power_off_policy
power_on_speed
service_lpar_id
power_on_speed_override
service_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 Partition
Use 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 10
To 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 System
To restart the managed system, enter:
chsysstate -r sys -m -o off --immed --restart
Listing Licensed Internal Code Levels for a Managed System
Use 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 cpc
To list available POWER LIC levels in a repository:
lslic -m -t power -r
Listing Capacity on Demand Information for a Managed System
Use 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 onoff
To list CUoD memory activation code generation information:
lscod -m -t code -r mem -c cuod
To list the Capacity on Demand history log:
lscod -m -t hist
To Display On/Off Capacity on Demand memory billing information:
lscod -m -t bill -r mem -c onoff
Creating LPARs
Use 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:
name
desired_proc_units
min_proc_units
lpar_id
max_proc_units
ecs_slot
profile_name
lpar_io_pool_ids
sni_windows
lpar_type
io_slots
alt_console_slot
cluster_id
boot_mode
sni_device_ids
sharing_mode
max_virtual_slots
console_slot
desired_procs
auto_start
sni_config_mode
min_procs
power_ctrl_lpar_ids
alt_load_source_slot
max_procs
virtual_opti_pool_id
virtual_serial_adapters
desired_mem
hsl_opti_pool_id
load_source_slot
min_mem
min_interactive
virtual_scsi_adapters
max_mem
desired_interactive
uncap_weight
proc_type
max_interactive
virtual_eth_adapters
lnstead 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 System
Use 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
Listing LPAR Properties
Use 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 State
Use the lssyscfg command to display the state of a partition. Type the following:
lssyscfg -r lpar -m --filter "lpar_names=" -F state
Note 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 System
Use 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
Listing LPAR Properties
Use 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 State
Use the lssyscfg command to display the state of a partition. Type the following:
lssyscfg -r lpar -m --filter "lpar_names=" -F state
Note 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 Reset
Use 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 Reset
Use 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 LPAR
Use 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.
Memory
Memory 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 Size
To see what the memory region size is for the managed system, enter this command:
lshwres -r mem -m –-level sys -F mem_region_size
The value returned is the memory region size in megabytes.
Adding Memory to a Partition
To add memory to a partition, enter this command:
chhwres -r mem -m -o a -p -q
Removing Memory from a Partition
To remove memory from a partition, enter this command:
chhwres -r mem -m -o r -p -q
Moving Memory from One Partition to Another
To move memory from one partition to another partition, enter this command:
chhwres -r mem -m -o m -p -t -q
Physical I/O Slots
A 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 Slots
To 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 Partition
To 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 Partition
To 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 Another
To move a physical I/O slot from one partition to another partition, enter this command:
chhwres -r io -m -o m -p -t -s

Processors
Processing 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 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 Partition
To 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 Partition
To 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 Another
To 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 Profile
Use 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, auto_ipl=1,power_ctrl_lpar_ids=0, io_slots=553713666/65535/1"
Valid attributes, specified with the -i flag, include:
name
lpar_id lpar_name
power_ctrl_lpar_ids
desired_procs
min_procs
max_procs
desired_mem
min_mem
max_mem
proc_type
uncap_weight
sharing_mode
load_source_slot
alt_load_source_slot
console_slot
alt_console_slot
ecs_slot
min_proc_units
desired_proc_units
max_proc_units
lpar_io_pool_ids
io_slots
boot_mode
sfp_surveillance
sni_windows
virtual_opti_pool_id
hsl_opti_pool_id
min_interactive
desired_interactive
max_interactive
max_virtual_slots
virtual_eth_adapters
virtual_scsi_adapters
virtual_serial_adapters
sni_config_mode
sni_device_ids
auto_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
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 Properties
Use 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:
name
lpar_name lpar_id
new_name
desired_procs
min_procs
max_procs
desired_mem
min_mem
max_mem
proc_type
uncap_weight
sharing_mode
load_source_slot
alt_load_source_slot
console_slot
alt_console_slot
ecs_slot
min_proc_units
desired_proc_units
max_proc_units
lpar_io_pool_ids
io_slots
boot_mode
sfp_surveillance
sni_windows
virtual_opti_pool_id
hsl_opti_pool_id
min_interactive
desired_interactive
max_interactive
max_virtual_slots
virtual_eth_adapters
virtual_scsi_adapters
virtual_serial_adapters
sni_config_mode
sni_device_ids
auto_ipl
power_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 Profile
Use 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 Profile
Use 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 Profile
Use the chsysstate command to activate a system profile. Type the following:
chsysstate -r sysprof -m -o on -n
Validating a System Profile
Use the chsysstate command to validate a system profile. Type the following:
chsysstate -r sysprof -m -n - -test
To 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 Profile
Use the rmsyscfg command to remove a system profile. Type the following:
rmsyscfg -r sysprof -m -n
Listing System Profile Properties
Use 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
Modifying System Profile Properties
Use 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_name
profile_names
lpar_names lpar_ids
name
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.
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 System
Use 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 taggedio
Listing Processor Resources
Use 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 System
Use 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
· Virtual slot informationlshwres -m -r virtualio --rsubtype slot --level slot
Listing Memory Resources
Use 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 Code
To enter an CoD code:
chcod -o e -m -k
Activating an Amount of On/Off CoD Resources
To 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 Processors
To decrease the number of Activated Utility CoD processors:
chcod -m -o a -c utility -r proc -q
Deactivating all On/Off CoD Processors
To deactivate all On/Off CoD processors:
chcod -m -o d -c onoff -r proc
Deactivating all On/Off CoD Resources
To deactivate all On/Off CoD resources:
chcod -m -o d -c onoff -r mem
Setting a Utility CoD Processor Minute Usage Limit
To set a Utility CoD processor minute usage limit::
chcod -m -o s -c utility -r proc -l
Activating Capacity on Demand (CoD) Advanced Functions
CoD 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 Information
To display activation code generation information:
lsvet -m -t code
Displaying the Activation History Log
To display activation history log:
lsvet -m -t his

No comments:

Post a Comment