| To: | "Frank Ch. Eigler" <fche@xxxxxxxxxx> |
|---|---|
| Subject: | Re: pcp grafana and graphite - How to convert pcp metric values into percent |
| From: | Amer Ather <aather@xxxxxxxxxxx> |
| Date: | Wed, 2 Jul 2014 10:57:28 -0700 |
| Cc: | pcp@xxxxxxxxxxx, Martin Spier <mspier@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CS2X57KqAFYpFnhY9xjk65NnFLuz6AtEsktb4D5RYmI=; b=Xe5kbj/AKE2OjbPhGRZGYYfKXm/plER0hfrYmBSU48c7sGIg6lsBB3e4yoFTUZ8IcI m17dahwC1JVEHvhTW/5oJkK8w0GRT3KiYs9s4kubOxMVoDjqzK8oGMm47X6T0VGAGz+h uFpaoDRwtSvG+7j8vq+mPYM1A27+GLiaqoY5Q= |
| In-reply-to: | <y0m1tu41lld.fsf@xxxxxxxx> |
| References: | <CAM1aq-HG2oJxCx1EAA0Zr+W7-NsSmVfThb8zG35FOKC4mbbnww@xxxxxxxxxxxxxx> <y0mha353ky5.fsf@xxxxxxxx> <y0m8uoh3kf4.fsf@xxxxxxxx> <002d01cf9284$dc8fe570$95afb050$@internode.on.net> <002f01cf9285$f0c63160$d2529420$@internode.on.net> <CAM1aq-HgP5+Tsq_sCLWH6GrLOn8UXQWaEVkVaC1p=TT_kMn6Tg@xxxxxxxxxxxxxx> <20140629220735.GA13993@xxxxxxxxxx> <CAM1aq-Hr2ss+b82p1EMCRTjK_Vsbnde_tKVv53MQfP25p4e-aw@xxxxxxxxxxxxxx> <y0m1tu41lld.fsf@xxxxxxxx> |
|
Frank and Nathan, So what I understand that rate conversion does not work for PMWEBAPI client but works fine for pmval and pmwebd graphite extension. I tested it and that is exactly what I am seeing. pmval is doing rate conversion, but curl is returning raw values. That means our UI client has to do rate conversion when using PMWEBAPI call.
$cat pctavg kernel.pct.cpu.user = 100 * kernel.all.cpu.user / hinv.ncpu kernel.pct.cpu.sys Â= 100 * kernel.all.cpu.sys / hinv.ncpu kernel.pct.cpu.idle = 100 * kernel.all.cpu.idle / hinv.ncpuÂ
kernel.pct.cpu.nice = 100 * kernel.all.cpu.nice / hinv.ncpu kernel.pct.cpu.intr = 100 * kernel.all.cpu.intr / hinv.ncpu kernel.pct.cpu.wait.total = 100 * kernel.all.cpu.wait.total / hinv.ncpu
PCP_DERIVED_CONFIG=pctavg pmval -f3 -s3 kernel.pct.cpu.user metric: Â Âkernel.pct.cpu.user host: Â Â Âkvick-trustyhvm-i-1e814740 semantics: cumulative counter (converting to rate)
units:   millisec (converting to time utilization) samples:  3 interval: Â1.00 sec        Â40.487        Â42.235 curl.sh: -------- CONTEXT=`curl -s -S "http://ec2-204-236-180-248.us-west-1.compute.amazonaws.com:7002/pmapi/context?local=ANYTHING"|awk '{print $3}'`
echo "New Context received from server: $CONTEXT" # ./curl.sh New Context received from server: 253643307 { "timestamp": { "s":1404323698, "us":955081 }, "values": [
{ "pmid":2143289350, "name":"kernel.pct.cpu.idle","instances": [ {"value":1.92329e+11}] }, { "pmid":2143289349, "name":"kernel.pct.cpu.sys","instances": [
{"value":1.53737e+10}] }, { "pmid":2143289348, "name":"kernel.pct.cpu.user","instances": [ {"value":1.51585e+10}] }] }
Amer. On Tue, Jul 1, 2014 at 8:33 PM, Frank Ch. Eigler <fche@xxxxxxxxxx> wrote: Amer Ather <aather@xxxxxxxxxxx> writes: |
| Previous by Date: | Default Number of Threads for Service Discovery via Active Probing, Dave Brolley |
|---|---|
| Next by Date: | Re: pcp grafana and graphite - How to convert pcp metric values into percent, Frank Ch. Eigler |
| Previous by Thread: | Re: pcp grafana and graphite - How to convert pcp metric values into percent, Frank Ch. Eigler |
| Next by Thread: | Re: pcp grafana and graphite - How to convert pcp metric values into percent, Frank Ch. Eigler |
| Indexes: | [Date] [Thread] [Top] [All Lists] |