pcp
[Top] [All Lists]

Re: per cpu utilisation from archive - pmval

To: Allan McAleavy <allan.mcaleavy@xxxxxxxxx>
Subject: Re: per cpu utilisation from archive - pmval
From: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Date: Tue, 17 May 2016 10:56:09 -0400
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CAF6XsOdDyKm_9MzfFt+GFLkvUFg4VQ2-kcjhtwQywQcM0Z09fQ@xxxxxxxxxxxxxx>
References: <CAF6XsOcfikRQ-EJ9cM+iuHhpHEinvKaKDWm3oB27gMPwF2vcOw@xxxxxxxxxxxxxx> <y0moa84refi.fsf@xxxxxxxx> <CAF6XsOdDyKm_9MzfFt+GFLkvUFg4VQ2-kcjhtwQywQcM0Z09fQ@xxxxxxxxxxxxxx>
User-agent: Mutt/1.4.2.2i
Hi -

On Tue, May 17, 2016 at 03:35:43PM +0100, Allan McAleavy wrote:
> [...]
> Looking at the archive the data is available. I am looking to gather per
> CPU utilisation from the archive.
> 
> pminfo -fa 20160517.12.00.0 |grep kernel.percpu.
> [...]
> kernel.percpu.cpu.user
> [...]

OK.

> I can run a test using stress, below shows the mpstat data
> [...]
> 15:16:27      15    0.99    0.00    0.00    0.00    0.00    0.00    0.00
>  0.00   99.01
> [...]

OK.

> And the pmval data
> interval:  1.00 sec
> 
>     cpu0     cpu1     cpu2     cpu3     cpu4     cpu5     cpu6     cpu7
> cpu8     cpu9    cpu10    cpu11    cpu12    cpu13    cpu14    cpu15
> [...]
>   98.845   98.845    0.000   98.845   98.845    0.000   98.845    0.000
> 98.845    0.000   98.845   97.847   98.845   98.845   98.845   98.845

But how exactly was pmval invoked for that output?


> pmval -f 3 -a 20160517.12.00.0 -S@15:16:21 -T@15:16:27
> kernel.percpu.cpu.user[cpu15]
> units:     millisec (converting to time utilization)
> [...]
>                             cpu15
> [...]
> 15:16:27.000                0.075

OK, that matches what I see here.

But AFAIK, pmval doesn't behave differently based on whether its input
data source is an archive vs. live, in terms of metric value scaling
or computation.


> I had thought that it would be similar to mpstat where we take the say
> cpu.user(cur) - cpu.user(pre) / (sum of all cpu cur) - (sum of all cpu
> prev) * 100.

(No.  Such rescaling would be done by another layer of code, perhaps
derived-metrics in libpcp, or a specialized tool such as pmcollectl.)


- FChE

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