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

# pmfind(1)

find PCP services on the network

## NAME

**pmfind** - find PCP services on the network

## SYNOPSIS

**pmfind** \[**-CqrSV?**\] \[**-D** *debug*\] \[**-m** *mechanism*\] \[**-s** *service*\] \[**-t** *timeout*\]

## DESCRIPTION

**pmfind** searches for instances of the specified PCP service being advertised on the network and prints a list of URLs corresponding to the services discovered. It can be used in conjunction with [**pmfind\_check**(1)](/pmfind_check/1.md) to automate the monitoring of remote PCP collector systems.

## OPTIONS

The available command line options are:

- **-C**, **--containers**

  Performs containers discovery as well, for each discovered [**pmcd**(1)](/pmcd/1.md) service.

- **-m** *mechanism*, **--mechanism**=*mechanism*

  This option sets the *mechanism* that **pmfind** uses when performing service discovery. By default, or if the keyword *all* is specified, every available mechanism will be used (iteratively). See the \`\`MECHANISMS'' section for a description of each available discovery mechanism.

- **-q**, **--quiet**

  This option suppresses all output on the standard output stream.

- **-r**, **--resolve**

  Requests that DNS name resolution be attempted for the addresses of any discovered services. The default is to display the network addresses of any discovered services.

- **-s** *service*, **--service**=*service*

  By default **pmfind** will search for all supported PCP services, however a specific PCP *service* to discover can be specified using the **-s** option. Supported services are [**pmcd**(1)](/pmcd/1.md), and [**pmproxy**(1)](/pmproxy/1.md).

- **-S**, **--sources**

  Reports source identifiers for each discovered [**pmcd**(1)](/pmcd/1.md) service. These identifiers are unique for each host, and are formed using the (non-optional) context labels available for every PCP collector. Because the discovery process will often identify multiple paths to an individual collector host, this option is an important part of the process of using **pmfind** in conjunction with [**pmfind\_check**(1)](/pmfind_check/1.md), to ensure only one [**pmie**(1)](/pmie/1.md) and/or [**pmlogger**(1)](/pmlogger/1.md) process is started for each discovered collector host. The source identifiers reported by **pmfind** are the same as the source identifiers reported by the [**pminfo**(1)](/pminfo/1.md) and [**pmseries**(1)](/pmseries/1.md) commands.

- **-t** *seconds*, **--timeout**=*seconds*

  Sets the maximum amount of time in *seconds* that **pmfind** will take before interrupting the service discovery. The *time* argument is a floating point number representing the number of seconds before timing out. The default is to take as much time as is needed to complete the process.

- **-V**, **--version**

  Display version number and exit.

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

  Display usage message and exit.

## MECHANISMS

Supported mechanisms for service discovery are:

- **probe=\<net-address\>/\<mask-bits\>**

  Actively probes the given subnet for the requested PCP service(s). **\<net-address\>** is an Inet or IPv6 network address and **\<mask-bits\>** is the number of bits used to define the subnet. For example, 192.168.1.0/24 defines an 8 bit subnet consisting of the addresses 192.168.1.0 through 192.168.1.255. An optional suffix **",maxThreads=N"** may be added to limit the number of threads used while probing. The default is the value of FD\_SETSIZE (which is typically 1024) or the number of addresses in the subnet, whichever is less. An optional suffix **",timeout=N"** may be added to limit the amount of time spent waiting for each connection attempt. N is a floating point number specifying the number of seconds to wait. The default is 0.02 seconds (20 milliseconds).

- **shell**

  Probes the list of addresses provided by scripts for requested PCP service(s). Several optional, comma-separated parameters can also be provided. The **"path=DIR"** option specifies the directory where commands like [**pcp-kube-pods**(1)](/pcp-kube-pods/1.md) are located (defaults to *$PCP\_BINADM\_DIR/discover/*). This setting can be further restricted to an individual command using the **command=CMD** option, but the default is to use all available commands from the **path**. The **"maxThreads=N"** option limits the number of threads used while probing. The default is the value of FD\_SETSIZE (which is typically 1024) or the number of addresses returned by the scripts, whichever is less. The **"timeout=N"** option may be added to limit the amount of time spent waiting for each connection attempt. N is a floating point number specifying the number of seconds to wait. The default is 0.02 seconds (20 milliseconds).

## SIGNALS

**pmfind** will interrupt the service discovery process when one of the following signals is received: SIGHUP, SIGPIPE, SIGINT, SIGTERM, SIGXFSZ, SIGXCPU. **pmfind** will report any results which were discovered up to point of the interruption.

## DIAGNOSTICS

The value of the exit status from the command is zero when services were successfully located, one if no services were found, and two if an error occurred.

In the event of an error a message will be generated on standard error that is intended to be self-explanatory.

## FILES

- *$PCP\_BINADM\_DIR/discover*

  default path to address discovery scripts

## 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).

## 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.

## SEE ALSO

[**PCPIntro**(1)](/PCPIntro/1.md), [**pmcd**(1)](/pmcd/1.md), [**pmfind\_check**(1)](/pmfind_check/1.md), [**pmie**(1)](/pmie/1.md), [**pminfo**(1)](/pminfo/1.md), [**pmlogger**(1)](/pmlogger/1.md), [**pmproxy**(1)](/pmproxy/1.md), [**pmseries**(1)](/pmseries/1.md), [**pcp-kube-pods**(1)](/pcp-kube-pods/1.md), [**PMAPI**(3)](/PMAPI/3.md), [**PMWEBAPI**(3)](/PMWEBAPI/3.md), [**pmDiscoverServices**(3)](/pmDiscoverServices/3.md), [**pcp.conf**(5)](/pcp.conf/5.md) and [**pcp.env**(5)](/pcp.env/5.md).
