|
for system in `lssyscfg -r sys -F "
name,state" | sort | grep " ,Operating" | sed 's/,Operating//'`; do echo $system echo " LPAR CPU VCPU MEM OS" for lpar in `lssyscfg -m $system -r lpar -F " name" | sort`; do defa ult_ prof =`ls sysc fg -r lpar -m $system --filter " lpar_names=$lpar" -F default_profile` procs=`lssyscfg -r prof -m $system --filter " prof ile_ name s=$d efau lt_p rof, lpar _nam es=$ lpar " -F desired_proc_units` vcpu=`lssyscfg -r prof -m $system --filter " prof ile_ name s=$d efau lt_p rof, lpar _nam es=$ lpar " -F desired_procs` mem=`lssyscfg -r prof -m $system --filter " prof ile_ name s=$d efau lt_p rof, lpar _nam es=$ lpar " -F desired_mem` os=`lssyscfg -r lpar -m p520 --filter " lpar_names=$lpar" -F os_version` printf " %-15s %-6s %-6s %-6s %-30s\n" $lpar $procs $vcpu $mem " $os" done done
- hscroot@hmc1:~>
source testscript p520 LPAR CPU VCPU MEM OS aix1 0.2 2 384 AIX 6.1 6100 -07- 05-1 228 aix2 0.2 2 384 AIX 6.1 6100 -07- 05-1 228 aix3 0.2 2 384 Unkn own linux1 0.2 2 384 Unkn own vio1 0.2 2 512 VIOS 2.2. 1.4 vio2 0.2 2 400 Unknown
Compare LPAR running config / profile config
A new version of prdiff is available that now includes support for Virtual Fibre Channel / NPIV and also improved dedicated CPU support. For those of you unfamiliar with prdiff it is a script that compares running LPAR configurations with their profiles and shows differences. This can prevent issues when you are shutting down and rebooting LPAR's. For more info, seeWWPN of virtual fiber card on LPARs
The below command from HMC will list the WWPN of virtual fiber card on LPARs only.
I am interested in finding wwpn of physical HBAs allocated in VIO and physical to virtual hba relation for each LPAR.
lssyscfg -r sys -F name |
while read M; do lshwres -r virtualio --rsubtype fc --level lpar -m $M -F lpar_name,wwpns|
sed 's/^/'$M,'/'
done
WWPN of physical HBA's are not stored on HMC, so you have to log in to VIO server to find these out.
Reset padmin VIO password from the HMC with zero downtime
Step 1
command=`printf " oem_setup_env\ncat /etc /sec urit y/pa sswd " `; viosvrcmd -m p520 -p vio1 -c " $command"
padmin: password = TRl01MDd3QnVw lastupdate = 1352950198
# openssl passwd Password: Verifying - Password: OSdD0E9SQYE.E
command=`printf " oem_setup_env\nperl -pi -e 's/ < OLD_HASH> / < NEW_HASH> /' /etc /sec urit y/pa sswd " `; viosvrcmd -m p520 -p vio1 -c " $command"
command=`printf " oem_setup_env\nperl -pi -e 's/ TRl01MDd3QnVw / OSdD0E9SQYE.E /' /etc /sec urit y/pa sswd " `; viosvrcmd -m p520 -p vio1 -c " $command"
command=`printf " oem_ setu p_en v\nc hsec -f /etc /sec urit y/la stlo g -a unsu cces sful _log in_c ount =0 -s padmin" `; viosvrcmd -m p520 -p vio1 -c " $command"
Thanks..........SAVED lot of time
ReplyDeleteHello, i need your help. I need to reset the padmin password, but this commands doesn't work
ReplyDeleteI have the same problem. I need to recover or reset my padmin password.
Delete