summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pcp/PCPMetric.c5
-rw-r--r--pcp/PCPProcessList.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/pcp/PCPMetric.c b/pcp/PCPMetric.c
index d1afc801..f6d4c97b 100644
--- a/pcp/PCPMetric.c
+++ b/pcp/PCPMetric.c
@@ -164,7 +164,10 @@ bool PCPMetric_fetch(struct timeval* timestamp) {
pmFreeResult(pcp->result);
pcp->result = NULL;
}
- int sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result);
+ int sts, count = 0;
+ do {
+ sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result);
+ } while (sts == PM_ERR_IPC && ++count < 3);
if (sts < 0) {
if (pmDebugOptions.appl0)
fprintf(stderr, "Error: cannot fetch metric values: %s\n",
diff --git a/pcp/PCPProcessList.c b/pcp/PCPProcessList.c
index e324e337..554e43d4 100644
--- a/pcp/PCPProcessList.c
+++ b/pcp/PCPProcessList.c
@@ -680,7 +680,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
PCPMetric_enable(PCP_PROC_SMAPS_SWAPPSS, smaps_flag && enabled);
struct timeval timestamp;
- PCPMetric_fetch(&timestamp);
+ if (PCPMetric_fetch(&timestamp) != true)
+ return;
double sample = this->timestamp;
this->timestamp = pmtimevalToReal(&timestamp);

© 2014-2024 Faster IT GmbH | imprint | privacy policy