|
From: | Tom Pepper |
Subject: | Re: total cpu process bug? |
Date: | Thu, 5 Jan 2012 08:42:01 -0800 |
Yeah, any process should be calculated in the same way regardless of whether it is single-threaded or multi-threaded: In a fixed timeslice: Total cpu time for process n / Total available cpu time systemwide = % of the cpu time consumed by process n e.g. if a single threaded app in a four core box used one of four cores, that would be perhaps 1.0Ghz used / 4.0Ghz total available = 0.25 = 25% total CPU What monit is currently reporting instead is the # of times the given process could run concurrently in the same amount of CPU, e.g. 4.0Ghz / 1.0 Ghz = 4 = 400% or 4 times total. What isn't obvious to me is why small processes still reflect ~0% total usage, when the numbers should be very high. A process like nginx using very little CPU should with your current math report as 4.0Ghz / 0.020Ghz = 200 = 20,000% Perhaps I'll dig through the source later this week and see what I can uncover. Thanks, -t On Jan 5, 2012, at 8:21 AM, Lawrence, Wayne wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |