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

# pmproxy(1)

proxy for performance metrics collector and querying

## NAME

**pmproxy** - proxy for performance metrics collector and querying

## SYNOPSIS

**pmproxy** \[**-AdfFt?**\] \[**-c** *conffile*\] \[**-D** *debug*\] \[**-h** *host*\[,*host* ...\] \[**-i** *ipaddress*\] \[**-l** *logfile*\] \[**-L** *bytes*\] \[**-p** *port*\[,*port* ...\] \[**-r** *port*\[,*port* ...\] \[**-s** *sockname*\] \[**-U** *username*\] \[**-x** *outfile*\]

## DESCRIPTION

**pmproxy** acts as a protocol proxy, allowing Performance Co-Pilot (PCP) monitoring clients to connect to one or more [**pmcd**(1)](/pmcd/1.md) and/or key-value servers (such as **https://valkey.io/**) indirectly.

In its default mode of operation **pmproxy** provides the REST API for PCP services (see [**PMWEBAPI**(3)](/PMWEBAPI/3.md) for details). This includes provision of an Open Metrics - *https://openmetrics.io* - text interface for PCP metrics at */metrics*, real-time access to PCP metrics through the */pmapi* interfaces, and access to the fast, scalable PCP time series query capabilities offered in conjunction with a key-value server (see [**pmseries**(1)](/pmseries/1.md) for details) via the */query* REST interfaces.

**pmproxy** can be deployed in a firewall domain, or on a cluster \`\`head'' node where the IP (Internet Protocol) address of the hosts where **pmcd** and/or a key-value server (such as **https://valkey.io/**) are running may be unknown to the PCP monitoring clients, but where the IP address of the host running **pmproxy** is known to these clients. Similarly, the clients may have network connectivity only to the host where **pmproxy** is running, while there is network connectivity from that host to the hosts of interest where **pmcd** and/or a key-value server are running.

The behaviour of the PCP monitoring clients is controlled by either the **PMPROXY\_HOST** environment variable or through the extended hostname specification (see [**PCPIntro**(1)](/PCPIntro/1.md) for details). If neither of these mechanisms is used, clients will make their [**PMAPI**(3)](/PMAPI/3.md) connections directly to **pmcd**. If the proxy hostname syntax is used or **PMPROXY\_HOST** is set, then this should be the hostname or IP address of the system where **pmproxy** is running, and the clients will connect to **pmcd** or a key-value server indirectly through the protocol proxy services of **pmproxy.**

## OPTIONS

The available command line options are:

- **-A**

  Disable service advertisement. By default, **pmproxy** will advertise its presence on the network using any available mechanisms, assisting remote monitoring tools with finding it. These mechanisms are disabled with this option.

- **-c** *conffile*, **--config**=*conffile*

  Specify the path to an optional configuration *conffile*, with format as described in the \`\`CONFIGURATION'' section. This option implies **pmproxy** is running in **timeseries** mode.

- **-d**, **--deprecated**

  By default **pmproxy** prefers to run in the new **timeseries** mode, providing REST APIs, asynchronous network I/O, scalable time series, and secure connections using OpenSSL. However, legacy deployments may wish to use the original synchronous **pmproxy** implementation using libpcp networking; this can be achieved using this option. Note that the **-d** and **-t** options are mutually exclusive.

- **-f**, **--foreground**

  By default **pmproxy** is started as a daemon. The **-f** option indicates that it should run in the foreground. This is most useful when trying to diagnose problems with establishing connections.

- **-F**, **--managed**

  Like **-f**, the **-F** option runs **pmproxy** in the foreground, but also does some housekeeping (like create a \`\`pid'' file and change user id).  This is intended for use when **pmproxy** is launched from [**systemd**(1)](/systemd/1.md) or **launchd**(1) and the daemonising has already been done by [**systemd**(1)](/systemd/1.md) or **launchd**(1) and does not need to be done again by **pmproxy**, which is the case when neither **-f** nor **-F** is specified.

  At most one of **-f** and **-F** may be specified.

- **-h** *host*, **--keyhost**=*host*

  Specify an alternate key-value server *host* to connect to for time series querying, overriding any configuration file settings. This option implies **pmproxy** is running in **timeseries** mode.

- **-i** *ipaddress*, **--interface**=*ipaddress*

  This option is usually only used on hosts with more than one network interface (very common for firewall and \`\`head'' node hosts where **pmproxy** is likely to be deployed to arbitrate access to an internal network). If no **-i** options are specified **pmproxy** accepts PCP client connections on any of its host's IP addresses. The **-i** option is used to specify explicitly an IP address that PCP client connections should be accepted on. *ipaddress* should be in the standard dotted form (e.g. 100.23.45.6). The **-i** option may be used multiple times to define a list of IP addresses. When one or more **-i** options is specified, attempted connections made on any other IP addresses will be refused.

- **-l** *logfile*, **--log**=*logfile*

  By default a log file named *pmproxy.log* is written in the current directory. The **-l** option causes the log file to be written to a given *logfile* instead of the default. If this *logfile* cannot be created or is not writable, output is written to the standard error instead.

- **-L** *bytes*

  *PDU*s received by **pmproxy** from PCP monitoring clients are restricted to a maximum size of 65536 bytes by default to defend against Denial of Service attacks. The **-L** option may be used to change the maximum incoming *PDU* size.

- **-p** *port*, **--port**=*port*

  Specify an alternate *port* number to listen on for client connections. The default value is 44322.

- **-Q**, **--certreqd**

  Require that all client connections provide a trusted client certificate.

- **-r** *port*, **--keyport**=*port*

  Specify an alternate key-value server *port* number to connect to for time series querying, overriding any configuration file settings. This option implies **pmproxy** is running in **timeseries** mode.

- **-s** *sockname*, **--socket**=*sockname*

  Specify the path to a local unix domain socket (for platforms supporting this socket family only). The default value is *$PCP\_RUN\_DIR/pmproxy.socket*. This option implies **pmproxy** is running in **timeseries** mode.

- **-S**, **--reqauth**

  Require that all client connections be authenticated.

- **-t**, **--timeseries**

  Operate in automatic archive timeseries discovery mode. This mode of operation will enable the [**PMWEBAPI**(3)](/PMWEBAPI/3.md) REST APIs, dynamically and automatically detect active system archives being written by [**pmlogger**(1)](/pmlogger/1.md) and import them into a key-value server (such as **https://valkey.io/**), for fast, scalable time series querying described in [**pmseries**(1)](/pmseries/1.md). Note that in this mode of operation, **pmproxy** only "log-tails" and ingests actively growing archives, e.g. as written by one or more [**pmlogger**(1)](/pmlogger/1.md) instances. When an archive is first discovered (usually but not limited to **pmproxy** startup), all metadata is loaded and sent to the configured key-value server however note that only **new** archive metric value data from the tail end of each archive is ingested. Compressed archives never grow and so are ignored. See the **--load** option to [**pmseries**(1)](/pmseries/1.md) for a supported mechanism for manually loading all of the metric value data from previously collected (inactive) archives, whether compressed or not. It would be normal, though not mandated, for a set of archives being manually loaded to cover the same time period, e.g. archive data for a particular week for one or more hosts in the same data-centre.

- **-U** *username*, **--username**=*username*

  Assume the identity of the given *username* before starting to accept incoming packets from PCP monitoring clients.

- **-x** *outfile*

  Before the **pmproxy** *logfile* can be opened, **pmproxy** may encounter a fatal error which prevents it from starting. By default the output describing this error is sent to **/dev/tty** but it may redirected to *outfile*.

- **-?**, **--help**

  Display usage message and exit.

## CONFIGURATION

When running in the **timeseries** mode of operation, runtime configuration is relatively complex and typically handled via the *$PCP\_SYSCONF\_DIR/pmproxy/pmproxy.conf* file. This file is in the common \`\`ini'' format, with section headers and individual variables and values with each section. The configuration file installed as part of PCP documents every available section and option.

At a high level, the *\[pmproxy\]* section can be used to explicitly enable or disable each of the different protocols.

The *\[http\]* section provides fine-tuning over HTTP server settings used by **pmproxy.** *chunksize* sets the chunked transfer encoding buffer size, and defaults to the system pagesize. Access control HTTP protocol settings can be adjusted using the *Access-Control-Allow-Headers* and *Access-Control-Max-Age* options. Discussion of these HTTP protocol headers is beyond the scope of this document, but suitable default values are described within the *pmproxy.conf* configuration file.

The *\[keys\]* section allows connection information for one or more backing key-value server processes to be configured (hostnames and ports). Note to access multiple (scalable) key-value servers, the *servers* variable in this section can be a comma-separated list of hostname:port pairs. Alternatively, it can be a single key-value server host that will be queried using the "CLUSTER INFO" command to automatically configure multiple backing hosts.

In earlier versions of PCP (before 6) an alternative configuration setting section was used for this purpose - key-value *servers* were specified in the *\[pmseries\]* section and this is still accepted as a fallback for backwards compatibility.

## STARTING AND STOPPING PMPROXY

Normally, **pmproxy** is started automatically at boot time and stopped when the system is being brought down. Under certain circumstances it is necessary to start or stop **pmproxy** manually. To do this one must become superuser and type

`# $PCP_RC_DIR/pmproxy start`

to start **pmproxy**, or

`# $PCP_RC_DIR/pmproxy stop`

to stop **pmproxy**. Starting **pmproxy** when it is already running is the same as stopping it and then starting it again.

Normally **pmproxy** listens for PCP client connections on TCP/IP port number 44322 (as well as 44323 with **timeseries** enabled) registered at **https://www.iana.org/**. Either the environment variable **PMPROXY\_PORT** or the **-p** command line option may be used to specify alternative port number(s) when **pmproxy** is started; in each case, the specification is a comma-separated list of one or more numerical port numbers. Should both methods be used or multiple **-p** options appear on the command line, **pmproxy** will listen on the union of the set of ports specified via all **-p** options and the **PMPROXY\_PORT** environment variable. If non-default ports are used with **pmproxy** care should be taken to ensure that **PMPROXY\_PORT** is also set in the environment of any client application that will connect to **pmproxy**, or that the extended host specification syntax is used (see [**PCPIntro**(1)](/PCPIntro/1.md) for details).

## DIAGNOSTICS

If **pmproxy** is already running the message "Error: OpenRequestSocket bind: Address already in use" will appear. This may also appear if **pmproxy** was shutdown with an outstanding request from a client. In this case, a request socket has been left in the TIME\_WAIT state and until the system closes it down (after some timeout period) it will not be possible to run **pmproxy**.

In addition to the standard **PCP** debugging options, see [**pmdbg**(1)](/pmdbg/1.md), **pmproxy** currently supports the debugging option **context** for tracing client connections and disconnections.

## FILES

- *$PCP\_PMPROXYOPTIONS\_PATH*

  command line options for **pmproxy** when launched from **$PCP\_RC\_DIR/pmproxy** All the command line option lines should start with a hyphen as the first character.

- *$PCP\_SYSCONFIG\_DIR/pmproxy*

  Environment variables that will be set when **pmproxy** executes. Only settings of the form "PMPROXY\_VARIABLE=value" will be honoured.

- *./pmproxy.log*

  (or **$PCP\_LOG\_DIR/pmproxy/pmproxy.log** when started automatically)\
   All messages and diagnostics are directed here

- */etc/pki/tls*

  default OpenSSL certificate database directory, optionally used for Secure Socket Layer connection in **timeseries** mode of operation. These certificates can be created and queried using the **openssl** tool, amongst others.

## ENVIRONMENT

In addition to the PCP environment variables described in the **PCP ENVIRONMENT** section below, there are several environment variables that influence the interactions between a PCP monitoring client, **pmproxy** and **pmcd**.

- **PMCD\_PORT**

  For the PCP monitoring client this (or the default port number) is passed to **pmproxy** and used to connect to **pmcd**. In the environment of **pmproxy** **PMCD\_PORT is not used.**

- **PMPROXY\_HOST**

  For the PCP monitoring client this is the hostname or IP address of the host where **pmproxy** is running. In recent versions of PCP (since version 3) this has been superseded by the extended hostname syntax (see [**PCPIntro**(1)](/PCPIntro/1.md) for details).

- **PMPROXY\_PORT**

  For the PCP monitoring client this is the port on which **pmproxy** will accept connections. The default is 44322, as well as 44323 with **timeseries** enabled.

- **PMCD\_CONNECT\_TIMEOUT**, **PMCD\_RECONNECT\_TIMEOUT** and **PMCD\_REQUEST\_TIMEOUT**

  (see [**PCPIntro**(1)](/PCPIntro/1.md)) For the PCP monitoring client, setting these environment variables will modify the timeouts used for interactions between the client and **pmproxy** (independent of which **pmcd** is being used). For **pmproxy** these same environment variables control the timeouts between **pmproxy** and all [**pmcd**(1)](/pmcd/1.md) instances (independent of which monitoring client is involved).

If set to the value 1, the **PMPROXY\_LOCAL** environment variable will cause **pmproxy** to run in a localhost-only mode of operation, where it binds only to the loopback interface.

The **PMPROXY\_MAXPENDING** variable can be set to indicate the maximum length to which the queue of pending client connections may grow.

## 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**(5)](/pcp.conf/5.md).

For environment variables affecting PCP tools, see [**pmGetOptions**(3)](/pmGetOptions/3.md).

## DEBUGGING OPTIONS

The **-D** or **--debug** option enables the output of additional diagnostics on *stderr* to help triage problems, although the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. *debug* is a comma separated list of debugging options; use [**pmdbg**(1)](/pmdbg/1.md) with the **-l** option to obtain a list of the available debugging options and their meaning.

Debugging options specific to **pmproxy** are as follows:

| | |
| --- | --- |
| Option | Description |
| appl0 | client connections and disconnections |
| appl1 | desperate logging mode, where a period followed by the PID of **pmproxy** is inserted in the name of *Rlogfile* before the last period, so for example pmproxy.log becomes pmproxy.\<pid\>.log |
| appl2 | log incoming HTTP URLs (this is also enabled by the **http** debugging option, but the latter has broader scope because it turns on debugging in the libraries that **pmproxy** uses) |

## SEE ALSO

[**PCPIntro**(1)](/PCPIntro/1.md), [**pmcd**(1)](/pmcd/1.md), [**pmdbg**(1)](/pmdbg/1.md), [**pmlogger**(1)](/pmlogger/1.md), [**pmseries**(1)](/pmseries/1.md), [**PMAPI**(3)](/PMAPI/3.md), [**PMWEBAPI**(3)](/PMWEBAPI/3.md), [**pmGetOptions**(3)](/pmGetOptions/3.md), [**pcp.conf**(5)](/pcp.conf/5.md) and [**pcp.env**(5)](/pcp.env/5.md).
