AIX

AIX

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


#Power
 View Only
Expand all | Collapse all

CPU Consumption per Process

  • 1.  CPU Consumption per Process

    Posted Thu October 17, 2013 10:00 AM

    Originally posted by: er!k


    Hi Guys,

    we are running a rather large AIX/Power environment and recently our customers want to know a little more about the utilization of the systems. The idea is to sum up all the cpu-cycles of all processes for a given pid for lets say every 30sec to display them in ganglia.

    So in linux I would basically do the following:

    • get the cpu time for this pid from /proc/<pid>/stat
    • wait 30 sec
    • get the cpu time for this pid from /proc/<pid>/stat again
    • difference between the two cpu-time values divided by 30 sec multiplied with the factor (sec/jiffy)

    This should give me something similar to what "top" or "topas" is reporting in %CPU

    I know this is still not the whole truth due to SMT and CPU pooling and things. But how to get the %CPU in AIX in the first place?

    Or is there any better way to figure out how many CPU ticks a certain process used in a given time?

     

    Best,

    Erik.

     


    #AIX-Forum


  • 2.  Re: CPU Consumption per Process

    Posted Mon October 21, 2013 03:42 PM

    Originally posted by: GarlandJoseph


    Please explain "display them in ganglia".  Do you have a sample of the output?  Why not produce nmon or other rolled up reports?   Nmon does a fine job of aggreate system utilization.  In addition there are a number of other tools like tprof.  I suggest posting a sample of the output you're trying to achieve.


    #AIX-Forum