1PMGETCONFIG(3)             Library Functions Manual             PMGETCONFIG(3)
2
3
4

NAME

6       pmGetConfig - return Performance Co-Pilot configuration variable
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       char *pmGetConfig(const char *variable)
12
13       cc ... -lpcp
14

DESCRIPTION

16       The pmGetConfig function searches for variable first in the environment
17       and then, if not found, in the Performance Co-Pilot (PCP) configuration
18       file  and returns the string result.  If variable is not already in the
19       environment, it is added with a call to putenv(3) before returning.
20
21       The default location of the PCP configuration file is /etc/pcp.conf but
22       this  may  be  changed  by setting PCP_CONF in the environment to a new
23       location, as described in pcp.conf(4).
24

RETURN VALUE

26       If variable is not found in either the environment nor the PCP configuā€
27       ration file (or the PCP configuration file is not found and PCP_CONF is
28       not set in the environment), then a fatal error message is printed  and
29       the process will exit(2).  Although this sounds drastic, it is the only
30       course of action available because the  PCP  configuration/installation
31       is fatally flawed.
32
33       If  this function returns, the returned value points to a string in the
34       environment and so changing it is a bad idea.   This  function  returns
35       the  same  type  as  the getenv(3) function (which should probably be a
36       const char *).
37

PCP ENVIRONMENT

39       Environment variables with the prefix PCP_ are used to parameterize the
40       file  and  directory names used by PCP.  On each installation, the file
41       /etc/pcp.conf contains the  local  values  for  these  variables.   The
42       $PCP_CONF  variable may be used to specify an alternative configuration
43       file, as described in pcp.conf(4).  Values for these variables  may  be
44       obtained programatically using the pmGetConfig(3) function.
45

SEE ALSO

47       PCPIntro(1),  exit(2),  PMAPI(3),  getenv(3C), putenv(3C), pcp.conf(4),
48       pcp.env(4) and environ(5).
49

DOCUMENTATION CAVEAT

51       This manual page originated from an earlier release of  PCP  for  IRIX.
52       Although some porting effort has been made, there may be some remaining
53       inconsistencies with PCP for Linux (and for other  operating  systems).
54       When this documentation is updated, this caveat will be removed.
55
56
57
58Performance Co-Pilot                  SGI                       PMGETCONFIG(3)
Impressum