diff --git a/SOURCES/redhat-bugzilla-1875659.patch b/SOURCES/redhat-bugzilla-1875659.patch new file mode 100644 index 0000000..139add0 --- /dev/null +++ b/SOURCES/redhat-bugzilla-1875659.patch @@ -0,0 +1,273 @@ +From 7d4327035fbda12c66d8fc5eb0ed4dcd8e5f0285 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 20 Jul 2020 13:19:52 +1000 +Subject: [PATCH] src/pmlogger: remove systemd path services + +We're not going to use filesystem watchers for /etc/pcp/pmlogger/control*. +--- + src/pmlogger/GNUmakefile | 8 +------- + src/pmlogger/pmlogger_check.path.in | 6 ------ + 2 files changed, 1 insertion(+), 13 deletions(-) + delete mode 100644 src/pmlogger/pmlogger_check.path.in + +diff --git a/src/pmlogger/GNUmakefile b/src/pmlogger/GNUmakefile +index 4503993de..959141eb3 100644 +--- a/src/pmlogger/GNUmakefile ++++ b/src/pmlogger/GNUmakefile +@@ -23,7 +23,7 @@ OTHERS = pmnewlog.sh control rc_pmlogger \ + LDIRT = crontab crontab.docker crontab.daily_report pmlogger.service \ + pmlogger_daily.service pmlogger_daily-poll.service \ + pmlogger_daily_report.service pmlogger_daily_report-poll.service \ +- pmlogger_check.service pmlogger_check.path ++ pmlogger_check.service + + ifeq ($(TARGET_OS),linux) + CRONTAB_USER = $(PCP_USER) +@@ -64,7 +64,6 @@ ifeq ($(ENABLE_SYSTEMD),true) + $(INSTALL) -m 644 pmlogger_daily.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily.service + $(INSTALL) -m 644 pmlogger_daily-poll.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily-poll.timer + $(INSTALL) -m 644 pmlogger_daily-poll.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily-poll.service +- $(INSTALL) -m 644 pmlogger_check.path $(PCP_SYSTEMDUNIT_DIR)/pmlogger_check.path + $(INSTALL) -m 644 pmlogger_check.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_check.timer + $(INSTALL) -m 644 pmlogger_check.service $(PCP_SYSTEMDUNIT_DIR)/pmlogger_check.service + $(INSTALL) -m 644 pmlogger_daily_report.timer $(PCP_SYSTEMDUNIT_DIR)/pmlogger_daily_report.timer +@@ -130,11 +129,6 @@ pmlogger_check.service : pmlogger_check.service.in + -e 's;@PCP_USER@;'$(PCP_USER)';' \ + # END + +-pmlogger_check.path : pmlogger_check.path.in +- $(SED) <$< >$@ \ +- -e 's;@PCP_PMLOGGERCONTROL_PATH@;'$(PCP_PMLOGGERCONTROL_PATH)';' \ +- # END +- + pmlogger_daily_report.service : pmlogger_daily_report.service.in + $(SED) <$< >$@ \ + -e 's;@CRONTAB_DAILY_REPORT_PATH@;'$(CRONTAB_DAILY_REPORT_PATH)';' \ +diff --git a/src/pmlogger/pmlogger_check.path.in b/src/pmlogger/pmlogger_check.path.in +deleted file mode 100644 +index 7575e046a..000000000 +--- a/src/pmlogger/pmlogger_check.path.in ++++ /dev/null +@@ -1,6 +0,0 @@ +-[Path] +-PathChanged=@PCP_PMLOGGERCONTROL_PATH@ +-PathChanged=@PCP_PMLOGGERCONTROL_PATH@.d +- +-[Install] +-RequiredBy=pmlogger.service +-- +2.29.2 + +From 35c9843d2f27b8d1cdf62c00d68ce67fda4913e1 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 20 Jul 2020 13:22:51 +1000 +Subject: [PATCH] src/pmie: remove systemd path services + +We're not going to use filesystem watchers for /etc/pcp/pmie/control* +--- + src/pmie/GNUmakefile | 10 ++-------- + src/pmie/pmie_check.path.in | 6 ------ + 2 files changed, 2 insertions(+), 14 deletions(-) + delete mode 100644 src/pmie/pmie_check.path.in + +diff --git a/src/pmie/GNUmakefile b/src/pmie/GNUmakefile +index fb600b38b..58dd3959a 100644 +--- a/src/pmie/GNUmakefile ++++ b/src/pmie/GNUmakefile +@@ -19,7 +19,7 @@ include $(TOPDIR)/src/include/builddefs + SUBDIRS = src examples + OTHERS = control stomp rc_pmie pmie2col.sh pmie_check.sh pmie_daily.sh + LDIRT = crontab crontab.docker pmie.service pmie_daily.service \ +- pmie_check.service pmie_check.path ++ pmie_check.service + + ifeq ($(TARGET_OS),linux) + CRONTAB_USER = $(PCP_USER) +@@ -30,7 +30,7 @@ CRONTAB_PATH = $(PCP_SYSCONF_DIR)/pmie/crontab + endif + + default:: crontab crontab.docker pmie.service pmie_daily.service \ +- pmie_check.service pmie_check.path ++ pmie_check.service + + default:: $(SUBDIRS) + $(SUBDIRS_MAKERULE) +@@ -54,7 +54,6 @@ ifeq ($(ENABLE_SYSTEMD),true) + $(INSTALL) -m 644 pmie.service $(PCP_SYSTEMDUNIT_DIR)/pmie.service + $(INSTALL) -m 644 pmie_daily.timer $(PCP_SYSTEMDUNIT_DIR)/pmie_daily.timer + $(INSTALL) -m 644 pmie_daily.service $(PCP_SYSTEMDUNIT_DIR)/pmie_daily.service +- $(INSTALL) -m 644 pmie_check.path $(PCP_SYSTEMDUNIT_DIR)/pmie_check.path + $(INSTALL) -m 644 pmie_check.timer $(PCP_SYSTEMDUNIT_DIR)/pmie_check.timer + $(INSTALL) -m 644 pmie_check.service $(PCP_SYSTEMDUNIT_DIR)/pmie_check.service + $(INSTALL) -m 644 pmie_timers.sysconfig $(PCP_SYSCONFIG_DIR)/pmie_timers +@@ -92,11 +91,6 @@ pmie_check.service : pmie_check.service.in + -e 's;@PCP_USER@;'$(PCP_USER)';' \ + # END + +-pmie_check.path : pmie_check.path.in +- $(SED) <$< >$@ \ +- -e 's;@PCP_PMIECONTROL_PATH@;'$(PCP_PMIECONTROL_PATH)';' \ +- # END +- + pmie_daily.service : pmie_daily.service.in + $(SED) <$< >$@ \ + -e 's;@CRONTAB_PATH@;'$(CRONTAB_PATH)';' \ +diff --git a/src/pmie/pmie_check.path.in b/src/pmie/pmie_check.path.in +deleted file mode 100644 +index 42d8ab18e..000000000 +--- a/src/pmie/pmie_check.path.in ++++ /dev/null +@@ -1,6 +0,0 @@ +-[Path] +-PathChanged=@PCP_PMIECONTROL_PATH@ +-PathChanged=@PCP_PMIECONTROL_PATH@.d +- +-[Install] +-RequiredBy=pmie.service +-- +2.29.2 + +From c12c82b49aec852acd18d8c02386e25847d62fb1 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 20 Jul 2020 13:37:23 +1000 +Subject: [PATCH] src/pmfind: remove systemd path services + +We're not going to use filesystem watchers for /etc/pcp/pmfind +--- + src/pmfind/GNUmakefile | 8 +------- + src/pmfind/pmfind.path.in | 5 ----- + 2 files changed, 1 insertion(+), 12 deletions(-) + delete mode 100644 src/pmfind/pmfind.path.in + +diff --git a/src/pmfind/GNUmakefile b/src/pmfind/GNUmakefile +index a061366f2..7271b4869 100644 +--- a/src/pmfind/GNUmakefile ++++ b/src/pmfind/GNUmakefile +@@ -36,7 +36,7 @@ CRONTAB_USER = + CRONTAB_PATH = $(PCP_SYSCONF_DIR)/pmfind/crontab + endif + +-default : $(CMDTARGET) crontab pmfind.path pmfind.service ++default : $(CMDTARGET) crontab pmfind.service + + include $(BUILDRULES) + +@@ -49,7 +49,6 @@ install : default + ifeq ($(ENABLE_SYSTEMD),true) + $(INSTALL) -m 644 pmfind.service $(PCP_SYSTEMDUNIT_DIR)/pmfind.service + $(INSTALL) -m 644 pmfind.timer $(PCP_SYSTEMDUNIT_DIR)/pmfind.timer +- $(INSTALL) -m 644 pmfind.path $(PCP_SYSTEMDUNIT_DIR)/pmfind.path + else + $(INSTALL) -m 755 -d `dirname $(CRONTAB_PATH)` + $(INSTALL) -m 644 crontab $(CRONTAB_PATH) +@@ -68,11 +67,6 @@ pmfind.service : pmfind.service.in + -e 's;@PCP_VAR_DIR@;'$(PCP_VAR_DIR)';' \ + # END + +-pmfind.path : pmfind.path.in +- $(SED) <$< >$@ \ +- -e 's;@PCP_SYSCONF_DIR@;'$(PCP_SYSCONF_DIR)';' \ +- # END +- + crontab: crontab.in + $(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';g' $< > $@ + +diff --git a/src/pmfind/pmfind.path.in b/src/pmfind/pmfind.path.in +deleted file mode 100644 +index bd49398fb..000000000 +--- a/src/pmfind/pmfind.path.in ++++ /dev/null +@@ -1,5 +0,0 @@ +-[Path] +-PathChanged=@PCP_SYSCONF_DIR@/pmfind +- +-[Install] +-RequiredBy=pmfind.service +-- +2.29.2 + +From 58eea08fb41ab91a71851fe0f38fc690fa7554a2 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 20 Jul 2020 14:04:54 +1000 +Subject: [PATCH] src/{pmie,pmlogger,pmfind}: need to remove "path" from + associated service files as well + +--- + src/pmfind/pmfind.service.in | 2 +- + src/pmie/pmie.service.in | 4 ++-- + src/pmlogger/pmlogger.service.in | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/pmfind/pmfind.service.in b/src/pmfind/pmfind.service.in +index f6ee963b7..6e4b6b6d2 100644 +--- a/src/pmfind/pmfind.service.in ++++ b/src/pmfind/pmfind.service.in +@@ -3,7 +3,7 @@ Description=Discover remote PCP services for analysis + Documentation=man:pmfind(1) + After=network-online.target pmcd.service + After=pmie_check.timer pmlogger_check.timer +-BindsTo=pmfind.timer pmfind.path ++BindsTo=pmfind.timer + + [Service] + Type=oneshot +diff --git a/src/pmie/pmie.service.in b/src/pmie/pmie.service.in +index 54523bfec..020408fae 100644 +--- a/src/pmie/pmie.service.in ++++ b/src/pmie/pmie.service.in +@@ -2,8 +2,8 @@ + Description=Performance Metrics Inference Engine + Documentation=man:pmie(1) + After=network-online.target pmcd.service +-After=pmie_check.timer pmie_check.path pmie_daily.timer +-BindsTo=pmie_check.timer pmie_check.path pmie_daily.timer ++After=pmie_check.timer pmie_daily.timer ++BindsTo=pmie_check.timer pmie_daily.timer + Wants=pmcd.service + + [Service] +diff --git a/src/pmlogger/pmlogger.service.in b/src/pmlogger/pmlogger.service.in +index 2467e9933..9dad692d6 100644 +--- a/src/pmlogger/pmlogger.service.in ++++ b/src/pmlogger/pmlogger.service.in +@@ -2,8 +2,8 @@ + Description=Performance Metrics Archive Logger + Documentation=man:pmlogger(1) + After=network-online.target pmcd.service +-Before=pmlogger_check.timer pmlogger_check.path pmlogger_daily.timer pmlogger_daily-poll.timer +-BindsTo=pmlogger_check.timer pmlogger_check.path pmlogger_daily.timer pmlogger_daily-poll.timer ++Before=pmlogger_check.timer pmlogger_daily.timer pmlogger_daily-poll.timer ++BindsTo=pmlogger_check.timer pmlogger_daily.timer pmlogger_daily-poll.timer + Wants=pmcd.service + + [Service] +-- +2.29.2 + +From 739395724c29115e6bf6eb511e48086da48338ab Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Wed, 29 Jul 2020 18:32:04 +1000 +Subject: [PATCH] qa: drop systemd .path files from common remove_job_scheduler + +--- + qa/common.check | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/qa/common.check b/qa/common.check +index e17dc1352..de8a9149f 100644 +--- a/qa/common.check ++++ b/qa/common.check +@@ -1616,9 +1616,8 @@ _remove_job_scheduler() + + if systemctl cat pmie_daily.timer >/dev/null 2>&1; then + for i in pmie_daily.timer pmie_check.timer pmlogger_daily.timer \ +- pmlogger_daily-poll.timer pmlogger_check.timer \ + pmlogger_daily_report.timer pmlogger_daily_report-poll.timer \ +- pmlogger_check.path pmie_check.path ; do ++ pmlogger_daily-poll.timer pmlogger_check.timer ; do + $rc_sudo systemctl is-active "$i" > /dev/null || continue + $rc_sudo systemctl stop $i >/dev/null + echo "$i" >> $rc_systemd_state +-- +2.29.2 + diff --git a/SOURCES/redhat-bugzilla-1913782.patch b/SOURCES/redhat-bugzilla-1913782.patch new file mode 100644 index 0000000..48887ba --- /dev/null +++ b/SOURCES/redhat-bugzilla-1913782.patch @@ -0,0 +1,1084 @@ +From 2b5232bf3913ab3d9a6d57582a06dd4d5e4b126d Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Fri, 4 Sep 2020 16:05:26 +1000 +Subject: [PATCH] src/pmlogger/src/fetch.c: improve -Dfetch diagnostics + +For most (everyhting except the prologue and epilogue), pmlogger +uses a provide myFetch() routine instead of pmFetch(). + +This change lifts the pmFetch() -Dfetch diagnostics from libpcp +and splices them into pmlogger, so pmlogger -Dfetch shows all the +pmResults coming back from pmcd. + +There is no functional code change in this commit. +--- + src/pmlogger/src/fetch.c | 97 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 97 insertions(+) + +diff --git a/src/pmlogger/src/fetch.c b/src/pmlogger/src/fetch.c +index 6554698ba..baacb2cd1 100644 +--- a/src/pmlogger/src/fetch.c ++++ b/src/pmlogger/src/fetch.c +@@ -52,6 +52,30 @@ myLocalFetch(__pmContext *ctxp, int numpmid, pmID pmidlist[], __pmPDU **pdup) + return __pmEncodeResult(0, result, pdup); + } + ++/* ++ * from libpcp/src/p_result.c ... used for -Dfetch output ++ */ ++typedef struct { ++ pmID pmid; ++ int numval; /* no. of vlist els to follow, or error */ ++ int valfmt; /* insitu or pointer */ ++ __pmValue_PDU vlist[1]; /* zero or more */ ++} vlist_t; ++typedef struct { ++ __pmPDUHdr hdr; ++ pmTimeval timestamp; /* when returned */ ++ int numpmid; /* no. of PMIDs to follow */ ++ __pmPDU data[1]; /* zero or more */ ++} result_t; ++/* ++ * from libpcp/src/internal.h ... used for -Dfetch output ++ */ ++#ifdef HAVE_NETWORK_BYTEORDER ++#define __ntohpmID(a) (a) ++#else ++#define __ntohpmID(a) htonl(a) ++#endif ++ + int + myFetch(int numpmid, pmID pmidlist[], __pmPDU **pdup) + { +@@ -131,6 +155,76 @@ myFetch(int numpmid, pmID pmidlist[], __pmPDU **pdup) + * < 0 (local error or IPC problem) + * other (bogus PDU) + */ ++ ++ if (pmDebugOptions.fetch) { ++ fprintf(stderr, "myFetch returns ...\n"); ++ if (n == PDU_ERROR) { ++ int flag = 0; ++ ++ fprintf(stderr, "PMCD state changes: "); ++ if (n & PMCD_AGENT_CHANGE) { ++ fprintf(stderr, "agent(s)"); ++ if (n & PMCD_ADD_AGENT) fprintf(stderr, " added"); ++ if (n & PMCD_RESTART_AGENT) fprintf(stderr, " restarted"); ++ if (n & PMCD_DROP_AGENT) fprintf(stderr, " dropped"); ++ flag++; ++ } ++ if (n & PMCD_LABEL_CHANGE) { ++ if (flag++) ++ fprintf(stderr, ", "); ++ fprintf(stderr, "label change"); ++ } ++ if (n & PMCD_NAMES_CHANGE) { ++ if (flag++) ++ fprintf(stderr, ", "); ++ fprintf(stderr, "names change"); ++ } ++ fputc('\n', stderr); ++ } ++ else if (n == PDU_RESULT) { ++ /* ++ * not safe to decode result here, so have to make ++ * do with a shallow dump of the PDU using logic ++ * from libpcp/__pmDecodeResult() ++ */ ++ int numpmid; ++ int numval; ++ int i; ++ int vsize; ++ pmID pmid; ++ struct timeval timestamp; ++ char *name; ++ result_t *pp; ++ vlist_t *vlp; ++ pp = (result_t *)pb; ++ /* assume PDU is valid ... it comes from pmcd */ ++ numpmid = ntohl(pp->numpmid); ++ timestamp.tv_sec = ntohl(pp->timestamp.tv_sec); ++ timestamp.tv_usec = ntohl(pp->timestamp.tv_usec); ++ fprintf(stderr, "pmResult timestamp: %d.%06d numpmid: %d\n", (int)timestamp.tv_sec, (int)timestamp.tv_usec, numpmid); ++ vsize = 0; ++ for (i = 0; i < numpmid; i++) { ++ vlp = (vlist_t *)&pp->data[vsize/sizeof(__pmPDU)]; ++ pmid = __ntohpmID(vlp->pmid); ++ numval = ntohl(vlp->numval); ++ fprintf(stderr, " %s", pmIDStr(pmid)); ++ if (pmNameID(pmid, &name) == 0) { ++ fprintf(stderr, " (%s)", name); ++ free(name); ++ } ++ fprintf(stderr, ": numval: %d", numval); ++ if (numval > 0) ++ fprintf(stderr, " valfmt: %d", ntohl(vlp->valfmt)); ++ fputc('\n', stderr); ++ vsize += sizeof(vlp->pmid) + sizeof(vlp->numval); ++ if (numval > 0) ++ vsize += sizeof(vlp->valfmt) + ntohl(vlp->numval) * sizeof(__pmValue_PDU); ++ } ++ } ++ else ++ fprintf(stderr, "__pmGetPDU: Error: %s\n", pmErrStr(n)); ++ } ++ + if (n == PDU_RESULT) { + /* + * Success with a pmResult in a pdubuf. +@@ -240,6 +334,9 @@ myFetch(int numpmid, pmID pmidlist[], __pmPDU **pdup) + } + } + } ++ else { ++ fprintf(stderr, "Error: __pmSendFetch: %s\n", pmErrStr(n)); ++ } + if (newlist != NULL) + free(newlist); + } +-- +2.29.2 + +From dc1edae0b8e4bf332dccf824bd9808d5ad81b2d2 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Fri, 4 Sep 2020 16:09:14 +1000 +Subject: [PATCH] src/pmlogger/src/gram.y: fix for repeated metric problem + +If we were really lucky and had a pmlogger config like: + +.... { + ...[A] + metric-a + ...[B] + metric-a +} +then metric-a could end up in two fetchctl_t groups, meaning it +would be fetched twice as often as expected, in back-to-back fetches +each time the associated upper-level task was run. + +The critical issue is that if the metrics in the [B] group cause +optFetch to split the task's work into two (or more) fetchctl_t +groups, we "lose" track of the first metric-a, and when the second +metric-a is encountered we feed it to optFetch again instead of +skipping it. + +This part of the fix ensures that after calling __pmOptFetchAdd() we +then call linkback(tp) to ensure _all_ of the fetchctl_t groups +are linked back to the associated upper level task (tp). + +There is also an additional diagnostic here to dump out all of the +fetchctl_t groups after calling __pmOptFetchAdd() when -Doptfetch +and -Ddesperate are in play. +--- + src/pmlogger/src/gram.y | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/pmlogger/src/gram.y b/src/pmlogger/src/gram.y +index b31927e52..7e51d2bfe 100644 +--- a/src/pmlogger/src/gram.y ++++ b/src/pmlogger/src/gram.y +@@ -549,10 +549,17 @@ activate_cached_metric(const char *name, int index) + + skip = 1; + } ++ else if (sts == 1) ++ skip = 1; + } + + if (!skip) { + __pmOptFetchAdd(&tp->t_fetch, rqp); ++ linkback(tp); ++ if (pmDebugOptions.optfetch && pmDebugOptions.desperate) { ++ fprintf(stderr, "Task " PRINTF_P_PFX "%p -> t_fetch ...\n", tp); ++ __pmOptFetchDump(stderr, tp->t_fetch); ++ } + if ((sts = __pmHashAdd(pmid, (void *)rqp, &pm_hash)) < 0) { + pmsprintf(emess, sizeof(emess), "__pmHashAdd failed " + "for metric \"%s\" ... logging not activated", name); +-- +2.29.2 + +From 824e9ef51a1a85dcb980f281ef7367eb9d200125 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Fri, 4 Sep 2020 16:20:23 +1000 +Subject: [PATCH] src/pmlogger/src/checks.c: fix for repeated metric problem + +In this part of the fix, chk_one() and chk_all() are given +a make over. + +chk_one() had a small "same group" logic error (benign I think), +but was missing any useful diagnostics. + +chk_all() had the useful diagnostics, but the logic was grossly incomplete +(as in missing) ... this in the code + /*TODO, not right!*/ +should have been a warning! Arrrgh. +So the routine has been rewritten ... and in so doing now returns 1 +correctly for a replicated metric (and no instances specified) in the +same config file logging group, which means we don't call optFetch() +again back in the caller. +--- + src/pmlogger/src/checks.c | 122 ++++++++++++++++++++++++++++++-------- + 1 file changed, 97 insertions(+), 25 deletions(-) + +diff --git a/src/pmlogger/src/checks.c b/src/pmlogger/src/checks.c +index 6c3aa4062..e7f3aa5d0 100644 +--- a/src/pmlogger/src/checks.c ++++ b/src/pmlogger/src/checks.c +@@ -91,13 +91,36 @@ chk_one(task_t *tp, pmID pmid, int inst) + return 0; + + ctp = rqp->r_fetch->f_aux; +- if (ctp == NULL || ctp == tp) ++ if (ctp == NULL) ++ return 0; ++ if (ctp == tp) + /* + * can only happen if same metric+inst appears more than once + * in the same group ... this can never be a conflict ++ * return 1 => skip this one + */ + return 1; + ++ if (pmDebugOptions.log) { ++ fprintf(stderr, "chk_one: pmid=%s task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", ++ pmIDStr(pmid), tp, ++ PMLC_GET_INLOG(tp->t_state) ? " " : "N", ++ PMLC_GET_AVAIL(tp->t_state) ? " " : "N", ++ PMLC_GET_MAND(tp->t_state) ? "M" : "A", ++ PMLC_GET_ON(tp->t_state) ? "Y" : "N", ++ (int)tp->t_delta.tv_sec, (int)tp->t_delta.tv_usec); ++ if (ctp == NULL) ++ fprintf(stderr, "compared to: NULL\n"); ++ else ++ fprintf(stderr, "compared to: optreq task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", ++ ctp, ++ PMLC_GET_INLOG(ctp->t_state) ? " " : "N", ++ PMLC_GET_AVAIL(ctp->t_state) ? " " : "N", ++ PMLC_GET_MAND(ctp->t_state) ? "M" : "A", ++ PMLC_GET_ON(ctp->t_state) ? "Y" : "N", ++ (int)ctp->t_delta.tv_sec, (int)ctp->t_delta.tv_usec); ++ } ++ + if (PMLC_GET_MAND(ctp->t_state)) { + if (PMLC_GET_ON(ctp->t_state)) { + if (PMLC_GET_MAND(tp->t_state) == 0 && PMLC_GET_MAYBE(tp->t_state) == 0) { +@@ -130,37 +153,86 @@ chk_one(task_t *tp, pmID pmid, int inst) + return 0; + } + ++/* ++ * like chk_one() but we have to deal with the possibility that numinst ++ * (number of instances in the logging request) is 0 (=> all instances) ++ * in either this task, or some other task ++ */ + int + chk_all(task_t *tp, pmID pmid) + { +- optreq_t *rqp; +- task_t *ctp; ++ optreq_t *rqp; ++ task_t *ctp; ++ __pmHashNode *hp; + +- rqp = findoptreq(pmid, 0); /*TODO, not right!*/ +- if (rqp == NULL) +- return 0; +- +- ctp = rqp->r_fetch->f_aux; ++ for (hp = __pmHashSearch(pmid, &pm_hash); hp != NULL; hp = hp->next) { ++ if (pmid != (pmID)hp->key) ++ continue; ++ rqp = (optreq_t *)hp->data; ++ if (rqp == NULL) ++ continue; + +- if (pmDebugOptions.log) { +- fprintf(stderr, "chk_all: pmid=%s task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", +- pmIDStr(pmid), tp, +- PMLC_GET_INLOG(tp->t_state) ? " " : "N", +- PMLC_GET_AVAIL(tp->t_state) ? " " : "N", +- PMLC_GET_MAND(tp->t_state) ? "M" : "A", +- PMLC_GET_ON(tp->t_state) ? "Y" : "N", +- (int)tp->t_delta.tv_sec, (int)tp->t_delta.tv_usec); ++ ctp = rqp->r_fetch->f_aux; + if (ctp == NULL) +- fprintf(stderr, "compared to: NULL\n"); +- else +- fprintf(stderr, "compared to: optreq task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", +- ctp, +- PMLC_GET_INLOG(ctp->t_state) ? " " : "N", +- PMLC_GET_AVAIL(ctp->t_state) ? " " : "N", +- PMLC_GET_MAND(ctp->t_state) ? "M" : "A", +- PMLC_GET_ON(ctp->t_state) ? "Y" : "N", +- (int)ctp->t_delta.tv_sec, (int)ctp->t_delta.tv_usec); ++ continue; ++ if (ctp == tp) ++ /* ++ * can only happen if same metric w/o instances appears more ++ * than once in the same group ... this can never be a conflict ++ * return 1 => skip this one ++ */ ++ return 1; ++ ++ if (pmDebugOptions.log) { ++ fprintf(stderr, "chk_all: pmid=%s task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", ++ pmIDStr(pmid), tp, ++ PMLC_GET_INLOG(tp->t_state) ? " " : "N", ++ PMLC_GET_AVAIL(tp->t_state) ? " " : "N", ++ PMLC_GET_MAND(tp->t_state) ? "M" : "A", ++ PMLC_GET_ON(tp->t_state) ? "Y" : "N", ++ (int)tp->t_delta.tv_sec, (int)tp->t_delta.tv_usec); ++ if (ctp == NULL) ++ fprintf(stderr, "compared to: NULL\n"); ++ else ++ fprintf(stderr, "compared to: optreq task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", ++ ctp, ++ PMLC_GET_INLOG(ctp->t_state) ? " " : "N", ++ PMLC_GET_AVAIL(ctp->t_state) ? " " : "N", ++ PMLC_GET_MAND(ctp->t_state) ? "M" : "A", ++ PMLC_GET_ON(ctp->t_state) ? "Y" : "N", ++ (int)ctp->t_delta.tv_sec, (int)ctp->t_delta.tv_usec); ++ } ++ ++ if (PMLC_GET_MAND(ctp->t_state)) { ++ if (PMLC_GET_ON(ctp->t_state)) { ++ if (PMLC_GET_MAND(tp->t_state) == 0 && PMLC_GET_MAYBE(tp->t_state) == 0) { ++ if (PMLC_GET_ON(tp->t_state)) ++ return -1; ++ else ++ return -2; ++ } ++ } ++ else { ++ if (PMLC_GET_MAND(tp->t_state) == 0 && PMLC_GET_MAYBE(tp->t_state) == 0) { ++ if (PMLC_GET_ON(tp->t_state)) ++ return -3; ++ else ++ return -4; ++ } ++ } ++ /* ++ * new mandatory, over-rides the old mandatory ++ */ ++ undo(ctp, rqp, PM_IN_NULL); ++ } ++ else { ++ /* ++ * new anything, over-rides the old advisory ++ */ ++ undo(ctp, rqp, PM_IN_NULL); ++ } + } ++ + return 0; + } + +-- +2.29.2 + +From b243df50acecc98f43c477b506dbfc080cc876ee Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 7 Sep 2020 11:06:30 +1000 +Subject: [PATCH] src/pmlogger: couple of corner cases for repeated metrics + +Note this is for metrics repeated in the same { ...} logging +control group from the config file. + +These ones were exposed by the (new) qa/1273. +--- + src/pmlogger/src/checks.c | 26 ++++++++++++++++++++++---- + src/pmlogger/src/gram.y | 2 +- + 2 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/src/pmlogger/src/checks.c b/src/pmlogger/src/checks.c +index e7f3aa5d0..5e132dc49 100644 +--- a/src/pmlogger/src/checks.c ++++ b/src/pmlogger/src/checks.c +@@ -175,13 +175,31 @@ chk_all(task_t *tp, pmID pmid) + ctp = rqp->r_fetch->f_aux; + if (ctp == NULL) + continue; +- if (ctp == tp) ++ if (ctp == tp) { + /* +- * can only happen if same metric w/o instances appears more +- * than once in the same group ... this can never be a conflict +- * return 1 => skip this one ++ * can only happen if same metric appears more than once ++ * in the same group ... this can never be a conflict ++ * return 1 => skip this one, but first we may need to ++ * expand the profile for the existing fetch to include ++ * all instances + */ ++ if (rqp->r_numinst != 0) { ++ indomctl_t *idp; ++ for (idp = rqp->r_fetch->f_idp; idp != (indomctl_t *)0; idp = idp->i_next) { ++ if (idp->i_indom == rqp->r_desc->indom) { ++ ++ if (idp->i_numinst > 0) { ++ idp->i_numinst = 0; ++ free(idp->i_instlist); ++ } ++ break; ++ } ++ } ++ rqp->r_numinst = 0; ++ free(rqp->r_instlist); ++ } + return 1; ++ } + + if (pmDebugOptions.log) { + fprintf(stderr, "chk_all: pmid=%s task=" PRINTF_P_PFX "%p state=%s%s%s%s delta=%d.%06d\n", +diff --git a/src/pmlogger/src/gram.y b/src/pmlogger/src/gram.y +index 7e51d2bfe..35ef688f5 100644 +--- a/src/pmlogger/src/gram.y ++++ b/src/pmlogger/src/gram.y +@@ -536,7 +536,7 @@ activate_cached_metric(const char *name, int index) + else if (sts == 0) + rqp->r_instlist[j++] = inst; + else /* already have this instance */ +- skip = 1; ++ rqp->r_numinst--; + } + if (rqp->r_numinst == 0) + skip = 1; +-- +2.29.2 + +From 95a3a5456fefa315270dbfaf93333e597580fb56 Mon Sep 17 00:00:00 2001 +From: Ken McDonell +Date: Mon, 7 Sep 2020 11:10:14 +1000 +Subject: [PATCH] qa/1273: (new) exercise corner-cases of the same metric + repeated + +"repeated" => appearing more than once in the same { ... } pmlogger +configuration clause. +--- +Note: patch to qa/group didn't apply cleanly, added manually + + qa/1273 | 193 +++++++++++++++++++++++++ + qa/1273.out | 398 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + qa/group | 1 + + 3 files changed, 592 insertions(+) + create mode 100755 qa/1273 + create mode 100644 qa/1273.out + +diff --git a/qa/1273 b/qa/1273 +new file mode 100755 +index 000000000..586995b6e +--- /dev/null ++++ b/qa/1273 +@@ -0,0 +1,193 @@ ++#!/bin/sh ++# PCP QA Test No. 1273 ++# optFetch and pmlogger interraction for repeated metric in a logging ++# group ++# ++# Copyright (c) 2020 Ken McDonell. All Rights Reserved. ++# ++ ++seq=`basename $0` ++if [ $# -eq 0 ] ++then ++ echo "QA output created by $seq" ++else ++ echo "QA output created by $seq $*" ++fi ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++_cleanup() ++{ ++ cd $here ++ $sudo rm -rf $tmp $tmp.* ++} ++ ++status=0 # success is the default! ++$sudo rm -rf $tmp $tmp.* $seq.full ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++_do_it() ++{ ++ rm -f $tmp.0 $tmp.meta $tmp.index $tmp.log ++ pmlogger -D optfetch,desperate -l $tmp.log -c $tmp.config -s 2 -t 0.25sec $tmp ++ echo >>$seq.full ++ cat $tmp.config >>$seq.full ++ cat $tmp.log >>$seq.full ++ ++ # delete log down to last "Task 0x5608ac112100 -> t_fetch ..." line ++ # then summarize ++ # Fetch Control @ 0x5608ac1127d0: cost=20 state=NEW PMID PROFILE ++ # ... ++ # PMID 60.0.4 Control @ 0x5608ac112810: ++ # ... ++ # ++ line=`$PCP_AWK_PROG <$tmp.log '/ t_fetch/ { print NR }' | tail -1` ++ if [ -z "$line" ] ++ then ++ echo "Arrgh, no t_fetch line in log file ... see $seq.full" ++ else ++ $PCP_AWK_PROG <$tmp.log ' ++BEGIN { i = 0 } ++NR < '$line' { next } ++/^Fetch Control / { print "Fetch Control [" i "]"; i++; next } ++$1 == "PMID" { print " " $1,$2; next }' ++ fi ++ ++ pmdumplog $tmp "$1" \ ++ | _filter_pmdumplog ++} ++ ++# real QA test starts here ++echo "sample.bin - simple - sample.bin" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin ++ simple ++ sample.bin ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin - simple - disk.dev.read - sample.bin" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin ++ simple ++ disk.dev.read ++ sample.bin ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin - simple - disk.dev.read - sampledso.long - sample.bin" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin ++ simple ++ disk.dev.read ++ sampledso.long ++ sample.bin ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sampledso.long - sample.bin - simple - disk.dev.read - sample.bin" ++cat <$tmp.config ++log mandatory on default { ++ sampledso.long ++ sample.bin ++ simple ++ disk.dev.read ++ sample.bin ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin - sampledso.long - simple - disk.dev.read - sample.bin - sampledso.longlong" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin ++ sampledso.long ++ simple ++ disk.dev.read ++ sample.bin ++ sampledso.longlong ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin[i1] - simple - sample.bin[i2]" ++echo "i1 and i2 disjoint" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin["bin-100","bin-300","bin-500"] ++ simple ++ sample.bin["bin-200","bin-400","bin-600"] ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin[i2]" ++echo "i1 and i2 disjoint" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin["bin-100","bin-300","bin-500"] ++ sampledso.long ++ simple ++ disk.dev.read ++ sample.bin["bin-200","bin-400","bin-600"] ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin[i2]" ++echo "i1 and i2 overlap" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin["bin-100","bin-200","bin-300"] ++ sampledso.long ++ simple ++ disk.dev.read ++ sample.bin["bin-200","bin-300","bin-400","bin-500"] ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin - sampledso.long - simple - disk.dev.read - sample.bin[i2]" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin ++ sampledso.long ++ simple ++ disk.dev.read ++ sample.bin["bin-200","bin-300","bin-400","bin-500"] ++} ++End-of-File ++_do_it sample.bin ++ ++echo ++echo "sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin" ++cat <$tmp.config ++log mandatory on default { ++ sample.bin["bin-100","bin-200","bin-300"] ++ sampledso.long ++ simple ++ disk.dev.read ++ sample.bin ++} ++End-of-File ++_do_it sample.bin ++ ++# success, all done ++exit +diff --git a/qa/1273.out b/qa/1273.out +new file mode 100644 +index 000000000..aa5e3c62c +--- /dev/null ++++ b/qa/1273.out +@@ -0,0 +1,398 @@ ++QA output created by 1273 ++sample.bin - simple - sample.bin ++Fetch Control [0] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sample.bin - simple - disk.dev.read - sample.bin ++Fetch Control [0] ++ PMID 60.0.4 ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sample.bin - simple - disk.dev.read - sampledso.long - sample.bin ++Fetch Control [0] ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++Fetch Control [1] ++ PMID 60.0.4 ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sampledso.long - sample.bin - simple - disk.dev.read - sample.bin ++Fetch Control [0] ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 29.0.6 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sample.bin - sampledso.long - simple - disk.dev.read - sample.bin - sampledso.longlong ++Fetch Control [0] ++ PMID 30.0.110 ++ PMID 30.0.109 ++ PMID 30.0.24 ++ PMID 30.0.23 ++ PMID 30.0.22 ++ PMID 30.0.21 ++ PMID 30.0.20 ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sample.bin[i1] - simple - sample.bin[i2] ++i1 and i2 disjoint ++Fetch Control [0] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ ++sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin[i2] ++i1 and i2 disjoint ++Fetch Control [0] ++ PMID 29.0.6 ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [200 or "bin-200"] value 200 ++ inst [400 or "bin-400"] value 400 ++ inst [600 or "bin-600"] value 600 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [300 or "bin-300"] value 300 ++ inst [500 or "bin-500"] value 500 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [200 or "bin-200"] value 200 ++ inst [400 or "bin-400"] value 400 ++ inst [600 or "bin-600"] value 600 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [300 or "bin-300"] value 300 ++ inst [500 or "bin-500"] value 500 ++ ++sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin[i2] ++i1 and i2 overlap ++Fetch Control [0] ++ PMID 29.0.6 ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ ++sample.bin - sampledso.long - simple - disk.dev.read - sample.bin[i2] ++Fetch Control [0] ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++sample.bin[i1] - sampledso.long - simple - disk.dev.read - sample.bin ++Fetch Control [0] ++ PMID 60.0.4 ++Fetch Control [1] ++ PMID 253.2.4 ++ PMID 253.0.1 ++ PMID 30.0.104 ++ PMID 30.0.103 ++ PMID 253.1.3 ++ PMID 253.1.2 ++ PMID 253.0.0 ++ PMID 30.0.14 ++ PMID 30.0.13 ++ PMID 30.0.12 ++ PMID 30.0.11 ++ PMID 30.0.10 ++ PMID 29.0.6 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 ++ ++TIMESTAMP 1 metric ++ 29.0.6 (sample.dupnames.three.bin or sample.dupnames.two.bin or sample.bin): ++ inst [100 or "bin-100"] value 100 ++ inst [200 or "bin-200"] value 200 ++ inst [300 or "bin-300"] value 300 ++ inst [400 or "bin-400"] value 400 ++ inst [500 or "bin-500"] value 500 ++ inst [600 or "bin-600"] value 600 ++ inst [700 or "bin-700"] value 700 ++ inst [800 or "bin-800"] value 800 ++ inst [900 or "bin-900"] value 900 +diff -auNr a/qa/group b/qa/group +--- a/qa/group 2021-01-08 09:49:05.341806489 +1100 ++++ b/qa/group 2021-01-08 09:53:14.887828998 +1100 +@@ -1634,6 +1634,7 @@ + 1266 atop pcp local + 1267 pmlogrewrite labels help pmdumplog local + 1269 libpcp local kernel ++1273 pmlogger fetch local + 1274 pmlogextract pmdumplog labels help local sanity + 1276 pmmgr containers local + 1287 pmda.install pmda.openmetrics local python +-- +2.29.2 diff --git a/SPECS/pcp.spec b/SPECS/pcp.spec index 297467b..3514bcf 100644 --- a/SPECS/pcp.spec +++ b/SPECS/pcp.spec @@ -1,6 +1,6 @@ Name: pcp Version: 5.1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: System-level performance monitoring and performance management License: GPLv2+ and LGPLv2+ and CC-BY URL: https://pcp.io @@ -16,6 +16,8 @@ Patch004: redhat-bugzilla-1790452.patch Patch005: redhat-bugzilla-1846705.patch Patch006: redhat-bugzilla-1849511.patch Patch007: redhat-bugzilla-1790433.patch +Patch008: redhat-bugzilla-1913782.patch +Patch009: redhat-bugzilla-1875659.patch %if 0%{?fedora} >= 26 || 0%{?rhel} > 7 %global __python2 python2 @@ -2231,6 +2233,8 @@ updated policy package. %patch005 -p1 %patch006 -p1 %patch007 -p1 +%patch008 -p1 +%patch009 -p1 %build # fix up build version @@ -2929,20 +2933,16 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null # services and timers replacing the old cron scripts %{_unitdir}/pmlogger_check.service %{_unitdir}/pmlogger_check.timer -%{_unitdir}/pmlogger_check.path %{_unitdir}/pmlogger_daily.service %{_unitdir}/pmlogger_daily.timer %{_unitdir}/pmlogger_daily-poll.service %{_unitdir}/pmlogger_daily-poll.timer %{_unitdir}/pmie_check.timer -%{_unitdir}/pmie_check.path %{_unitdir}/pmie_check.service %{_unitdir}/pmie_check.timer -%{_unitdir}/pmie_check.path %{_unitdir}/pmie_daily.service %{_unitdir}/pmie_daily.timer %{_unitdir}/pmfind.timer -%{_unitdir}/pmfind.path %config(noreplace) %{_sysconfdir}/sysconfig/pmie_timers %config(noreplace) %{_sysconfdir}/sysconfig/pmlogger_timers %else @@ -3408,6 +3408,10 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %endif %changelog +* Wed Jan 20 2021 Andreas Gerstmayr - 5.1.1-4 +- resolve boot ordering cycle, remove path service units (BZ 1875659) +- fix pmlogger, some metrics got logged twice (BZ 1913782) + * Tue Jun 23 2020 Mark Goodwin - 5.1.1-3 - fix for missing runtime deps on perl Net::SNMP (BZ 1790433) - resolve covscan and other issues from upstream QA (BZ 1849511)