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:

echo Server Name,fscsi,fc_err_recov,dyntrk

for fscsi_attribute_list in `cat server`
for fcs in `ssh $fscsi_attribute_list lsdev -C |grep fscsi |grep Available |awk '{print $1}'`
fc_err_recov=`ssh $fscsi_attribute_list lsattr -El $fcs |grep fc_err_recov |awk '{print $2}'`
dyntrk=`ssh $fscsi_attribute_list lsattr -El $fcs |grep dyntrk |awk '{print $2}'`
echo $fscsi_attribute_list,$fcs,$fc_err_recov,$dyntrk