1PMFIND(1) General Commands Manual PMFIND(1)
2
3
4
6 pmfind - find PCP services on the network
7
9 pmfind [-CqrS?] [-m mechanism] [-s service] [-t timeout]
10
12 pmfind searches for instances of the specified PCP service being adver‐
13 tised on the network and prints a list of URLs corresponding to the
14 services discovered. It can be used in conjunction with
15 pmfind_check(1) to automate the monitoring of remote PCP collector sys‐
16 tems.
17
19 The available command line options are:
20
21 -C, --containers
22 Performs containers discovery as well, for each discovered pmcd(1)
23 service.
24
25 -m mechanism, --mechanism=mechanism
26 This option sets the mechanism that pmfind uses when performing
27 service discovery. By default, or if the keyword all is speci‐
28 fied, every available mechanism will be used (iteratively). See
29 the ``MECHANISMS'' section for a description of each available
30 discovery mechanism.
31
32 -q, --quiet
33 This option suppresses all output on the standard output stream.
34
35 -r, --resolve
36 Requests that DNS name resolution be attempted for the addresses
37 of any discovered services. The default is to display the network
38 addresses of any discovered services.
39
40 -s service, --service=service
41 By default pmfind will search for all supported PCP services, how‐
42 ever a specific PCP service to discover can be specified using the
43 -s option. Supported services are pmcd(1), and pmproxy(1).
44
45 -S, --sources
46 Reports source identifiers for each discovered pmcd(1) service.
47 These identifiers are unique for each host, and are formed using
48 the (non-optional) context labels available for every PCP collec‐
49 tor. Because the discovery process will often identify multiple
50 paths to an individual collector host, this option is an important
51 part of the process of using pmfind in conjunction with
52 pmfind_check(1), to ensure only one pmie(1) and/or pmlogger(1)
53 process is started for each discovered collector host. The source
54 identifiers reported by pmfind are the same as the source identi‐
55 fiers reported by the pminfo(1) and pmseries(1) commands.
56
57 -t seconds, --timeout=seconds
58 Sets the maximum amount of time in seconds that pmfind will take
59 before interrupting the service discovery. The time argument is a
60 floating point number representing the number of seconds before
61 timing out. The default is to take as much time as is needed to
62 complete the process.
63
64 -?, --help
65 Display usage message and exit.
66
68 Supported mechanisms for service discovery are:
69
70 avahi Searches for services which are broadcasting using mDNS via
71 avahi-daemon(8). An optional suffix ",timeout=N" may be added
72 to limit the amount of time waiting for the avahi-daemon. N is
73 a floating point number specifying the number of seconds to
74 wait. The default is 0.5 seconds. This timeout may also be
75 specified by setting the environment variable AVAHI_DISCOV‐
76 ERY_TIMEOUT to the desired number of seconds. If both are spec‐
77 ified, then the value specified in the environment variable
78 takes precedence.
79
80 probe=<net-address>/<mask-bits>
81 Actively probes the given subnet for the requested PCP ser‐
82 vice(s). <net-address> is an Inet or IPv6 network address and
83 <mask-bits> is the number of bits used to define the subnet.
84 For example, 192.168.1.0/24 defines an 8 bit subnet consisting
85 of the addresses 192.168.1.0 through 192.168.1.255. An optional
86 suffix ",maxThreads=N" may be added to limit the number of
87 threads used while probing. The default is the value of FD_SET‐
88 SIZE (which is typically 1024) or the number of addresses in the
89 subnet, whichever is less. An optional suffix ",timeout=N" may
90 be added to limit the amount of time spent waiting for each con‐
91 nection attempt. N is a floating point number specifying the
92 number of seconds to wait. The default is 0.02 seconds (20 mil‐
93 liseconds).
94
95 shell Probes the list of addresses provided by scripts for requested
96 PCP service(s). Several optional, comma-separated parameters
97 can also be provided. The "path=DIR" option specifies the
98 directory where commands like pcp-kube-pods(1) are located
99 (defaults to $PCP_BINADM_DIR/discover/). This setting can be
100 further restricted to an individual command using the com‐
101 mand=CMD option, but the default is to use all available com‐
102 mands from the path. The "maxThreads=N" option limits the num‐
103 ber of threads used while probing. The default is the value of
104 FD_SETSIZE (which is typically 1024) or the number of addresses
105 returned by the scripts, whichever is less. The "timeout=N"
106 option may be added to limit the amount of time spent waiting
107 for each connection attempt. N is a floating point number spec‐
108 ifying the number of seconds to wait. The default is 0.02 sec‐
109 onds (20 milliseconds).
110
112 pmfind will interrupt the service discovery process when one of the
113 following signals is received: SIGHUP, SIGPIPE, SIGINT, SIGTERM,
114 SIGXFSZ, SIGXCPU. pmfind will report any results which were discovered
115 up to point of the interruption.
116
118 The value of the exit status from the command is zero when services
119 were successfully located, one if no services were found, and two if an
120 error occurred.
121
122 In the event of an error a message will be generated on standard error
123 that is intended to be self-explanatory.
124
126 $PCP_BINADM_DIR/discover
127 default path to address discovery scripts
128
130 Environment variables with the prefix PCP_ are used to parameterize the
131 file and directory names used by PCP. On each installation, the file
132 /etc/pcp.conf contains the local values for these variables. The
133 $PCP_CONF variable may be used to specify an alternative configuration
134 file, as described in pcp.conf(5).
135
137 PCPIntro(1), pmcd(1), pmfind_check(1), pmie(1), pminfo(1), pmlogger(1),
138 pmproxy(1), pmseries(1), pcp-kube-pods(1), PMAPI(3), PMWEBAPI(3),
139 pmDiscoverServices(3), pcp.conf(5) and pcp.env(5).
140
141
142
143Performance Co-Pilot PCP PMFIND(1)