---
name: "pcp.env"
section: "5"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pcp.env"
---

# pcp.env(5)

script to set Performance Co-Pilot run-time environment variables

## NAME

**pcp.env** - script to set Performance Co-Pilot run-time environment variables

## SYNOPSIS

*/etc/pcp.env*

## DESCRIPTION

The *pcp.env* script is sourced by assorted Performance Co-Pilot (PCP) scripts and utilities to define the PCP operating environment variables. The conjugate for executable programs using the PCP libraries is the [*pmGetConfig*(3)](/pmGetConfig/3.md) function.

Typical usage of *pcp.env* in a script is as follows :

-

    \#! /bin/sh

    \# source the PCP environment variables\
     . /etc/pcp.env\
     rest of script ...

The full syntax and semantics of the *pcp.conf* file and the *pmGetConfig* function are described in their respective reference pages.

If the file *$HOME/.pcp/pcp.conf* exists then this will be processed after the system-wide *pcp.conf* file. This provides a mechanism to selectively modify or augment the environment settings for PCP scripts, which maybe useful if the scripts are run with **sudo**(1) which cleans the environment of important settings that are required to ensure the correct execution of the PCP scripts, e.g. **$PATH** or **$PERL5LIB**.

## ENVIRONMENT

The **PCP\_CONF** environment variable specifies an alternative path to the *pcp.conf* file.

## SEE ALSO

[**PCPIntro**(1)](/PCPIntro/1.md), **sudo**(1), [**PCPIntro**(3)](/PCPIntro/3.md), [**PMAPI**(3)](/PMAPI/3.md), [**pmGetConfig**(3)](/pmGetConfig/3.md) and [**pcp.conf**(5)](/pcp.conf/5.md).
