PMDALABEL - Online Linux Manual PageSection : 3
Updated : PCP
Source : Performance Co-Pilot
NAMEpmdaLabel, pmdaSetLabelCallBack − fill pmdaLabelSet structures with metric labels
C SYNOPSIS#include <pcp/pmapi.h>
#include <pcp/pmda.h> int pmdaLabel(int ident, int type, pmLabelSet **sets, pmdaExt *pmda);
int pmdaSetLabelCallBack(pmdaInterface *dispatch, pmdaLabelCallBack callback); cc ... −lpcp_pmda −lpcp
DESCRIPTIONAs part of the Performance Metrics Domain Agent (PMDA) API (see PMDA(3)), pmdaLabel uses the standard PMDA(3) data structures to return the labels for performance domain, instance domain, metric or individual instances in "JSONB" format in the given sets data structure. The type argument determines the interpretation of ident and the requested form of label, as follows: PM_LABEL_DOMAIN when ident is a PMDA domain identifier, PM_LABEL_CLUSTER when ident is a metric identifier and labels for the cluster containing that metric are being requested. PM_LABEL_ITEM when ident is a metric identifier, PM_LABEL_INDOM when ident is an instance domain identifier, or PM_LABEL_INSTANCES when ident is a metric identifier and labels for all instances of that metric are being requested. The label sets pointer must be initialised to NULL before calling pmdaLabel and space is only to be allocated when labels are present and returned. In this case, the return code must indicate the number of label sets that have been allocated. This will only ever be greater than one in the PM_LABEL_INSTANCES case. This is one of the few generic callbacks in libpcp_pmda (see PMDA(3)) that is incomplete, requiring a further pmdaLabelCallBack method of its own. The additional callback should be registered using pmdaSetLabelCallBack and the pmdaLabelCallBack method has the following prototype: ¶int func(pmInDom indom, unsigned int inst, pmLabelSet **set)
¶.ftThe purpose of the pmdaLabelCallBack routine is to return the label(s) for an individual instance inst of a given instance domain, indom. Its successful return code differs significantly to pmdaLabel, as described below.
DIAGNOSTICSOn success pmdaLabel returns the number of label sets created. This is usually zero or one, except in the case of PM_LABEL_INSTANCES where more than one label sets will often be returned, one for each instance of the requested metric. By contrast, on success of the pmdaLabelCallBack routine the number of labels successfully added to the provided labelset pointer must be returned (and not the total number of label sets). If labels for the requested entity could not be obtained due to a catastrophic failure, such as an out of memory condition, these routines will return a negative error code.
CAVEATThe PMDA must be using PMDA_PROTOCOL_7 or later, as specified in the call to pmdaDSO(3) or pmdaDaemon(3).
SEE ALSOpminfo(1), malloc(3), PMAPI(3), PMDA(3), pmdaDaemon(3), pmdaDSO(3), pmdaInit(3) and pmLookupLabels(3). 0
Johanes Gumabo
Data Size : 10,554 byte
man-p___mdaLabel.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 199,140
Visitor ID : :
Visitor IP : 3.145.152.146 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.