pcp
[Top] [All Lists]

pcp updates: derived metrics, dynamic metrics, derived metrics in archiv

To: pcp@xxxxxxxxxxx
Subject: pcp updates: derived metrics, dynamic metrics, derived metrics in archives
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 8 Dec 2015 08:19:39 +1100
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
Changes committed to git://git.pcp.io/kenj/pcp master

Ken McDonell (7):
      qa/src/.gitignore: add archfetch
      Cleanup for derived and dynamic metrics
      qa/archives: updated log-derived archive and creation script
      qa/797: changes after log-derived archive was recreated
      qa/assorted: various .out files remade because of derived metrics changes
      qa/509: remade .out due to derived metric changes
      qa/352: derived metric changes

 qa/246.out                    | 3000 ++++++++++++++++++++++++++++++++++++++++++
 qa/247.out                    |   24 
 qa/249.out                    |  139 +
 qa/256.out                    |    8 
 qa/259.out                    |    5 
 qa/260.out                    |    6 
 qa/263.out                    |   41 
 qa/275.out                    |   21 
 qa/334.out                    |    5 
 qa/335.out                    |    2 
 qa/352.out                    |   18 
 qa/509.out                    |    9 
 qa/773.out                    |    4 
 qa/797                        |   12 
 qa/797.out                    |  454 +++++-
 qa/archives/log-derived.0     |binary
 qa/archives/log-derived.index |binary
 qa/archives/log-derived.meta  |binary
 qa/archives/mklog-derived     |    4 
 qa/src/.gitignore             |    1 
 src/dbpmda/src/gram.y         |    2 
 src/include/pcp/impl.h        |   23 
 src/libpcp/src/derive.c       |   17 
 src/libpcp/src/derive_fetch.c |    6 
 src/libpcp/src/logutil.c      |    4 
 src/libpcp/src/pmns.c         |   20 
 src/libpcp/src/util.c         |    9 
 src/pmcd/src/dopdus.c         |    7 
 src/pmlogger/src/callback.c   |   70 
 src/pmlogger/src/dopdu.c      |    3 
 src/pmlogger/src/gram.y       |    3 
 src/pmlogger/src/logger.h     |    3 
 src/pmns/pmnsutil.c           |    2 
 33 files changed, 3815 insertions(+), 107 deletions(-)

Details ...

commit 15498c4ff1ffd72d2482a3e4cbf73491cb028c60
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 08:17:52 2015 +1100

    qa/352: derived metric changes
    
    Logged derived metrics now have a different PMID.

commit 22366fa4d6029969b524563fe039ae2d879bcd2e
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 08:16:29 2015 +1100

    qa/509: remade .out due to derived metric changes
    
    Additonal call to pmLookupName().

commit 2748e1ad4903315cd19b2bb5709e0010e346398b
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 08:14:04 2015 +1100

    qa/assorted: various .out files remade because of derived metrics changes
    
    __dmgetpmid() is now called more often (reported with -D derive) to
    validate the name of each derived metric at each context creation.

commit be4c2c69e7877a66e13ad7d152cf30bec9c9d37e
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 08:11:17 2015 +1100

    qa/797: changes after log-derived archive was recreated

commit 091231c5d0813a3b181ede94734dc6cf4b2e8093
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 08:08:31 2015 +1100

    qa/archives: updated log-derived archive and creation script
    
    Make the archive a bit more interesting.  Includes logged derived
    metrics, so subject to recent pmlogger and libpcp changes.

commit bee1a4337b91a6853f962dfc088973560f02a8b4
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Dec 8 07:17:32 2015 +1100

    Cleanup for derived and dynamic metrics
    
    Derived metrics (expressions loaded via pmRegisterDerived()) and
    dynamic metrics (metrics known only to a PMDA and not part of the
    PMNS than pmcd can see) share domain 511 (DYNAMIC_PMID) for their
    PMIDs, but with different encoding rules
    - dynamic metrics have the PMDA's domain number in the "cluster"
      field, and the item field is zero
    - derived metrics have a non-zero item field
    
    To accommodate derived metrics being written to a PCP archive, and
    later played back as real metrics (they have values in the archive)
    and not as derived metrics, some additional rules are required
    - derived metrics have a non-zero item field and the top bit of
      the cluster field is zero
    - when derived metrics are written to a PCP archive, the top bit
      of the cluster field is set to one
    
    This commit includes number of changes to improve the existing code
    and support derived metrics in PCP archives:
    
    - Add IS_DYNAMIC_ROOT(x) and IS_DERIVED(x) macros that operate on a
      PMID ... this makes the use clearer in the code and reduces the
      clutter associated with the over-use of DYNAMIC_PMID in the source.
    - Add a check that the name of a derived metric is not the same as
      a real metric from context ... this is done at the "expression
      binding" stage when the context's PMNS is available. In the case
      of a name collision, the derived metric loses and a warning is
      issued.  This does add another pmNameLookup() call (and PDU
      round-trip for host contexts) for each derived metric each time
      a new context is established, but that is (a) infrequent and
      (b) unavoidable.

commit 6b88323e0bf84db6edd4202dd30bd6c5051c131d
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Mon Dec 7 08:40:39 2015 +1100

    qa/src/.gitignore: add archfetch

<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates: derived metrics, dynamic metrics, derived metrics in archives, Ken McDonell <=