Hi everyone,
I found the solution
(@ogniemi: Maybe this is of interest to you too ...)
The key was indeed using the HMC via ssh.
So I tried the following and it worked perfectly:
1) Getting a list of all managed systems known to the HMC
ssh HMC -l hscroot 'lssyscfg -r sys' | awk '{ print $0 }' RS=, | grep name | grep -v service |cut -c6- > /tmp/mansys.lst
2) Finding out what managed system a certain lpar belongs to
for items in `cat /tmp/mansys.lst`
do
ssh HMC -l hscroot "lssyscfg -m $items -r lpar" | awk '{ print $0 }' RS=, | grep name | cut -c6- | grep -w rzvio1 > /dev/null
if [ $? = 0 ];
then
mansys=$items
echo "For rzvio1 the Managed System is $mansys"
fi
done
(Note: rzvio1 is the VIO Server for which I wanted to know the managed system. This also works perfectly if I use an array ( like ${VIO[$j]} ) containing all our VIO servers so it gives me a nice list of which VIO server belongs to to which managed system.)
Thanks for all your input !
Regards
Thomas