Step 1: Choose a server where you can access all your LPAR’s
Step 2: Generate a key from the chosen server and then scp same key to LPAR under /root
Step 3: Now, You can execute the below script from chosen server

Note:- In our case, We have chosen NIM server as our source server where the script to be executed
server – Should contain LPAR or server name
Name of the script: vgstale.sh

echo Server Name,VGname,Stale PVs,Stale PPs

for vgstale_list in `cat server`
do
ssh $vgstale_list lsvg -o |while read vg; do ssh -n $vgstale_list lsvg $vg |grep STALE |while read sta; do echo $vgstale_list,$vg,$sta; done; done
done
Advertisements