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
|