Inhaltsverzeichnis
Command line syntax
HMC related commands
monhmc -r mem -n 0 monhmc -r disk -n 0 monhmc -r proc -n 0 monhmc -r swap -n 0 |
shows total, used and free memory of HMC shows filesystems and usage info shows cpu usage of each processor shows paging space usage |
lshmc -V lshmc -v lshmc -n |
HMC version HMC model lists the network settings of the HMC |
lssvcevents -t console -d 60 lssvcevents -t hardware -d 30 lssvcevents -t console -d 7 | grep DLPAR lssvcevents -t console -d 7 | grep Migration |
lists console events in the past 60 days list serviceable events which occured in the past 30 days list DLPAR operations of last 7 days (you can grep more to mem or proc) list last 7 days LPMs |
HMC management commands
hmcshutdown -t 3 -r hmcshutdown -t now |
Reboot the HMC after 3 minutes Halt the HMC immediately |
lshmcusr lshmcusr --filter "names=flecke" lshmcusr --filter "names=flecke" --header -F name,taskrole,description,remote_webui_access |
list users list filtered user flecke list parameter name,taskrole,description + remote_webui_access with header by filtered user flecke |
mkhmcusr -u flecke -a hmcsuperadmin -d "System Administrator" | create new user with taskrole hmcsuperadmin and description "System Administrator" |
chhmcusr -i "name=[USER],remote_webui_access=1" chhmcusr -i "name=[USER],taskrole=hmcoperator" chhmcusr -u [USER] -t passwd |
change access to WEB GUI change taskrole change user password |
HMC debugging
to create debug Information, you need to create a special user account
mkhmcusr -u hscpe -a hmcpe pedbg -c -q 4 |
create user hscpe collect debugging information for error analyzing |
Managed System + LPAR commands
list connected systems
lssysconn -r all -F --header lssysconn -r all -F "type_model_serial_num" |
all values with header defined field type_model_serial_num |
list system resources
lssyscfg –r sys lssyscfg -r sys -F name:type_model:serial_num lssyscfg -r sys -m [Managed System] -F --header |
all values defined fields name, type_model + serial_num all values with header for specified managed System |
Summary of partitions on a managed system
lssyscfg -m [ManagedSystem] -r lpar lssyscfg -m [ManagedSystem] -r lpar -F --header lssyscfg -m [ManagedSystem] -r lpar --filter "lpar_names=[LparName]" lssyscfg -m [ManagedSystem] -r lpar -F "name:lpar_id:lpar_type:state:default_profile" |
all values all values with header for specified managed System all values with header for specified managed System and filtered LPAR name defined fields name, lpar_id, lpar_type, state, default_profile |
change configuration
chsyscfg -r sys -m [ManagedSystem] -i "new_name=pserver1" chsyscfg -r lpar -m [ManagedSystem] -i "name=OldName,new_name=NewName" chsyscfg -r prof -m [ManagedSystem] -i "name=default,lpar_name=Germany_Prod_1,boot_mode=norm" chsyscfg -r prof -m [ManagedSystem] -i "name=[ProfileName],lpar_name=[LparName],uncap_weight=32" |
rename managed system to name pserver1 rename LPAR from name OldName to NewName change boot_mode from a defined LPAR Germany_Prod_1 changes weight in given profile |
rmsyscfg -r lpar -m [ManagedSystem] -n [LparName] | Remove LPAR |
List installed I/O devices on HMC managed system
lshwres -r io --rsubtype unit -m [ManagedSystem] lshwres -r io --rsubtype bus -m [ManagedSystem] lshwres -r io --rsubtype slot -m [ManagedSystem] lshwres -r io --rsubtype slot -m [ManagedSystem] -Flpar_name,unit_phys_loc,bus_id,phys_loc,description, --header |
by unit by bus by slot by defined fields and slot |
List processors, memory and hca’s on HMC managed system (system/lpar)
lshwres -r proc -m [ManagedSystem] --level sys lshwres -r proc -m [ManagedSystem] --level lpar |
by System by LPAR |
List memory on HMC managed system
lshwres -r mem -m [ManagedSystem] --level sys lshwres -r mem -m [ManagedSystem] --level lpar |
by System by LPAR |
List hca’s on HMC managed system
lshwres -r hca -m [ManagedSystem] --level sys lshwres -r hca -m [ManagedSystem] --level lpar |
by System by LPAR |
Lists all logical partitions and the MAC addresses of the virtual Ethernet
lshwres -r virtualio --rsubtype eth --level lpar -m [Model] -F lpar_name,mac_addr |
changes resources of actual running config (it will not add to profile)
chhwres -r virtualio --rsubtype eth -m [ManagedSystem] -o s -p [LparName] -s [AdapterId] -a "addl_vlan_ids+=[VlanTag]" chhwres -r virtualio --rsubtype eth -m [ManagedSystem] -o s -p [LparName] -s [AdapterId] -a "addl_vlan_ids-=[VlanTag]" chhwres -r proc -m [ManagedSystem] -o a -p [LparName] --procunits 8 chhwres -r proc -m [ManagedSystem] -p [LparName] -o s -a "uncap_weight=32" |
adding VLAN TAG dynamically removing VLAN TAG dynamically additionally assign 8 processors changes weight of actual running config |
manage LPARs
chsysstate -r lpar -m [ManagedSystem] -o on -n [LparName] -f chsysstate -r lpar -m [ManagedSystem] -o on -n [LparName] -b sms chsysstate -m [ManagedSystem] -r lpar -n [LparName] -o osshutdown chsysstate -m [ManagedSystem] -r lpar -n [LparName] -o shutdown --immed |
boot LPAR boot LPAR into sms status Shutdown an LPAR using the operating system Shutdown an LPAR immediate |
RMC connection
lspartition -dlpar |
shows dlpar capable partitions (it will show if RMC connection is OK between the HMC and LPAR) |
lsrsrc IBM.MCP or lsrsrc IBM.ManagementServer #OLD command resource 1: MNName = "192.6.5.77" NodeID = 5089136303073145144 KeyToken = "hmc2" IPAddresses = {"192.6.5.55"} ConnectivityNames = {"192.6.5.77"} HMCName = "7042CR4*06CDB1B" HMCIPAddr = "192.6.5.55" HMCAddIPs = "10.0.0.1" HMCAddIPv6s = "" ActivePeerDomain = "" NodeNameList = {"aixccf13"} |
display connected HMC from LPAR |
Fix RMC connection
There are some basic commands that can be run to check status of RMC configurations and there are some dependancies on RSCT versions as to which commands you use. RSCT 3.1.x.x levels are the newest and included in AIX 6.1 TL6 or higher and RSCT 2.x.x.x are included in AIX 6.1 TL5 or lower. Following queries provide a quick method to assess RMC health.On AIX 6.1 TL5 or lower, this fileset needs to be installed
lslpp -l csm.client
On AIX 6.1 TL6 or higher, his fileset needs to be 3.1.0.x level or higher
lslpp -l rsct.core.rmc
On all AIX versions, check if all IP and host IDs trusted.
/usr/sbin/rsct/bin/ctsvhbac
check if HMC are listed as a resource
For AIX 6.1 TL5 or lower
lsrsrc IBM.ManagementServer
For AIX 6.1 TL6 or higher
lsrsrc IBM.MCP
On HMC (as hscroot) check LPAR's DCaps value are non-zero
lspartition -dlpar
If you answer no to any of the above then corrective action is required.
Connections can be fixed with commands (run as root on LPAR, HMC, or both) below:
/usr/sbin/rsct/install/bin/recfgct /usr/sbin/rsct/bin/rmcctrl -p
You would need a pesh password for your HMC if you need to run the above fix commands on the HMC.
You can try the following command first as hscroot:
lspartition -dlparreset
If that does not help you will need to request pesh passwords from IBM Support for your HMC so you can run the recfgct and rmcctrl commands listed above.
After running the above commands it will take several minutes before RMC connection is restored. The best way to monitor is by running the lspartition -dlpar command on the HMC every few minutes and watch for the target LPAR to show up with a non-zero DCaps value.
Connect to LPAR using vterm
mkvterm -m [ManagedSystem] -p [LparName] mkvterm -m [ManagedSystem] --id [Number] rmvterm -m [ManagedSystem] -p [LparName] rmvterm -m [ManagedSystem] --id [Number] ~~. |
open a vterm by LPAR Name open a vterm by LPAR ID close a vterm connection by LPAR Name close a vterm connection by LPAR ID logout from vterm session |