HMC Comand Line Basics

vtmenu – get list of systems and connect via console

lssysconn -r all – list connection information for all managed systems

lssyscfg -r sys – list all managed systems

 

 
HMC command line:

HMC related commands:

monhmc -r mem -n 0                                            shows total, used and free mamory of HMC
monhmc -r disk -n 0                                           shows filesystems and usage info (same as “df -k”)
monhmc -r proc -n 0                                           shows cpu usage of each processor
monhmc -r swap -n 0                                           shows paging space usage

Managed system and LPAR related commands:

 commands have –help option and man pages

lssyscfg -r sys -F name | grep aix21                          shows the full name of the managed system (what we can use in other commands)
lssyscfg -r lpar -m <managedsysname> -F name                  shows the full name of the lpars of the managed system
lssyscfg -r sys -m <managedsysname> -F name,state –header    shows the state of the managed system
lssyscfg -r lpar -m <managedsysname> -F name,state –header   shows the state of the lpars of the managed system
lssyscfg -r prof -m aix10-SN0603C6H –filter “lpar_names=aix10” -F name,boot_mode   it will show the boot mode in the profile
lssyscfg -r prof -m <man.sys> -F lpar_name,virtual_eth_adapters                     shows LPARS with ethernet adaptesr and VLAN tags

lshwres -r mem -m <managedsysname> –level sys                shows memory information of the managed system
lshwres -r mem -m <managedsysname> –level lpar               shows memory information of lpars of the managed system
lshwres -r proc -m <managedsysname> –level sys               shows processor information of the managed system
lshwres -r proc -m <managedsysname> –level lpar              shows processor information of lpars of the manage system
lshwres -r io -m <managedsysname> –rsubtype slot             shows IO slot information
lshwres -r proc -m <managedsysname> –level sys -F installed_sys_proc_units:configurable_sys_proc_units

lshwres -r virtualio –rsubtype scsi -m <managedsysname> –level lpar               lists scsi devices by LPAR
lshwres -r virtualio –rsubtype eth -m <managedsysname> –level lpar                lists virt. eth. devices by LPAR
lshwres -r virtualio –rsubtype eth -m <managedsysname> –level lpar -F lpar_name,port_vlan_id

chsysstate -m <managedsysname> -o standby -r sys  
           power on a system to standby
chsysstate -r sys -m <managedsysname> -o off                  normal power off the managed system
chsysstate -r sys -m <managedsysname> -o off –immed          fast power off the managed system

chsysstate -m <managed system> -r lpar -n <lparname> -o shutdown –restart          it will reboot an lpar with dump
chsysstate -m <managed system> -r lpar -n <lparname> -o shutdown –immed –restart  it will reboot an lpar immediately (without dump)
chsysstate -m <managedsysname> -r lpar -n <lparname> -o shutdown –immed            it will shutdown the oprating system
chsysstate -m aix10-SN65158BE -o on -r lpar -n aix10 -f default                     it will activate an lpar

lspartition -dlpar                                            shows dlpar capable partitions
                                                              (it will show if RMC connection is OK between the HMC and LPAR)

lssysconn -r all                                              to see what IPs are assigned by the HMC
mksysconn -o auto                                             tells HMC to re-discover all servers’ IP address

lssvcevents -t console -d 60                                  lists console events in the past 60 days
lssvcevents -t hardware -d 0                                  list serviceable events which occured today
lssvcevents -t console -d 300 | grep DLPAR                    list DLPAR operations of last 300 days (you can grep more to mem or proc)
lssvcevents -t console -d 7 | grep Migration                  list last 7 days LPMs

lshmc -V                                                      hmc version
lshmc -v                                                      hmc model
lshmc -n                                                      lists the network settings of the hmc
hmcshutdown -t now -r                                         reboot the HMC (-t: timing in minutes, -r: reboot)

vtmenu                                                        hmc menu options (console session can be opened as well)
logout: ~~. (2 tilde and a dot)

lslparmigr -r sys -m <managed system> | sed “s/,/\n/g”        shows how many concurrent migr. is possible

ssh hscroot@hmcXX ‘for i in `lssyscfg -r sys -F name`;do echo $i;lssyscfg -r lpar -m $i -F name|grep <LPARNAME>;echo;done’ <–shows man. system of given LPAR

————————————

Default root password: passw0rd (try su -)

————————————

opening/closing virtual terminal from hmc:

lssyscfg -r sys -F name                         <–get managed system name
lssyscfg -r lpar -m <managed system> -F name    <–get lpar name

mkvterm -m <managed system> -p <lpar>           <–opens a terminal window
rmvterm -m <managed system> -p <lpar>           <–closes a terminal window

~~.                                             <–logout from te session (not necessary to leave AIX)

————————————

Adding/removing VLAN TAG dynamically:
(it will not add to profile)

adding:
chhwres -r virtualio –rsubtype eth -m <man.sys.> -o s -p <LPAR> -s <adapter id> -a “addl_vlan_ids+=<VLAN TAG>”

removing:
chhwres -r virtualio –rsubtype eth -m <man.sys.> -o s -p <LPAR> -s <adapter id> -a “addl_vlan_ids-=<VLAN TAG>”

————————————

 

One Reply to “HMC Comand Line Basics”

Comments are closed.