PMFIND(1)

πŸ’… pmfind β€” find PCP services on the network

okay bestie, so this is pmfind(1), a General Commands Manual page from Performance Co-Pilot (PCP, you know her, you love her) πŸ’–


✨ NAME ✨

pmfind β€” find PCP services on the network πŸ¦‹


🌸 SYNOPSIS 🌸

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

πŸ’œ DESCRIPTION πŸ’œ

so like. pmfind goes out into the network and searches for instances of whatever PCP service you asked for β€” the ones being advertised out there β€” and then it prints you a list of URLs corresponding to the services it discovered. that's the whole vibe. πŸ’…

and here's the iconic part: you can run it alongside pmfind_check(1) to automate the monitoring of remote PCP collector systems. dynamic duo energy fr fr πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

the available command line options are, and yes we're doing all of them, no skipping:

  • -C, --containers β€” also does containers discovery, for each pmcd(1) service it discovers. two-for-one, slay ✨
  • -m mechanism, --mechanism=mechanism β€” sets the mechanism pmfind uses when it's doing service discovery. by default, or if you pass the keyword all, every available mechanism gets used (iteratively, one after another, no skipping). peep the MECHANISMS section below for the deets on each one 🧚
  • -q, --quiet β€” suppresses ALL output on the standard output stream. shhh. silence. main character staying mysterious πŸ’€
  • -r, --resolve β€” asks for DNS name resolution to be attempted for the addresses of any discovered services. the default behavior is to just display the network addresses of discovered services, no name translation 🫢
  • -s service, --service=service β€” by default pmfind searches for all supported PCP services, but if you want a specific PCP service discovered, use -s for that. supported services are pmcd(1) and pmproxy(1) πŸ“
  • -S, --sources β€” reports source identifiers for each discovered pmcd(1) service. these identifiers are unique for each host and are formed using the (non-optional!) context labels available for every PCP collector. here's why this matters, bestie: the discovery process will often identify multiple paths to an individual collector host, so this option is a super important part of using pmfind in conjunction with pmfind_check(1) β€” it makes sure only one pmie(1) and/or pmlogger(1) process gets started for each discovered collector host. the source identifiers reported by pmfind are the same ones reported by the pminfo(1) and pmseries(1) commands. consistency queen πŸ‘‘
  • -t seconds, --timeout=seconds β€” sets the maximum amount of time in seconds that pmfind will take before it interrupts the service discovery. the time argument is a floating point number representing the number of seconds before timing out. default is to take as much time as is needed to complete the process (no cap, patient queen 🌸)
  • -V, --version β€” display version number and exit. short and sweet πŸ’…
  • -?, --help β€” display usage message and exit. when in doubt, ask for help 🫢

πŸ”₯ 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 also be added to limit the amount of time spent waiting for each connection attempt, where N is a floating point number specifying the number of seconds to wait β€” default is 0.02 seconds (20 milliseconds). ok that's a lot of numbers but you got this πŸ’ͺ
  • 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) 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.

and the good news? pmfind will report any results which were discovered up to the point of the interruption. it's not gonna ghost you with zero info 😭🫢


πŸ’€ DIAGNOSTICS πŸ’€

the value of the exit status from the command is:

  • zero when services were successfully located ✨
  • one if no services were found πŸ™ˆ
  • 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. (intended. bestie. intended.)


πŸ¦‹ 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). so many configs, so little time ✨


πŸ‘‘ DEBUGGING OPTIONS πŸ‘‘

the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems β€” although ngl, the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. it's giving insider knowledge, iykyk πŸ’…

debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning.

heads up bestie: the debug output is cryptic on purpose. if you're not a dev, this is lowkey not your lane πŸ™ˆ

🌟 SEE ALSO 🌟

PCPIntro(1), pmcd(1), pmfind_check(1), pmie(1), pminfo(1), pmlogger(1), pmproxy(1), pmseries(1), pcp-kube-pods(1), PMAPI(3), PMWEBAPI(3), pmDiscoverServices(3), pcp.conf(5) and pcp.env(5).


that's the whole page, no cap πŸ’…βœ¨ this one came to you from Performance Co-Pilot (that's the source, that's the version β€” PCP, the one and only πŸ‘‘), and honestly? she ate. go find some services, bestie πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from