Wednesday, 22 June 2016

HMC Administrative Commands

1>Find the managed system to an LPAR with a query

hscroot@hmc> for m in $(lssyscfg -r sys -F name)
do echo $m
lssyscfg -r lpar -m $m -F name:state
done

2>To check OS versions all lpars from HMC

hscroot@hmc> for m in $(lssyscfg -r sys -F name);
do echo $m
lssyscfg -r lpar -m $m -F lpar_id:name:os_version | sort -n
echo "#############################################################################"
done


3>LPAR profile creation

hscroot@hmc> mksyscfg -r lpar -m psystem -i

"name=aixserver01,profile_name=default,lpar_env=aixlinux,min_mem=256,desired_mem=512,max_mem=1024,proc_mode=shared,min_procs=1,desired

_procs=1,max_procs=1,min_proc_units=0.1,desired_proc_units=0.2,max_proc_units=0.5,sharing_mode=uncap,uncap_weight=128,boot_mode=norm,m

ax_virtual_slots=10,virtual_eth_adapters=3/1/1///1,virtual_scsi_adapters=4/client/1/aixservervio1/20/1,resource_config=1"


4>To check virtual SCSI adapter mapping to client from HMC

hscroot@hmc> lshwres -m <pserver> -r virtualio --rsubtype scsi



5>To check virtual switch of VIO(managed server )from HMC

hscroot@hmc> lshwres -m <pframe> -r virtualio --rsubtype vswitch
vswitch=ETHERNET0(Default),vlan_ids=1

6>To check Shared processor pools

hscroot@hmc> lshwres -m <pframe> -r procpool


7>To display lpar profiles properties of a lpar from managed server

hscroot@hmc> lshwres -r proc -m <pframe> --level lpar --filter lpar_names=lparname
lpar_name=lparname,lpar_id=12,curr_shared_proc_pool_id=0,curr_proc_mode=shared,curr_min_proc_units=0.2,curr_proc_units=3.0,curr_max_pr

oc_units=16.0,
curr_min_procs=2,curr_procs=6,curr_max_procs=32,curr_sharing_mode=uncap,curr_uncap_weight=128,pend_shared_proc_pool_id=0,pend_proc_mod

e=shared,
pend_min_proc_units=0.2,pend_proc_units=3.0,pend_max_proc_units=16.0,pend_min_procs=2,pend_procs=6,pend_max_procs=32,pend_sharing_mode

=uncap,
pend_uncap_weight=128,run_proc_units=3.0,run_procs=6,run_uncap_weight=128


8>Display all slots configuration from hmc – identifies the type of adapter in each slot

hscroot@hmc> lssyscfg -r sys -F name | while read mngsys
do
lshwres -r io --rsubtype slot -F unit_phys_loc:phys_loc:lpar_name:description --header -m $mngsys | sed "s/^/$mngsys:/"
done
FRAMENAME:unit_phys_loc:phys_loc:lpar_name:description


9>CPU assignment by LPAR’s within HMC

hscroot@hmc> lssyscfg -r sys -F name | while read mngsys; do lshwres -r proc --level lpar -F

lpar_name:curr_min_procs:curr_procs:curr_max_procs:pend_min_procs:pend_procs:pend_max_procs:run_procs --header -m $mngsys | sed "s/^/

$mngsys:/"; done
FRAMENAME:lpar_name:curr_min_procs:curr_procs:curr_max_procs:pend_min_procs:pend_procs:pend_max_procs:run_procs
FRAMENAME:LPAR:1:2:4:1:2:4:2


10>Memory assignment by LPARs within HMC

hscroot@hmc> lssyscfg -r sys -F name | while read mngsys; do lshwres -r mem --level lpar -F

lpar_name:curr_min_mem:curr_mem:curr_max_mem:pend_min_mem:pend_mem:pend_max_mem:run_min_mem:run_mem --header -m $mngsys | sed "s/^/

$mngsys:/"; done
FRAMENAME:lpar_name:curr_min_mem:curr_mem:curr_max_mem:pend_min_mem:pend_mem:pend_max_mem:run_min_mem:run_mem
FRAMENAME:LPAR:10240:15616:36864:10240:15616:36864:10240:15616

11>Total CPU configuration on managed P5 systems

hscroot@hmc> lssyscfg -r sys -F name | while read mngsys; do lshwres -r proc --level sys -F

configurable_sys_proc_units:curr_avail_sys_proc_units:pend_avail_sys_proc_units:installed_sys_proc_units:deconfig_sys_proc_units:min_p

roc_units_per_virtual_proc:max_virtual_procs_per_lpar --header -m $mngsys | sed "s/^/$mngsys:/"; done
FRAMENAME:configurable_sys_proc_units:curr_avail_sys_proc_units:pend_avail_sys_proc_units:installed_sys_proc_units:deconfig_sys_proc_u

