pcp
[Top] [All Lists]

RE: [pcp] Floating point problem

To: "'Martin Spier'" <mspier@xxxxxxxxxxx>, <pcp@xxxxxxxxxxx>
Subject: RE: [pcp] Floating point problem
From: "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 26 Jul 2014 17:40:59 +1000
Cc: "'Amer Ather'" <aather@xxxxxxxxxxx>, "'Coburn Watson'" <cwatson@xxxxxxxxxxx>, "'Brendan Gregg'" <bgregg@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CAEp4+dU2kE9JJztBPc=N5oSyoEyBvN5Of19rohC3DxXGeomuRw@xxxxxxxxxxxxxx>
References: <CAEp4+dU2kE9JJztBPc=N5oSyoEyBvN5Of19rohC3DxXGeomuRw@xxxxxxxxxxxxxx>
Thread-index: AQIxaOIXy2571QFdLkYNO/7w2Cm2Rprud8QQ

I think there is a problem with the derived metric definition â looks like the number is a counter, which probably is not correct.

 

Can you send me the derived metric definition please?

 

From: pcp-bounces@xxxxxxxxxxx [mailto:pcp-bounces@xxxxxxxxxxx] On Behalf Of Martin Spier
Sent: Saturday, 26 July 2014 10:59 AM
To: pcp@xxxxxxxxxxx
Cc: Amer Ather; Coburn Watson; Brendan Gregg
Subject: [pcp] Floating point problem

 

Ran into a small problem with "value" floating point precision on pmwebd json responses.

 

Cumulative values get too big and I start having problems like this:

 

{

  "timestamp": {

    "s": 1406323733,

    "us": 288692

  },

  "values": [

    {

      "pmid": 2143289348,

      "name": "kernel.pct.cpu.user",

      "instances": [

        {

          "value": 7.94874E+10

        }

      ]

    }

  ]

}

 

Since I'm trying to calculate % usage in this case, subtracting previous value from current and normalizing by delta in time, at this point I can't get any useful information to plot due to the low precision.

 

Any suggestions?

 

-Martin

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