AIX

AIX

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


#Power
 View Only
  • 1.  CPU Utilization calculation

    Posted Tue February 10, 2009 04:46 AM

    Originally posted by: SystemAdmin


    Which is the correct way to calculate CPU Utilization by a 'C' program, without using any utilities like 'vmstat', 'lparstat'... for AIX 5.3 machines with LPAR ?

    Is there any significant difference in the way of calculating cpu utilization in LPAR and non-LPAR machines ?
    #AIX-Forum


  • 2.  Re: CPU Utilization calculation

    Posted Wed February 11, 2009 02:18 PM

    Originally posted by: adejoux


    The cpu utilization is calculated differently based on the cpu mode (dedicated, shared, dedicated donating) .
    The best example is /usr/samples/libperfstat/sample/lparstat.c. It is a rewrite of lparstat command with libperfstat api.

    You could too check the source code donate.c on this site (among other source code examples on performance metrics) :
    http://www.ibm.com/developerworks/wikis/display/WikiPtype/ryo
    #AIX-Forum