nits:min_proc_units_per_virtual_proc:max_virtual_procs_per_lpar
FRAMENAME:3.0:0.0:0.0:4.0:0:0.1:256

12>Total memory configuration on managed P5 systems

hscroot@hmc> lssyscfg -r sys -F name | while read mngsys; do lshwres -r mem --level sys -F

configurable_sys_mem:curr_avail_sys_mem:pend_avail_sys_mem:installed_sys_mem:deconfig_sys_mem:sys_firmware_mem:mem_region_size --

header -m $mngsys | sed "s/^/$mngsys:/"; done
FRAMENAME:configurable_sys_mem:curr_avail_sys_mem:pend_avail_sys_mem:installed_sys_mem:deconfig_sys_mem:sys_firmware_mem:mem_region_si

ze
FRAMENAME:36864:0:0:40960:0:2048:256

13>Display a managed systems firmware level from hmc

hscroot@hmc> lslic -m <pframe>
lic_type=Managed System,management_status=Enabled,disabled_reason=,activated_level=63,installed_level=63,accepted_level=63,
ecnumber=01EL350,mtms=8204-E8A*SERIALNO,deferred_level=None,platform_ipl_level=63,curr_level_primary=63,curr_ecnumber_primary=01EL350,
curr_power_on_side_primary=temp,pend_power_on_side_primary=temp,temp_level_primary=63,temp_ecnumber_primary=01EL350,perm_level_primary

=63,
perm_ecnumber_primary=01EL350,update_control_primary=HMC


14>List partition migration information for all partitions(lpars) in the managed system

hscroot@hmc> lslparmigr -r lpar -m <pframe>
name=LPAR1,lpar_id=1,migration_state=Not Migrating
name=LPAR2,lpar_id=2,migration_state=Not Migrating

15>List all of the storage media devices that are available for use on the HMC

hscroot@hmc> lsmediadev
device=/dev/cdrom,mount_point=/media/cdrom,type=1,description=CD/DVD
device=/dev/sda,type=6,description=internal hard disk drive

13>List service processor of managed system
hscroot@hmc> lsfru -t sp -m <pframe>
loc_code=U789D.001.XXXXXXX-P1-C11,sp=primary,state=Operational

14>Display which HMC owns the lock on the managed frame myFrame
hscroot@hmc> lslock -e <pframe>

15>List all of the tasks that users logged onto the HMC Web user interface are running:
hscroot@hmc> lslogon -r webui -t

16>List all of the users remotely logged onto the HMC via SSH
hscroot@hmc> lslogon -r ssh –u

17>Terminate all of the HMC Web user interface tasks that the user associated with session 4 is running, and log off the user
hscroot@hmc> termtask -r webui -s 4 -t all

18>Terminate the task with process ID 11644 that the user remotely logged into the HMC via the SSH session pts/5 is running:
hscroot@hmc> termtask -r ssh -s pts/5 -t 11644

19>list HMC file system information
hscroot@hmc> lshmcfs
filesystem=/var,filesystem_size=5898,filesystem_avail=2825,temp_files_start_time=03/15/2010 02:26:00,temp_files_size=2008
filesystem=/dump,filesystem_size=7867,filesystem_avail=7299,temp_files_start_time=09/04/2010 17:30:00,temp_files_size=16
filesystem=/,filesystem_size=15743,filesystem_avail=7917,temp_files_start_time=none,temp_files_size=0

The temporary files in the /var file system include HMC  trace and  log  files.  
The temporary files in the /dump file system include managed system dumps and debug data collected using the HMC pedbg command.
The temporary files in the / file system include HMC Java core dump and heap dump files.

20>List system plans of managed systems
hscroot@hmc> lssysplan
name=VIO1.sysplan,description=System plan created from FRAMENAME,source=HMC V7R3.3.0.0,version=HMC 1.4,date=06/11/2008 21:34:27

21>CPU addition to lpar by DPLAR

chhwres -r proc -m <pframe> -p lpar01 -o a --procunits 2.0   ->to add +2 entitled capacity
chhwres -r proc -m <pframe>  -p lpar01 -o a --procs 2         ->to add +2 virtual CPU's

22>Display CPU of lpar from hmc

lshwres -r proc -m <pframe> --level lpar --filter lpar_names=lpar01 -F run_procs --header       --> To display VCPU
lshwres -r proc -m <pframe> --level lpar --filter lpar_names=lpar01 -F run_proc_units --header  --> to display EC

23>viosvrcmd - Issue virtual I/O server command from HMC
hscroot@hmc> viosvrcmd -m <pframe>  -p "VIO Server" -c "ioslevel"
1.5.2.1-FP-11.1


========================================================

No comments:

Post a Comment