pcp
[Top] [All Lists]

Re: [pcp] Question about Linux's kernel.all.cpu.* metrics

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] Question about Linux's kernel.all.cpu.* metrics
From: Martin Hicks <mort@xxxxxxxx>
Date: Thu, 6 Aug 2009 21:09:26 -0400
Cc: Martin Hicks <mort@xxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: <1249594714.5430.7.camel@bozo>
References: <20090806175440.GI27557@xxxxxxxxxxxxxxxxxxxxxxxxx> <1249594714.5430.7.camel@bozo>
User-agent: Mutt/1.5.18 (2008-05-17)
On Fri, Aug 07, 2009 at 07:38:34AM +1000, Ken McDonell wrote:
> 
> So, if you have 2 CPUs and are sampling once per second, expect the
> counter kernel.all.cpu.idle to go up by 2000 per second, so the rate
> converted value is 2000 milliseconds per second which is correct.
> 
> The conversion breaks down as
> 
>       / hz -> seconds
>       * 1000 -> milliseconds
> 
> This is a common misunderstanding ... it should be captured in a FAQ
> somewhere I guess.

Thanks.  Makes perfect sense.

mh

> 
> On Thu, 2009-08-06 at 12:54 -0500, Martin Hicks wrote:
> > I went looking today at these metrics, and I'm a bit confused by the
> > values that are printed out.  For example:
> > 
> >     case 23: /* kernel.all.cpu.idle */
> >         _pm_assign_utype(_pm_idletime_size, atom,
> >                     1000 * (double)proc_stat.idle / proc_stat.hz);
> >         break;
> > 
> > 
> > What's the goal of the multiplication and division by HZ?  This just
> > looks plain wrong to me, but maybe I'm missing something.  Additional
> > support for this is that the idle metric in PCP advances by 10x what it
> > should (200/sec):
> > 
> > mort@laplace:~$ pmdumptext -t 1 kernel.all.cpu.idle
> > Thu Aug  6 13:52:34     ?
> > Thu Aug  6 13:52:35     1989.809
> > Thu Aug  6 13:52:36     2000.010
> > 
> > mort@laplace:~$ pminfo -f kernel.all.hz hinv.ncpu
> > 
> > kernel.all.hz
> >     value 100
> > 
> > hinv.ncpu
> >     value 2
> > 
> > 
> > mh
> > 
> > _______________________________________________
> > pcp mailing list
> > pcp@xxxxxxxxxxx
> > http://oss.sgi.com/mailman/listinfo/pcp
> 
> _______________________________________________
> pcp mailing list
> pcp@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/pcp

<Prev in Thread] Current Thread [Next in Thread>