[pcp] suitability of PCP for event tracing

Ken McDonell kenj@internode.on.net
Sun Nov 28 19:08:00 GMT 2010


On Sat, 2010-11-27 at 16:28 +1100, Ken McDonell wrote:

> Try this one for size ...
> 
> Add a new sort of "anonymous" PCP metric, such that the PMID is
> hard-coded for a small number of anon metrics as is the pmDesc (I'm
> thinking one per simple data type, semantics discrete, no units, no
> instance domain) and the "name", e.g. anon.u32 for a PM_TYPE_U32 metric
> with pmid 0:0:1.

Turns out this is really simple to implement on the back of derived
metrics ...

$ diffstat -p1 </tmp/patch.anon
 src/libpcp/src/derive.c       |   57
+++++++++++++++++++++++++++++++++++++++---
 src/libpcp/src/derive.h       |    1 
 src/libpcp/src/derive_fetch.c |    4 ++
 3 files changed, 58 insertions(+), 4 deletions(-)

$ pminfo -df anon

anon.32
    Data Type: 32-bit int  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!

anon.u32
    Data Type: 32-bit unsigned int  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!

anon.64
    Data Type: 64-bit int  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!

anon.u64
    Data Type: 64-bit unsigned int  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!

anon.float
    Data Type: float  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!

anon.double
    Data Type: double  InDom: PM_INDOM_NULL 0xffffffff
    Semantics: discrete  Units: none
No value(s) available!




More information about the Systemtap mailing list