AIX

 View Only
Expand all | Collapse all

How to find the Managed System/Frame name from LPAR?

  • 1.  How to find the Managed System/Frame name from LPAR?

    Posted Thu June 13, 2013 01:10 AM

    Originally posted by: prashanna


    Hi

    I would like to find-out the Managed system name from an LPAR level - but not from HMC or NIM or CSM server.

    Is there any AIX command to find the "Managed System or Frame Name" from LPAR?

    I tried the command - lsrsrc IBM.ManagedNode, It gives the HMC name but not the Managed System or Frame name..

    Thanks.



  • 2.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Thu June 20, 2013 01:28 PM

    Originally posted by: GarlandJoseph


    Take a look at the output from lscfg -vp.  The "real" name for an lpar, in my opinion, is what PHYP says it is.  In other words, if you log on to your HMC and run the lspartition -dlpar command...that's the PHYP name for the partition.

    lscfg -vp (run from an LPAR) information can help you identify the frame, it includes machine type, modely, cabinet serial numbers, etc.

    also try prtconf



  • 3.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Mon June 24, 2013 08:43 AM

    Originally posted by: prashanna


    @ GarlandJoseph

    "prtconf" & "lscfg -vp" o/p provided the Machine Type - Model & Sl.No, however it doesn't provide the Managed System Name (Frame Name) like what we see from the HMC (vtmenu or lssyscfg o/p)



  • 4.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri June 21, 2013 03:56 PM

    Originally posted by: sajjadhashimi


    Good Question -- Let me know if you find out such command. In the meantime, try uname (w/-m M a etc etc), thats what I use to determine where lpar is at.

    I don't see an option in uname that could provide "exact" frame/managed system name but above flags do the job for me.

     

    HTH.



  • 5.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Mon June 24, 2013 08:45 AM

    Originally posted by: prashanna


    Thanks Sajjad - could you please elloborate how did you determine where LPAR is ?



  • 6.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Wed June 26, 2013 01:41 PM

    Originally posted by: GarlandJoseph


    What's in a Name?

    The managed system name, with respect to the HMC can be changed or at least what shows up in the GUI as in the name field of
    HMC->System_Management->Servers .

    The name that shows up in vtmenu, from my experience, usually agrees with the above name. I am not sure if this differs across HMC versions.

    If you run the command lspartition -dlpar from the hmc, the frame names there are different and relect what I would consider the true frame names.    This output shows lpar information queried from PHYP of every managed frame.

    The frame names are usually in the form of a partition number, machine type, model, and serial number. Other information is included in the display like operating system and capacity values.

    You see an entry for every lpar per partition and it's easy to derive the unique frame names from this command.

    This same information, with the exception of the partition number with respect to phyp (Hypervisor), is revealed by information like lscfg, prtconf, and uname.

    So from the perspective of the lpar... "inside trying to look out and determine aspects of your environment", commands like lscfg, prtconf, and uname  should be sufficient, since the combination of all this information from all the LPARS will tell you what LPARS are on the same physical frame/resources.

    ~                                                            



  • 7.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri June 28, 2013 08:12 AM

    Originally posted by: prashanna


    well, let me clarify this.

    For Inventory purpose and capacity management purpose we would like to execute a script/agent on each and every LPAR in our DC and the o/p will be sent to a DB server and the data will be published to a portal.

    we manage to collect every info from LPAR but not the Managed syatem name to which it belongs to.

    The option we have now is by corelating the "uname -a" / system serial No as it'll be unique for all LPARs which is part of a managed system.

    But we find it difficult to co-relate the name & serial no and it's difficult to educate the non technical staff.

    hence I posted the query to see any direct command which'll provide the frame name configured on the HMC level.



  • 8.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Mon July 08, 2013 08:31 AM

    Originally posted by: JLGuyot


    AFAIK only the serial is available on the LPAR.

    The name of the frame is a logical name only available in the FSP (ASMI) and gathered by the HMC and RMC doesn't deliver this information.

    You can ask IBM for this feature (I did ;) for a future release.



  • 9.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Tue July 09, 2013 07:04 AM

    Originally posted by: LaurentOliva


    why don't you collect info from HMC / IVM then correlate them with LPARs by using the serial number of the managed system ?

    We do that for our inventory (CMDB..)

     

    Keep in mind that the Managed System name only exist in the HMC "area" name space.

    The managed system name is the hostname that exist from the service processor point of view ; which is a private between the HMC and the Service processor

    It does not exist from the LPAR point of view.

     

    The managed system name is not part of VPD !

     



  • 10.  Re: How to find the Managed System/Frame name from LPAR?

    Posted Mon December 30, 2013 10:08 AM

    Originally posted by: JamieADennis


    If you are looking for the name (or IP address) of the HMC which the LPAR is managed by, use lsrsrc IBM.ManagementServer. 

     

    lsrsrc IBM.ManagementServer
    Resource Persistent Attributes for IBM.ManagementServer
    resource 1:
            Name             = "{HMC-Name}"
            Hostname         = "{HMC IP}"
            ManagerType      = "HMC"
            LocalHostname    = "{Current Host IP}"
            ClusterTM        = "9078-160"
            ClusterSNum      = ""
            ActivePeerDomain = ""
            NodeNameList     = {"current-host"}
     



  • 11.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Thu December 14, 2023 05:48 AM
    Edited by Sylvain Thu December 14, 2023 05:48 AM

    This question has never been answered. Any idea ?



  • 12.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri December 15, 2023 04:17 AM

    Hi,

    Let me spell it out - if that was easy, it would have been in the above comments.

    The answer is you can't do that.

    The problem is the LPAR does not care what name is used on the HMC for this server.

    The Server name can only be used by HMC command and seen on the HMC GUI.

    The best answer on AIX

    1. Find out the serial number of the server. 
    2. lsconf is a quick way of doing that and whole lot more useful information.
    3. Then go to the HMC, list the systems and find the "Serial number" and matching "System name",

    Good luck.



    ------------------------------
    Nigel Griffiths
    ------------------------------



  • 13.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri December 15, 2023 05:40 AM
    uname -L

    On Fri, Dec 15, 2023 at 09:17:30AM +0000, Nigel Griffiths via IBM TechXchange Community wrote:
    > Hi,
    >
    >
    > Let me spell it out - if that was easy, it would have been in the above comments.
    >
    >
    > The answer is you can't do that.
    >
    >
    > The problem is the LPAR does not care what name is used on the HMC for this server.
    >
    >
    > The Server name can only be used by HMC command and seen on the HMC GUI.
    >
    >
    >
    >
    >
    > The best answer on AIX
    >
    >
    >
    > Find out the serial number of the server.
    >
    > lsconf is a quick way of doing that and whole lot more useful information.
    >
    > Then go to the HMC, list the systems and find the "Serial number" and matching "System name",
    >
    >
    > Good luck.
    >
    >
    > ------------------------------
    > Nigel Griffiths
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Thu December 14, 2023 05:47 AM
    > From: Sylvain
    > Subject: Re: How to find the Managed System/Frame name from LPAR?
    >
    >
    > This question has never been answered. Any idea ?
    >
    >
    > Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391588&SenderKey=b014f428-1de5-445c-a142-45bf8e9409ea
    >
    > Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391588
    >
    >
    >
    > You are subscribed to "AIX" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.


    ------------------------------------------------------------------
    Russell Adams Russell.Adams@AdamsSystems.nl
    Principal Consultant Adams Systems Consultancy
    https://adamssystems.nl/




  • 14.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri December 15, 2023 05:56 AM
    That's what I get for replying before coffee!

    uname -L prints the LPAR number and the LPAR name as visible on the
    HMC.

    You can use lsconf or 'lsattr -El sys0' to get the serial number, but
    Nigel is right, I've never found a way to show the name of the
    physical system from the AIX LPAR.

    I thought that was just a comment field on the HMC. Everything uses
    serial numbers...

    On Fri, Dec 15, 2023 at 10:40:10AM +0000, Russell Adams via IBM TechXchange Community wrote:
    > uname -L
    >
    > On Fri, Dec 15, 2023 at 09:17:30AM +0000, Nigel Griffiths via IBM TechXchange Community wrote:
    > > Hi,
    > >
    > >
    > > Let me spell it out - if that was easy, it would have been in the above comments.
    > >
    > >
    > > The answer is you can't do that.
    > >
    > >
    > > The problem is the LPAR does not care what name is used on the HMC for this server.
    > >
    > >
    > > The Server name can only be used by HMC command and seen on the HMC GUI.
    > >
    > >
    > >
    > >
    > >
    > > The best answer on AIX
    > >
    > >
    > >
    > > Find out the serial number of the server.
    > >
    > > lsconf is a quick way of doing that and whole lot more useful information.
    > >
    > > Then go to the HMC, list the systems and find the "Serial number" and matching "System name",
    > >
    > >
    > > Good luck.
    > >
    > >
    > > ------------------------------
    > > Nigel Griffiths
    > > ------------------------------
    > > -------------------------------------------
    > > Original Message:
    > > Sent: Thu December 14, 2023 05:47 AM
    > > From: Sylvain
    > > Subject: Re: How to find the Managed System/Frame name from LPAR?
    > >
    > >
    > > This question has never been answered. Any idea ?
    > >
    > >
    > > Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391588&SenderKey=b014f428-1de5-445c-a142-45bf8e9409ea
    > >
    > > Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391588
    > >
    > >
    > >
    > > You are subscribed to "AIX" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.
    >
    >
    > ------------------------------------------------------------------
    > Russell Adams Russell.Adams@AdamsSystems.nl
    > Principal Consultant Adams Systems Consultancy
    > https://adamssystems.nl/
    >
    > -------------------------------------------
    > Original Message:
    > Sent: 12/15/2023 4:17:00 AM
    > From: Nigel Griffiths
    > Subject: RE: Re: How to find the Managed System/Frame name from LPAR?
    >
    >
    > Hi,
    >
    >
    > Let me spell it out - if that was easy, it would have been in the above comments.
    >
    >
    > The answer is you can't do that.
    >
    >
    > The problem is the LPAR does not care what name is used on the HMC for this server.
    >
    >
    > The Server name can only be used by HMC command and seen on the HMC GUI.
    >
    >
    >
    >
    >
    > The best answer on AIX
    >
    >
    >
    > Find out the serial number of the server.
    >
    > lsconf is a quick way of doing that and whole lot more useful information.
    >
    > Then go to the HMC, list the systems and find the "Serial number" and matching "System name",
    >
    >
    > Good luck.
    >
    >
    > ------------------------------
    > Nigel Griffiths
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Thu December 14, 2023 05:47 AM
    > From: Sylvain
    > Subject: Re: How to find the Managed System/Frame name from LPAR?
    >
    >
    > This question has never been answered. Any idea ?
    >
    >
    > Reply to Sender : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391611&SenderKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f
    >
    > Reply to Discussion : https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=391611
    >
    >
    >
    > You are subscribed to "AIX" as Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.


    ------------------------------------------------------------------
    Russell Adams Russell.Adams@AdamsSystems.nl
    Principal Consultant Adams Systems Consultancy
    https://adamssystems.nl/




  • 15.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Fri December 15, 2023 11:53 AM
    if you have ssh access to the hmc command line, you can build a string of commands to get what you want
    But, as others have said, it's really a view from the HCM.... the "frame name" isn't directly visible from the lpar by doing things like talking to the hypervisor.

    so, in this example, if you can reach the hmc to gather a list of frame names supported by the HMC
    (lssyscfg -r sys -F name).   
    and from the lpar, you can grab the serial number from either prtconf, or, as I prefer, lsattr

    scc9500:/home/tcmcgivern1 $ ssh wdc-hmc-1 lssyscfg -r sys -F name

    D08-9040-MR9-SN78F3XXX

    A23-8408-44E-SN78F3XXX

    D6-9080-MHE-SN7812XXX

    A27-9040-MR9-SN78B4XXX

    .

    .

    .


    scc9500:/home/tcmcgivern1 $ lsattr -El sys0 -a systemid

    systemid IBM,027812XXX Hardware system identifier False


    scc9500:/home/tcmcgivern1 $ ssh wdc-hmc-1 lssyscfg -r sys -F name|grep  $(lsattr -El sys0 -a systemid|cut -f2 -d,|cut -c3-9)

    D6-9080-MHE-SN7812XXX

    scc9500:/home/tcmcgivern1 $


    So.. unless you're in a shop with a REALLY dynamic inventory of hardware.. the list of machiens stays pretty static.

    Thus, it can be put in a table. (Or, a here-document as shown below)..

    Then, you don't need to reach out to the HMC every time... just look up your serial number in a table from within a script


    (S/Ns masked so some look like duplicates... but, if this is something useful to you, you can figure out what goes where..)


    This script prints out a "friendly" name that we refer to our APP / DB and Web Frames.. but, it's strictly a human-readable issue.


    #!/usr/bin/ksh

    F=$(lsattr -El sys0 -a systemid|awk '{print $2}'|cut -c7-)

    REC=$(grep $F <<EOF

    A10 10B0XXX

    A11 100EXXX

    A13 1023XXX

    A14 1023XXX

    D6 7812XXX

    U1 100EXXX

    U2 78F3XXX

    W12 78F1XXX

    W13 78F1XXX

    EOF)

    echo $REC|awk '{print $1}'









  • 16.  RE: Re: How to find the Managed System/Frame name from LPAR?

    IBM Champion
    Posted Mon December 18, 2023 05:10 AM

    Thinking loudly.

    Since AIX 6.1 there is a management object in NIM. You can create a connection between NIM and HMC and create management objects for each managed system on the HMC. Then you can assign to each standalone machine object (your AIX object) a management profile attribute which contains information about the HMC and the managed system. If your naming scheme is consistent, you should be able to find the managed system by simply executing nimclient -l $(hostname) on your AIX box.

    More about management objects in NIM - https://www.ibm.com/support/pages/working-nim-management-objects

    But no, I don't do it. I did it once in my life many years ago, but I have no experience what would happen if the LPAR is LPMed or if some configuration data on HMC (like managed system's name) would change.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 17.  RE: Re: How to find the Managed System/Frame name from LPAR?

    Posted Tue December 19, 2023 04:34 AM

    Speaking from experience NIM breaks with LPM as it uses the hostid/serial number of the frame to authenticate and it doesn't automatically update the frame or lparid in the NIM object.  In latter level there is an option to have NIM use SSL certs to authenticate the client and server, but that doesn't sort out the updating of the information.



    ------------------------------
    Phill Rowbottom
    ------------------------------



  • 18.  RE: How to find the Managed System/Frame name from LPAR?

    Posted Tue December 19, 2023 04:37 AM

    A site that I once worked at had a script that had a list of host serial numbers and their names in it.  This was on every LPAR.  We could run that to find the name of the host.

    I don't know of an AIX command that will do it.  lparstat will give you the lparid, but not the name of the host.

    Phill.



    ------------------------------
    Phill Rowbottom
    ------------------------------