DX Application Performance Management

Expand all | Collapse all

Platform Monitor - how does it work ?

  • 1.  Platform Monitor - how does it work ?

    Posted 04-12-2016 06:02 AM

    Hi - I have been asked by an application team how the Wily agent calculates the CPU Utilisation % (process) metric.

     

    Is there any lower level detail available about how this component works, for LINUX OS in particular ?



  • 2.  Re: Platform Monitor - how does it work ?

    Posted 04-12-2016 06:13 AM

    Hello Dave,

    I found the below old wily kb:

     

    Question: How does Linux Platform Monitor calculate the CPU utilization?   

    Answer: Linux Platform Monitor calculates the CPU usage by the following approach.

     

        Utilization %(Process)

        It uses getrusage() to get usr and sys CPU time in milliseconds within 1 sec. Then it calculates (usr + sys) / 1000 for the process CPU utilization.

     

        Utilization % (aggregate)

        It reads the CPU time for usr, sys, wait, and idle from /proc/stat. Then it calculates (usr + sys) / (usr + sys + wait + idle) for the aggregate CPU utilization.

     

    I hope this helps,

    Regars

    Sergio



  • 3.  Re: Platform Monitor - how does it work ?

    Posted 04-12-2016 06:28 AM

    Thanks Sergio, I will pass it on. Cheers



  • 4.  Re: Platform Monitor - how does it work ?

    Posted 04-12-2016 07:26 AM

    This is the follow up question to CA.

     

     

    Interesting. So if getrusage() returned 1000ms, Wily would call that 100%. As we can see JVMs exceeding 200% in top, does getrusage () return 2000+ms and Wily truncates this to 100%? It would be good if someone from Wily could confirm this.