NAME

       pmGetConfig  -  return  Performance Co-Pilot configuration
       variable


C SYNOPSIS

       #include <pcp/pmapi.h>

       char *pmGetConfig(const char *variable)

       cc ... -lpcp


DESCRIPTION

       The pmGetConfig function searches for  variable  first  in
       the environment and then, if not found, in the Performance
       Co-Pilot (PCP) configuration file and returns  the  string
       result.  If variable is not already in the environment, it
       is added with a call to putenv(3) before returning.

       The default location of  the  PCP  configuration  file  is
       /etc/pcp.conf  but this may be changed by setting PCP_CONF
       in the environment to a  new  location,  as  described  in
       pcp.conf(4).


RETURN VALUE

       If variable is not found in either the environment nor the
       PCP configuration file (or the PCP configuration  file  is
       not  found  and  PCP_CONF  is not set in the environment),
       then a fatal error message is printed and the process will
       exit(2).   Although  this  sounds  drastic, it is the only
       course of action  available  because  the  PCP  configura­
       tion/installation is fatally flawed.

       If  this  function returns, the returned value points to a
       string in the environment and so  changing  it  is  a  bad
       idea.    This  function  returns  the  same  type  as  the
       getenv(3) function (which should probably be a const  char
       *).


PCP ENVIRONMENT

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


SEE ALSO

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

       This manual page originated from an earlier release of PCP
       for IRIX.  Although some porting  effort  has  been  made,
       there  may  be some remaining inconsistencies with PCP for
       Linux (and for other operating systems).  When this  docu­
       mentation is updated, this caveat will be removed.


Man(1) output converted with man2html