PMPARSEMETRICSPEC - Online Linux Manual PageSection : 3
Updated : PCP
Source : Performance Co-Pilot
NAMEpmParseMetricSpec, pmFreeMetricSpec − uniform metric specification parser
C SYNOPSIS#include <pcp/pmapi.h> int pmParseMetricSpec(const char *string, int isarch, char *source, pmMetricSpec **rsltp, char **errmsg);
void pmFreeMetricSpec(pmMetricSpec *rslt); cc ... −lpcp
DESCRIPTIONpmParseMetricSpec accepts a string specifying the name of a PCP performance metric, and optionally the source (either a hostname or a PCP archive log filename) and instances for that metric. The syntax is described in PCPIntro(1). If neither host nor archive component of the metric specification is provided, the isarch and source arguments are used to fill in the returned pmMetricSpec structure. The pmMetricSpec structure that is returned via rsltp represents the parsed string and has the following declaration: typedef struct {
int isarch; /* source type: 0 -> live host, 1 -> archive, 2 -> local context */
char *source; /* name of source host or archive */
char *metric; /* name of metric */
int ninst; /* number of instances, 0 -> all */
char *inst[1]; /* array of instance names */
} pmMetricSpec;pmParseMetricSpec returns 0 if the given string was successfully parsed. In this case all the storage allocated by pmParseMetricSpec can be released by a single call to free(3) using the address returned from pmMetricSpec via rsltp. The convenience macro pmFreeMetricSpec is a thinly disguised wrapper for free(3). pmParseMetricSpec returns PM_ERR_GENERIC and a dynamically allocated error message string in errmsg, if the given string does not parse. Be sure to free(3) the error message string in this situation. In the case of an error, rsltp is undefined. In the case of success, errmsg is undefined. If rsltp->ninst" is 0, then rsltp->inst[0]" is undefined.
SEE ALSOPMAPI(3) and pmLookupName(3). 0
Johanes Gumabo
Data Size : 7,077 byte
man-p___mFreeMetricSpec.3Build : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 256,740
Visitor ID : :
Visitor IP : 3.143.7.112 :
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.29
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.