1PMFIND(1)                   General Commands Manual                  PMFIND(1)
2
3
4

NAME

6       pmfind - find PCP services on the network
7

SYNOPSIS

9       pmfind [-CqrSV?]  [-m mechanism] [-s service] [-t timeout]
10

DESCRIPTION

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

OPTIONS

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       -V, --version
65            Display version number and exit.
66
67       -?, --help
68            Display usage message and exit.
69

MECHANISMS

71       Supported mechanisms for service discovery are:
72
73       avahi  Searches  for  services  which  are  broadcasting using mDNS via
74              avahi-daemon(8).  An optional suffix ",timeout=N" may  be  added
75              to  limit the amount of time waiting for the avahi-daemon.  N is
76              a floating point number specifying  the  number  of  seconds  to
77              wait.   The  default  is  0.5 seconds.  This timeout may also be
78              specified by  setting  the  environment  variable  AVAHI_DISCOV‐
79              ERY_TIMEOUT to the desired number of seconds.  If both are spec‐
80              ified, then the value  specified  in  the  environment  variable
81              takes precedence.
82
83       probe=<net-address>/<mask-bits>
84              Actively  probes  the  given  subnet  for the requested PCP ser‐
85              vice(s).  <net-address> is an Inet or IPv6 network  address  and
86              <mask-bits>  is  the  number  of bits used to define the subnet.
87              For example, 192.168.1.0/24 defines an 8 bit  subnet  consisting
88              of the addresses 192.168.1.0 through 192.168.1.255.  An optional
89              suffix ",maxThreads=N" may be  added  to  limit  the  number  of
90              threads used while probing.  The default is the value of FD_SET‐
91              SIZE (which is typically 1024) or the number of addresses in the
92              subnet,  whichever is less.  An optional suffix ",timeout=N" may
93              be added to limit the amount of time spent waiting for each con‐
94              nection  attempt.   N  is a floating point number specifying the
95              number of seconds to wait.  The default is 0.02 seconds (20 mil‐
96              liseconds).
97
98       shell  Probes  the  list of addresses provided by scripts for requested
99              PCP service(s).  Several  optional,  comma-separated  parameters
100              can  also  be provided.  The "path=DIR" option specifies the di‐
101              rectory where commands like pcp-kube-pods(1)  are  located  (de‐
102              faults  to $PCP_BINADM_DIR/discover/).  This setting can be fur‐
103              ther restricted to an individual command using  the  command=CMD
104              option,  but  the  default is to use all available commands from
105              the path.   The  "maxThreads=N"  option  limits  the  number  of
106              threads used while probing.  The default is the value of FD_SET‐
107              SIZE (which is typically 1024) or the number  of  addresses  re‐
108              turned  by  the scripts, whichever is less.  The "timeout=N" op‐
109              tion may be added to limit the amount of time spent waiting  for
110              each  connection attempt.  N is a floating point number specify‐
111              ing the number of seconds to wait.  The default is 0.02  seconds
112              (20 milliseconds).
113

SIGNALS

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

DIAGNOSTICS

121       The value of the exit status from the command  is  zero  when  services
122       were successfully located, one if no services were found, and two if an
123       error occurred.
124
125       In the event of an error a message will be generated on standard  error
126       that is intended to be self-explanatory.
127

FILES

129       $PCP_BINADM_DIR/discover
130            default path to address discovery scripts
131

PCP ENVIRONMENT

133       Environment variables with the prefix PCP_ are used to parameterize the
134       file and directory names used by PCP.  On each installation,  the  file
135       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
136       $PCP_CONF variable may be used to specify an alternative  configuration
137       file, as described in pcp.conf(5).
138

SEE ALSO

140       PCPIntro(1), pmcd(1), pmfind_check(1), pmie(1), pminfo(1), pmlogger(1),
141       pmproxy(1),  pmseries(1),  pcp-kube-pods(1),   PMAPI(3),   PMWEBAPI(3),
142       pmDiscoverServices(3), pcp.conf(5) and pcp.env(5).
143
144
145
146Performance Co-Pilot                  PCP                            PMFIND(1)
Impressum