pcp
[Top] [All Lists]

Re: per cpu utilisation from archive - pmval

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: per cpu utilisation from archive - pmval
From: Allan McAleavy <allan.mcaleavy@xxxxxxxxx>
Date: Wed, 18 May 2016 17:19:14 +0100
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CWH8OnrS7ZKjQuNWVk3M93CeEhR5WSZWb2LksBuXf7o=; b=M6GWRdj+LoO6hwPSp6+GJqyCQKugrX1WTjrPkxkXXwP0psubYgl94gCVY2RnTOfPCj /JwgOfVUxl9+h5j/iIEhPscube6mtSJx4f/ne1Ms61lMKnYws8Bpkvw3zpdmt6QJ4t2k YEeNW2sZ1+pJWI9yf+ZH2txT6yLOPHCioYOs85oYTPU3CyJ6luzsp+xa4nJmLH9NbUEx EwJodnQ2+iYiIaG4RwoJc7o/8gBmgRqTwo4BFGrj31ICOawxtBARtzO9ynhmL8RRyZ31 lYI/8VpMw8W9Eo+3TKWn8ierYVG7HjEwkHB9PYC151Hr7nC/xQo0mx7EmR2cTZLVf2iD YU/Q==
In-reply-to: <CAF6XsOdwQZvS7472x0yAC-yQt9ZFT+YOVai7DqLL7SVAArwtGQ@xxxxxxxxxxxxxx>
References: <CAF6XsOcfikRQ-EJ9cM+iuHhpHEinvKaKDWm3oB27gMPwF2vcOw@xxxxxxxxxxxxxx> <y0moa84refi.fsf@xxxxxxxx> <CAF6XsOdDyKm_9MzfFt+GFLkvUFg4VQ2-kcjhtwQywQcM0Z09fQ@xxxxxxxxxxxxxx> <20160517145609.GB28299@xxxxxxxxxx> <CAF6XsOdwQZvS7472x0yAC-yQt9ZFT+YOVai7DqLL7SVAArwtGQ@xxxxxxxxxxxxxx>
HI Frank

Did you have any more thoughts on this?


Thanks
Al

On Tue, May 17, 2016 at 4:21 PM, Allan McAleavy <allan.mcaleavy@xxxxxxxxx> wrote:
Hi Frank

the pmval was launched as follows as was my test.

PCP_DERIVED_CONFIG=/var/tmp/user_pct pmval -f3 kernel.pct.cpu.user -s 30 > /var/tmp/pmval.log & Âmpstat -P ALL 1 30 > /var/tmp/mpstat.log & sleep 5 ; stress -c 12 --timeout 5


Âcat /var/tmp/user_pct
kernel.pct.cpu.user = 100 * kernel.percpu.cpu.user

Thanks
Al

On Tue, May 17, 2016 at 3:56 PM, Frank Ch. Eigler <fche@xxxxxxxxxx> wrote:
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>