[collectd] cpu usage

Massimo Canonico mex at di.unipmn.it
Wed Jul 11 13:45:46 CEST 2012


Hi,
On 07/11/2012 01:10 PM, collectd at faxm0dem.org wrote:
> Hi Massimo,
>
> On Tue, Jul 10, 2012 at 10:14:44AM +0200, Massimo Canonico wrote:
>> http://collectd.org/wiki/index.php/Plugin:CPU
>> I should be able to convert the jiffies into %, but I'm not sure how.
> Actually, you are already looking at a percentage. The reason you might
> think the sum is not always 100% is because the color of "Idle" is white.
Since I need to work on data (for example I need to compute even the 
standard deviation, median, etc...) the data on csv file are like this:

epoch,value
1341837459,1252334
1341837469,1253333
1341837479,1254329

I need to convert the 1254329 jiffies into percentage.

How?

Cheers,
  M
>
> In fact, it's not always a percentage, depending on the system architecture,
> but definitely always a multiple thereof. In linux, a "jiffy"¹ often
> corresponds to 1/100th of a second, so you're actually looking at the graph
> measuring the number of 1/100th of seconds passed every second, which is
> obviously always equal to 100 :-)
>
> --
> ¹ Quoting Wikipedia, "a jiffy is the duration of one tick of the system timer
> interrupt".
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd





More information about the collectd mailing list