AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  C API for prtconf ?

    Posted Fri January 27, 2012 02:41 PM

    Originally posted by: laurents


    Hi,

    I was wondering if there is a C API for the command prtconf, more specifically for "prtconf -L", so I wouldn't need to use "popen" to get the output I need.

    Thanks,

    Laurent


  • 2.  Re: C API for prtconf ?

    Posted Sat January 28, 2012 12:42 PM

    Originally posted by: tony.evans


    prtconf is a shell script. It just runs a load of other command line tools and formats the output.


  • 3.  Re: C API for prtconf ?

    Posted Sat January 28, 2012 12:43 PM

    Originally posted by: tony.evans


    uname -L is the command it uses to get the LPAR info


  • 4.  Re: C API for prtconf ?

    Posted Mon January 30, 2012 06:30 PM

    Originally posted by: laurents


    The reason I am using "prtconf -L" is to find out if the AIX machine is a lpar or not as I haven't found any C API for that. With "prtconf -L", I can just check if the ouptut has "LPAR" in it.


  • 5.  Re: C API for prtconf ?

    Posted Tue January 31, 2012 06:13 AM

    Originally posted by: MarkTaylor


    How about lpar_get_info Subroutine ?

    http://publib.boulder.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.basetechref%2Fdoc%2Fbasetrf1%2Flpar_get_info.htm

    Good example here .. scroll down to lpar.c

    http://www.ibm.com/developerworks/wikis/display/WikiPtype/ryo

    HTH
    Mark Taylor


  • 6.  Re: C API for prtconf ?

    Posted Tue January 31, 2012 12:18 PM

    Originally posted by: laurents


    Thanks for the info, I'll try that.