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: system_information.sh

echo Server Name,Serial No,Model,Type,Processor Type,Firmware,OS Version,OSlevel,Entitled Capacity,Minimum Capacity,Maximum Capacity,CPU Mode,Online Memory,Minimum Memory,Maximum Memory,Memory Mode

for system_information_list in `cat server`
do
ssh $system_information_list prtconf >conf
ssh $system_information_list lparstat -i >lpar
pipe=`echo "|"`
serial=`cat conf |grep "Serial Number" |awk '{print $4}'`
model=`cat conf |grep "System Model" |awk '{print $3}'`
firmware=`cat conf |grep "Firmware level" |awk '{print $4}'`
osver=`ssh $system_information_list oslevel`
oslev=`ssh $system_information_list oslevel -s`
proctyp=`cat conf |grep "Processor Type" |awk -F":" '{ print $2}'`
currcpu=`cat lpar |grep "Entitled Capacity                          :" |awk -F":" '{ print $2}'`
minccpu=`cat lpar |grep "Minimum Capacity                           :" |awk -F":" '{ print $2}'`
maxcpu=`cat lpar |grep "Maximum Capacity                           :" |awk -F":" '{ print $2}'`
mod=`cat lpar |grep "Mode                                       :" |awk -F":" '{ print $2}'`
currmem=`cat lpar |grep "Online Memory                              :" |awk -F":" '{ print $2}'`
minmem=`cat lpar |grep "Minimum Memory                             :" |awk -F":" '{ print $2}'`
maxmem=`cat lpar |grep "Maximum Memory                             :" |awk -F":" '{ print $2}'`
modmem=`cat lpar |grep "Memory Mode                                :" |awk -F":" '{ print $2}'`
echo $system_information_list,$serial,$model,$proctyp,$firmware,$osver,$oslev,$currcpu,$minccpu,$maxcpu,$mod,$currmem,$minmem,$maxmem,$modmem
done
Advertisements