pcp
[Top] [All Lists]

[pcp] pmval does not print negative values (#67)

To: performancecopilot/pcp <pcp@xxxxxxxxxxxxxxxxxx>
Subject: [pcp] pmval does not print negative values (#67)
From: Rares Vernica <notifications@xxxxxxxxxx>
Date: Tue, 09 Feb 2016 14:07:25 -0800
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1455055646; bh=WIT8heX9H9NgGQaq4D9QfPRVnCLpCVKB6938C2OZ9b4=; h=From:Reply-To:To:Subject:List-ID:List-Archive:List-Post: List-Unsubscribe:From; b=gSsTP8Xmtxd8SBrLeM1LK4lFtG+YUTx79Zd3icGtxh3bsO4C0Z/vRkWbEgrgCsORm m18O3t8ssF7AfmSQ/QCESQsJ0Ry+pVnIvEudKfAJSIDj7/vHpE3ett97P2WuP21u8l ZlAz26ispXcMM/o+8rDLO5i+MQXU26mejFHCQQxI=
List-archive: https://github.com/performancecopilot/pcp
List-id: performancecopilot/pcp <pcp.performancecopilot.github.com>
List-post: <mailto:reply+00bd08b68aee25df5ab3efe7b614a917a5615e5c653763bc92cf0000000112d2251d92a169ce07e68e66@reply.github.com>
List-unsubscribe: <mailto:unsub+00bd08b68aee25df5ab3efe7b614a917a5615e5c653763bc92cf0000000112d2251d92a169ce07e68e66@reply.github.com>, <https://github.com/notifications/unsubscribe/AL0ItpdoN2vIKxQlFtKy71bY47_lzZ9tks5pilqdgaJpZM4HW0Rc>
Reply-to: performancecopilot/pcp <reply+00bd08b68aee25df5ab3efe7b614a917a5615e5c653763bc92cf0000000112d2251d92a169ce07e68e66@xxxxxxxxxxxxxxxx>

I modified the acme.c example provided in the Programmer's Guide and here do generate negative numbers.

When reading the values produced, pminfo displays the values correctly but pmval prints ! in place of the negative values.

$ pminfo -f mmv.acme.products.count

mmv.acme.products.count
    inst [0 or "Anvils"] value -1849.6024
    inst [1 or "Rockets"] value -3.6371837e+31
    inst [2 or "Giant_Rubber_Bands"] value -6.3034399e+09

$ pmval mmv.acme.products.count

metric:    mmv.acme.products.count
host:      beaglebone-01
semantics: instantaneous value
units:     byte
samples:   all
full label for instance[0]: Anvils
full label for instance[1]: Rockets
full label for instance[2]: Giant_Rubber_Bands

       Anvils       Rockets Giant_Rubber_
            !     1.194E-05     3.127E-35
            !     2.816E-30     1.712E-17
    4.185E-28        0.8811     1.438E-32

This might be the location in pmval where this might need to be fixed pmval.c#L505

You can see here the changes made to acme.c to print negative numbers.


Reply to this email directly or view it on GitHub.

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