pcp
[Top] [All Lists]

pcp updates - duplicate names allowed in the PMNS by default

To: pcp@xxxxxxxxxxx
Subject: pcp updates - duplicate names allowed in the PMNS by default
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 03 Feb 2015 19:31:31 +1100
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
There are quite a few changes here ... some review is probably warranted before 
pushing upstream.

Everything sort of worked out, although I ran into a couple of nasty bugs that 
were not really related, but the PMNS changes exposed them and fixes for these 
are included in this batch.

The only residual issues I have (and am seeking opinions of others) are ...

Case 1 - libpcp_qmc

libpcp_qmc/src/qmc_context.cpp
    if ((sts = pmNameID(pmid, &value)) >= 0) {

This is a problem in ...
    QmcContext::lookupName(pmID pmid, QString **name)
and there does not appear to be a comparable method to return
a set of names.  This is used in the higher level
    QmcContext::lookup(pmID pmid, QString **namePtr, ...)
and both methods are public.

This may be a non-problem as none of the libpcp_qmc users (pmdumptext,
pmview, pmgadgets, pmtime and pmchart) actually calls QmcContext::lookup()
or QmcContext::lookupName().

Case 2 - pmwebapi

pmwebapi/pmwebapi.cxx
    rc = pmNameID (fieldvsp->pmid, &fieldname);
    rc = pmNameID (pvs->pmid, &metric_name);

In both the places above, there appears to be an assumption that a PMID
-> one name at most, and I can't see if that should be change, much less
how it would be changed.


Changes committed to git://git.pcp.io/kenj/pcp dev

Ken McDonell (36):
      libpcp: change default pmLoadNameSpace behaviour
      qa/254: remove variant output
      qa/392: remove variant output
      dups in pmns: change pmns utilities
      qa/993: (new) exercise duplicate names in the pmns for pmlogger and 
pmdumplog
      sample PMDA: add sample.dupnames.*
      libpcp/pmgetopt.c: change -N and -n semantics
      libpcp: duplicate PMNS names allowed by default
      impl.h: add __pmPrintMetricNames prototype
      pminfo: duplicate PMNS names allowed by default
      pmlogger: duplicate PMNS names allowed by default
      dbpmda: duplicate PMNS names allowed by default
      pmcd: duplicate PMNS names allowed by default
      PMNS helper apps: reinstate -d
      pmdumplog: duplicate PMNS names allowed by default
      pmlogreduce: duplicate PMNS names allowed by default
      qa/admin/pcp-daily: tweak kenj's xhost command
      qa/src/multithread9.c: duplicate PMNS names allowed by default
      qa/src/nameall.c: duplicate PMNS names allowed by default
      qa/src/test_pcp.python: duplicate PMNS names allowed by default
      qa: duplicate PMNS names allowed by default
      man pages: drop -d documentation for pmns helpers
      chkhelp: duplicate PMNS names allowed by default
      solaris PMDA: duplicate PMNS names allowed by default
      pmevent: duplicate PMNS names allowed by default
      qa/765 & foo+ archive: more test fodder for pmlogsummary
      pmlogsummary: duplicate PMNS names allowed by default
      pmlogrewrite: bug fix and duplicate PMNS names
      qa/838: fix botched comment
      qa/930(new): pmlogrewrite and duplicate names in the PMNS
      pmlogrewrite: put back optimization in the absence of event records
      sample PMDA: add sample.dupnames.seconds as alias for sample.seconds
      pmlogcheck: duplicate PMNS names allowed by default
      qa/src/torture_api.c: another incorrect PMNS assumption
      qa: changes for addition of sample.dupnames.two.seconds
      qa: assorted .out remakes after recent sample PMDA changes

 man/man1/pmcd.1                 |    6 
 man/man1/pminfo.1               |    6 
 man/man1/pmnsadd.1              |    7 
 man/man1/pmnsdel.1              |    7 
 man/man1/pmnsmerge.1            |    8 
 man/man3/pmloadasciinamespace.3 |    4 
 man/man3/pmloadnamespace.3      |    8 
 man/man3/pmnameid.3             |    9 
 man/man5/pmns.5                 |    7 
 qa/.gitignore                   |    2 
 qa/014.out                      |   16 
 qa/029.out                      |   32 +
 qa/031.out.linux                |    2 
 qa/048.out                      |  144 +++---
 qa/098.out                      |  152 +++---
 qa/100.out                      |  102 ++--
 qa/101                          |    3 
 qa/101.out                      |  152 +++---
 qa/102.out                      |    2 
 qa/103                          |    3 
 qa/103.out                      |  154 +++---
 qa/104                          |    3 
 qa/104.out                      |  152 +++---
 qa/105                          |    3 
 qa/105.out                      |  152 +++---
 qa/106                          |    3 
 qa/106.out                      |  152 +++---
 qa/132.out                      |    2 
 qa/134.out                      |    4 
 qa/145                          |    4 
 qa/145.out.nonsec               |    8 
 qa/145.out.sec                  |    8 
 qa/146                          |    8 
 qa/147.out                      |   12 
 qa/156                          |    2 
 qa/156.out                      |   28 -
 qa/162.out                      |   10 
 qa/174.out                      |   36 -
 qa/177.out                      |    4 
 qa/179.out                      |   16 
 qa/218.out                      |    2 
 qa/235.out                      |    8 
 qa/236.out                      |    2 
 qa/245.out                      |    1 
 qa/248.out.2                    |   24 -
 qa/249.out                      |    2 
 qa/254                          |   20 
 qa/254.out                      |   17 
 qa/254.out.1                    |   22 
 qa/254.out.2                    |   17 
 qa/256.out                      |   46 ++
 qa/257.out                      |    4 
 qa/273.out                      |   69 ++-
 qa/344.out                      |   88 +--
 qa/392                          |   48 --
 qa/392.out                      |   55 +-
 qa/392.out.1                    |   38 -
 qa/392.out.2                    |   36 -
 qa/432.out                      |    4 
 qa/464.out                      |    2 
 qa/465.out.4                    |    2 
 qa/475.out                      |   60 +-
 qa/509.out                      |   12 
 qa/531.out                      |    2 
 qa/533.out                      |    2 
 qa/569                          |    9 
 qa/569.out                      |   51 ++
 qa/574.out.linux                |    2 
 qa/617.out.3                    |   20 
 qa/633.out.2                    |    3 
 qa/650.out                      |   37 -
 qa/660.out.46                   |   82 ++-
 qa/726.out                      |    2 
 qa/762                          |   26 +
 qa/762.out                      |  303 +++++++++++++
 qa/765                          |   26 +
 qa/765.out                      |  912 ++++++++++++++++++++++++++++++++++++++++
 qa/838                          |   73 +++
 qa/838.out                      |   25 +
 qa/930                          |   63 ++
 qa/930.out                      |  124 +++++
 qa/993                          |   49 ++
 qa/993.out                      |   21 
 qa/admin/pcp-daily              |    2 
 qa/archives/GNUmakefile         |    5 
 qa/archives/foo+.0              |binary
 qa/archives/foo+.index          |binary
 qa/archives/foo+.meta           |binary
 qa/archives/mk.foo+.sh          |   31 +
 qa/group                        |    5 
 qa/src/multithread9.c           |   61 +-
 qa/src/nameall.c                |   11 
 qa/src/test_pcp.python          |   19 
 qa/src/torture_api.c            |   27 -
 src/dbpmda/src/util.c           |   16 
 src/include/pcp/impl.h          |    2 
 src/include/pcp/pmapi.h         |    4 
 src/libpcp/src/events.c         |   10 
 src/libpcp/src/exports          |    5 
 src/libpcp/src/getopt.c         |    6 
 src/libpcp/src/interp.c         |    2 
 src/libpcp/src/pmns.c           |   41 +
 src/libpcp/src/util.c           |   23 -
 src/newhelp/chkhelp.c           |   11 
 src/pmcd/pmcd.options           |    5 
 src/pmcd/pmdaproc.sh            |    4 
 src/pmcd/rc_pmcd                |    2 
 src/pmcd/src/pmcd.c             |   24 -
 src/pmdas/sample/pmns           |   30 +
 src/pmdas/sample/src/sample.c   |   43 -
 src/pmdas/solaris/solaris.c     |   18 
 src/pmdumplog/pmdumplog.c       |   63 +-
 src/pmevent/pmevent.c           |    4 
 src/pminfo/pminfo.c             |   16 
 src/pmlogcheck/pmlogcheck.c     |   46 +-
 src/pmlogger/src/callback.c     |   73 ++-
 src/pmlogger/src/dopdu.c        |    9 
 src/pmlogreduce/dometric.c      |   45 +
 src/pmlogrewrite/pmlogrewrite.c |   79 ++-
 src/pmlogsummary/pmlogcheck.c   |    9 
 src/pmlogsummary/pmlogsummary.c |   96 ++--
 src/pmns/Rebuild                |   40 -
 src/pmns/pmnsadd                |   11 
 src/pmns/pmnsdel.c              |   18 
 src/pmns/pmnsmerge.c            |   20 
 125 files changed

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