Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading name of managed system from LPAR

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi everyone,

if I logon to an lpar is there any way to determine the name of the managed system the lpar belongs to as it appears under the HMC ?

Regards
Thomas
 
probably not.

I had already asked about it in thread52-1325964 but without results.
 
Its a little hit and miss depending on AIX versions but you can use

lsrsrc IBM.ManagementServer

then nslookup on the IP

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
mrn,

the "lsrsrc IBM.ManagementServer" shows only HMC's IP as far as I know.

I don't think you can find there managed system name (name you called box(managed system) in HMC)

 
From the HMC, there's a way to get all the info, using the HMC CLI (and some nifty grep and awk stuff I assume) if you have set up ssh from your LPARs to the HMC.

But try this:

[tt]uname -L[/tt]

...depending on how you named your lpars this may be sufficient to identify on which server any LPAR is running.


HTH,

p5wizard
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top