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

echo Server Name,Oslevel,Fileset,Date,Time

for os_install_date_list in `cat server`
do
lev=`ssh $os_install_date_list oslevel -s`
ver=`ssh $os_install_date_list lslpp -h bos.rte |tail -1 |awk '{print $1}'`
dat=`ssh $os_install_date_list lslpp -h bos.rte |tail -1 |awk '{print $4}'`
tim=`ssh $os_install_date_list lslpp -h bos.rte |tail -1 |awk '{print $5}'`
echo $os_install_date_list,$lev,$ver,$dat,$tim
done
Advertisements