PMSERIESDESCS(3)
π PMSERIESDESCS β Library Functions Manual π
okay bestie, gather round, because this one is the time series metadata page and it's genuinely so good. this is section 3 of the library functions manual, and the whole vibe is: you want to know stuff about your metrics, not the metrics themselves. metadata era. π
β¨ NAME β¨
pmSeriesDescs, pmSeriesLabels, pmSeriesLabelValues, pmSeriesInstances, pmSeriesMetrics, pmSeriesSources β fast, scalable time series metadata π
π C SYNOPSIS π
#include <pcp/pmwebapi.h>
int pmSeriesDescs(pmSeriesSettings *sp, int count, sds *series,
void *arg);
int pmSeriesLabels(pmSeriesSettings *sp, int count, sds *series,
void *arg);
int pmSeriesLabelValues(pmSeriesSettings *sp, int count, sds *labels,
void *arg);
int pmSeriesInstances(pmSeriesSettings *sp, int count, sds *series,
void *arg);
int pmSeriesMetrics(pmSeriesSettings *sp, int count, sds *series,
void *arg);
int pmSeriesSources(pmSeriesSettings *sp, int count, sds *series,
void *arg);
cc ... -lpcp_web
link it with -lpcp_web and you're literally set π«Ά
π DESCRIPTION π
so every single performance metric and data source that's part of the Performance Co-Pilot (PCP) fast, scalable time series service comes with certain properties attached β that's the metadata. and you can go query all of it with the interfaces down below. it's giving β¨ receipts β¨.
this whole thing runs on asynchronous APIs, meaning it's event-driven: a callback gets invoked for each metadata structure that comes back at you. no blocking, no waiting around, she's busy. π
πΈ the general pattern
as a general pattern, every interface in these APIs that needs to invoke callbacks provided by the calling program (peep pmSeriesSetup(3)) takes an opaque void * parameter, arg. that pointer gets passed straight through, unchanged, and it's typically used to reach a data structure that holds state inside your calling program. so like, your little carry-on bag π.
πΌ the two modes
with a couple of exceptions, these interfaces operate in one of two modes:
- one invocation queries metadata for a specific (non-zero)
countof time series. - a second mode β
countof zero β returns all available metadata of that type, across all time series. everything. the whole closet. π
π¦ pmSeriesDescs
to grab metric descriptor info for one or more time series, you use pmSeriesDescs. for each valid series identifier you hand over, a callback fires giving you the metric units, semantics, and type, plus the other identifiers associated with it (pmID, InDom and source identifier). when you issue this call with a count of zero, it's an error to pass a zero or negative value of count into this interface.
β οΈ bestie. fr fr.pmSeriesDescsdoes not do the zero-count "give me everything" mode. zero or negativecount= error. periodt.
π pmSeriesLabels
to pull label names and values, that's pmSeriesLabels. with a non-zero count of valid series identifiers, this routine invokes a callback once for each label name and once for each label name:value pair, for the labels attached to those time series. if you call it with a count of zero, it returns β via the label name callback β all label names observed to date, not associated with any specific time series.
π§ pmSeriesLabelValues
pmSeriesLabelValues is comparable to that latter mode, except it returns all label values that have been observed to date for the given array of labels names β and again, not associated with any specific time series identifiers. π«§
π pmSeriesInstances
pmSeriesInstances finds metadata about instance domains and instance identifiers associated with a given (non-zero) count of time series identifiers. if you pass a count of zero, then all instance names observed to date get returned. π«
π pmSeriesMetrics
pmSeriesMetrics finds metric names associated with a given (non-zero) count of time series identifiers. if you pass a count of zero, then all metric names observed to date get returned. slay.
β pmSeriesSources
pmSeriesSources finds metadata about the source of metrics β that is, host names and archive file paths. if you pass a count of zero, then all metric sources observed to date get returned. iconic.
π DIAGNOSTICS π
wherever these functions return a status code, it's always zero on success. on failure you get a negative PMAPI error code. that's it, that's the whole mood. no cap.
π SEE ALSO π
go read them, bestie, they're all bangers π
mwah π this page came to you from Performance Co-Pilot (that's the PCP girlies), and yeah, the date and the whole footer situation β consider it stamped and signed, PMSERIESDESCS(3) through and through.
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2019-2020 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms