pcp
[Top] [All Lists]

Re: pmrep: convert to use pmfg

To: Marko Myllynen <myllynen@xxxxxxxxxx>
Subject: Re: pmrep: convert to use pmfg
From: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Date: Fri, 8 Jul 2016 11:24:52 -0400
Cc: Nathan Scott <nathans@xxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <577F8261.5060008@xxxxxxxxxx>
References: <576926AB.7070608@xxxxxxxxxx> <717761407.765523.1466558073136.JavaMail.zimbra@xxxxxxxxxx> <576FDCE3.9010706@xxxxxxxxxx> <y0mshvwjbpl.fsf@xxxxxxxx> <577F8261.5060008@xxxxxxxxxx>
User-agent: Mutt/1.4.2.2i
Hi, Marko -

> [...]
> I think I've sorted out the above but I've got one related question, is
> this still expected based on your explanation above or something else?

Yes, I think it's the same thing.

> $ pmval -s 5 -t 2 -z -U qa/archives/20130706 -i sdb disk.dev.avactive
> Note: timezone set to local timezone of host "billing02" from archive
> 
> metric:    disk.dev.avactive
> [...]
> semantics: cumulative counter (converting to rate)
> units:     millisec (converting to time utilization)
> [...]

By "millisec", it's describing the metric's original pmDesc
scale/units, not the resulting scale of the output.


> [...]
> scale0 = pmfg.extend_item("disk.dev.avactive", mtype=c_api.PM_TYPE_DOUBLE, 
> scale=None, instance="sdb")
> scale1 = pmfg.extend_item("disk.dev.avactive", mtype=c_api.PM_TYPE_DOUBLE, 
> scale="microsec/s", instance="sdb")
> scale2 = pmfg.extend_item("disk.dev.avactive", mtype=c_api.PM_TYPE_DOUBLE, 
> scale="millisec/s", instance="sdb")
> scale3 = pmfg.extend_item("disk.dev.avactive", mtype=c_api.PM_TYPE_DOUBLE, 
> scale="sec/s", instance="sdb")
> [...]
> $ python3 /tmp/testpmfg.py
> Value:        55.901528
> Value:        55901.527975
> Value:        55.901528
> Value:        0.055902
> [...]

Those are all consistent, confirming the earlier explanation.


> So pmval(1) describes units as "millisec (converting to time
> utilization)" [...] Is the only confusion on this end or is pmval(1)
> perhaps a bit misleading here?

The key is that pmval's "time utilization" parenthetical overrides the
previous "milliseconds" scale and replaces it with an implicit
"sec/sec" one.


- FChE

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