1PMLOGGER(1) General Commands Manual PMLOGGER(1)
2
3
4
6 pmlogger - create an archive for performance metrics
7
9 pmlogger [-CLNoPruy?] [-c conffile] [-d directory] [-h host] [-H host‐
10 name] [-I version] [-K spec] [-l logfile] [-m note] [-n pmnsfile] [-p
11 pid] [-s endsize] [-t interval] [-T endtime] [-U username] [-v volsize]
12 [-V version] [-x fd] archive
13
15 pmlogger creates the archives of performance metric values that may be
16 ``played back'' by other Performance Co-Pilot (see PCPIntro(1)) tools.
17 These logs form the basis of the VCR paradigm and retrospective perfor‐
18 mance analysis services common to the PCP toolkit.
19
20 The mandatory argument archive is the base name for the physical files
21 that constitute an archive. The archive argument may contain strf‐
22 time(3) meta-characters, which will be substituted prior to creating
23 the archive files. When pmlogger is run as a service (see pmlog‐
24 ger_daily(1)), the standard archive base name template is %Y%m%d.%H.%M.
25
26 The -V option specifies the version for the archive that is generated.
27 By default the archive version $PCP_ARCHIVE_VERSION (set to 2 in cur‐
28 rent PCP releases) is used, and the only values currently supported for
29 version are 2 or 3.
30
31 Unless directed to another host by the -h option or when directly using
32 PMDAs via the -o option, pmlogger will contact the Performance Metrics
33 Collector Daemon (PMCD) on the local host and use that as the source of
34 the metric values to be logged.
35
36 To support the required flexibility and control over what is logged and
37 when, pmlogger maintains an independent two level logging state for
38 each instance of each performance metric. At the first (mandatory)
39 level, logging is allowed to be on (with an associated interval between
40 samples), or off or maybe. In the latter case, the second (advisory)
41 level logging is allowed to be on (with an associated interval between
42 samples), or off.
43
44 The mandatory level allows universal specification that some metrics
45 must be logged, or must not be logged. The default state for all in‐
46 stances of all metrics when pmlogger starts is mandatory maybe and ad‐
47 visory off.
48
49 Use pmlc(1) to interrogate and change the logging state once pmlogger
50 is running.
51
52 If a metric's state is mandatory (on or off) and a request is made to
53 change it to mandatory maybe, the new state is mandatory maybe and ad‐
54 visory off. If a metric's state is already advisory (on or off) and a
55 request is made to change it to mandatory maybe, the current state is
56 retained.
57
58 It is not possible for pmlogger to log specific instances of a metric
59 and all instances of the same metric concurrently. If specific in‐
60 stances are being logged and a request to log all instances is made,
61 then all instances of the metric will be logged according to the new
62 request, superseding any prior logging request for the metric. A re‐
63 quest to log all instances of a metric will supersede any previous re‐
64 quest to log all instances. A request to log specific instances of a
65 metric when all instances are already being logged is refused. To do
66 this one must turn off logging for all instances of the metric first.
67 In each case, the validity of the request is checked first; for example
68 a request to change a metric's logging state to advisory on when it is
69 currently mandatory off is never permitted (it is necessary to change
70 the state to mandatory maybe first).
71
72 Optionally, each system running pmcd(1) may also be configured to run a
73 ``primary'' pmlogger instance. This pmlogger instance is launched by
74 $PCP_RC_DIR/pmlogger, and is affected by the files $PCP_SYSCONF_DIR/pm‐
75 logger/control, $PCP_SYSCONF_DIR/pmlogger/control.d/*, (use chkcon‐
76 fig(8), systemctl(1) or similar platform-specific commands to activate
77 or disable the primary pmlogger instance), $PCP_SYSCONFIG_DIR/pmlogger
78 (environment variable settings for the primary pmlogger)
79 $PCP_SYSCONF_DIR/pmlogger/pmlogger.options (command line options passed
80 to the primary pmlogger) and $PCP_VAR_DIR/config/pmlogger/config.de‐
81 fault (the default initial configuration file for the primary pmlog‐
82 ger).
83
84 The primary pmlogger instance is identified by the -P option. There
85 may be at most one ``primary'' pmlogger instance on each system. The
86 primary pmlogger instance (if any) must be running on the same host as
87 the pmcd(1) to which it connects (if any), so the -h and -P options are
88 mutually exclusive.
89
90 Logging of some metrics is possible even in the absence of a local
91 pmcd(1), using the "local context" mode of operation. This is acti‐
92 vated using the -o option, and causes pmlogger to make use of local DSO
93 PMDAs instead of communicating with pmcd(1). When operating using a
94 local context, the -K option may be used to control the DSO PMDAs that
95 should be made accessible. The spec argument conforms to the syntax
96 described in pmSpecLocalPMDA(3). More than one -K option may be used.
97
98 When launched as a non-primary instance, pmlogger will exit immediately
99 if the configuration file causes no metric logging to be scheduled.
100 The -L option overrides this behavior, and causes a non-primary pmlog‐
101 ger instance to ``linger'', presumably pending some future dynamic re-
102 configuration and state change via pmlc(1). pmlogger will also linger
103 without the -L option being used if all the metrics to be logged are
104 logged as once only metrics. When the once only metrics have been
105 logged, a warning message will be generated stating that the event
106 queue is empty and no more events will be scheduled.
107
108 By default all diagnostics and errors from pmlogger are written to the
109 file pmlogger.log in the directory where pmlogger is launched. The -l
110 option may be used to override the default behavior. If the log file
111 cannot be created or is not writable, output is written to standard er‐
112 ror instead. If the logfile for the -l option is "-" (i.e. -l-) then
113 log messages are written to the standard output stream. This can be
114 particularly useful when running pmlogger manually, rather than as a
115 service daemon.
116
117 The -N option directs pmlogger to notify a service manager, typically
118 systemd(1), when it has started and is about to begin writing PCP ar‐
119 chives. This option would only normally be used when pmlogger is run
120 as a daemon service under the control of a service manager. For more
121 details, see __pmServerNotifyServiceManagerReady(3) and systemd(1). On
122 platforms that do not use a service manager that supports notifica‐
123 tions, the -N option is basically a no-op.
124
125 If specified, the -s option instructs pmlogger to terminate after a
126 certain size in records, bytes or time units has been accumulated. If
127 endsize is an integer then endsize records will be written to the ar‐
128 chive. If endsize is an integer suffixed by b or bytes then endsize
129 bytes of the archive data will be written out (note, however, that ar‐
130 chive record boundaries will not be broken and so this limit may be
131 slightly surpassed). Other viable file size units include: K, Kb, KiB,
132 Kbyte, Kilobyte for kilobytes and M, Mb, MiB, Mbyte, Megabyte for
133 megabytes and G, Gb, GiB, Gbyte, Gigabyte for gigabytes. These units
134 may be optionally suffixed by an s and may be of mixed case. Alterna‐
135 tively endsize may be an integer or a floating point number suffixed
136 using a time unit as described in PCPIntro(1) for the interval argument
137 (to the standard PCP -t command line option).
138 Some examples of different formats:
139 -s 100
140 -s 100bytes
141 -s 100K
142 -s 100Mb
143 -s 10Gbyte
144 -s 10mins
145 -s 1.5hours
146 The default is for pmlogger to run forever.
147
148 The -r option causes the size of the physical record(s) for each group
149 of metrics and the expected contribution of the group to the size of
150 the PCP archive for one full day of collection to be reported in the
151 log file. This information is reported the first time each group is
152 successfully written to the archive.
153
154 The -U option specifies the user account under which to run pmlogger.
155 The default is the current user account for interactive use. When run
156 as a daemon, the unprivileged "pcp" account is used in current versions
157 of PCP, but in older versions the superuser account ("root") was used
158 by default.
159
160 The archive is potentially a multi-volume data set, and the -v option
161 causes pmlogger to start a new volume after a certain size in records,
162 bytes, or time units has been accumulated for the current volume. The
163 format of this size specification is identical to that of the -s option
164 (see above). The default is for pmlogger to create a single volume ar‐
165 chive. Additional volume switches can also be forced asynchronously by
166 either using pmlc(1) or sending pmlogger a SIGHUP signal (see below).
167 Note, if a scheduled volume switch is in operation due to the -v op‐
168 tion, then its counters will be reset after an asynchronous switch.
169
170 Independent of any -v option, each volume of an archive is limited to
171 no more than 2^31 bytes, so pmlogger will automatically create a new
172 volume for the archive before this limit is reached.
173
174 Normally pmlogger operates on the distributed Performance Metrics Name
175 Space (PMNS), however if the -n option is specified an alternative lo‐
176 cal PMNS is loaded from the file pmnsfile.
177
178 Under normal circumstances, pmlogger will run forever (except for a -s
179 option or a termination signal). The -T option may be used to limit
180 the execution time using the format of time as prescribed by PCPIn‐
181 tro(1). The time is interpreted within the time zone of the PMCD
182 server, unless the -y option is given, within which case the time zone
183 at this logger host is used.
184 Some examples of different formats:
185 -T 10mins
186 -T '@ 11:30'
187 From this it can be seen that -T 10mins and -s 10mins perform identical
188 actions.
189
190 Alternatively, pmlogger runtime may be limited to the lifetime of an‐
191 other process by using the -p or --PID option to nominate the PID of
192 the process of interest. In this case the pmlogger will exit when the
193 other process no longer exists.
194
195 When pmlogger receives a SIGHUP signal, the current volume of the ar‐
196 chive is closed, and a new volume is opened. This mechanism (or the
197 alternative mechanism via pmlc(1)) may be used to manage the growth of
198 the archive files - once a log volume is closed, that file may be
199 archived without ill-effect on the continued operation of pmlogger.
200 See also the -v option above.
201
202 When pmlogger receives a SIGUSR2 signal, the current archive is closed,
203 and a new archive is opened. For this to succeed, the original archive
204 argument must include strftime(3) meta characters (e.g. %Y%m%d.%H.%M),
205 otherwise pmlogger will exit because the archive files will already ex‐
206 ist and pmlogger will not over-write existing archive files. Note that
207 SIGUSR2 triggers pmlogger to re-exec itself and re-parse all original
208 arguments. This means that any relative time limits placed on it's
209 termination time or sampling limit are reset and begin again. This
210 only affects relative termination times, not absolute times e.g. -T 5s
211 is affected, but -T 5pm is not.
212
213 Historically the buffers for the current archive may be flushed to disk
214 using the flush command of pmlc(1), or by using the -u option. The
215 current version of pmlogger and the libpcp routines that underpin pm‐
216 logger unconditionally use unbuffered writes and a single fwrite(3) for
217 each logical record written, and so ``flushing'' does not force any ad‐
218 ditional data to be written to the file system. The -u option and the
219 pmlc(1) flush command are retained for backwards compatibility.
220
221 When launched with the -x option, pmlogger will accept asynchronous
222 control requests on the file descriptor fd. This option is only ex‐
223 pected to be used internally by PCP applications that support ``live
224 record mode''.
225
226 The -m option allows the string note to be appended to the map file for
227 this instance of pmlogger in the $PCP_TMP_DIR/pmlogger directory. This
228 is currently used internally to document the file descriptor (fd) when
229 the -x option is used, or to indicate that this pmlogger instance was
230 started under the control of pmlogger_check(1), (-m pmlogger_check) or
231 was re-exec'd (see execvp(3)) due to a SIGUSR2 signal being recieved as
232 described above (-m reexec).
233
234 The -H option allows the hostname written into the archive label to be
235 overridden. This mirrors the -H option of pmcd(1) , but allows it to
236 be specified on the pmlogger process. Without this option, the value
237 returned from the logged pmcd(1) is used.
238
239 The -C option will cause the configuration file to be parsed and pmlog‐
240 ger will then exit without creating an output archive, so when -C is
241 specified, the archive command line argument is not required. Any er‐
242 rors in the configuration file are reported.
243
244 The -d or --directory option may be used to specify the directory where
245 the archive should be created. directory may include sh(1) metacharac‐
246 ters, like $(...) or `...` or $var and pmlogger will expand these to
247 produce a final directory path. The resultant path must be absolute,
248 not relative. The -d option is intended primarily for use by pmlog‐
249 ger_check(1) and normal users would not typically need to use the op‐
250 tion, as the directory for archive is either implied by archive if it
251 contains directory components else the current directory by default.
252
254 The configuration file may be specified with the -c option. If it is
255 not, configuration specifications are read from standard input.
256
257 If conffile does not exist, then a search is made in the directory
258 $PCP_VAR_DIR/config/pmlogger for a file of the same name, and if found
259 that file is used, e.g. if config.mumble does not exist in the current
260 directory and the file $PCP_VAR_DIR/config/pmlogger/config.mumble does
261 exist, then -c config.mumble and -c $PCP_VAR_DIR/config/pmlogger/con‐
262 fig.mumble are equivalent.
263
264 The syntax for the configuration file is as follows.
265
266 1. Words are separated by white space (space, tab or newline).
267
268 2. The symbol ``#'' (hash) introduces a comment, and all text up to
269 the next newline is ignored.
270
271 3. Keywords (shown in bold below) must appear literally (i.e. in
272 lower case).
273
274 4. Each specification begins with the optional keyword log, followed
275 by one of the states mandatory on, mandatory off, mandatory maybe,
276 advisory on or advisory off.
277
278 5. For the on states, a logging interval must follow using the syntax
279 ``once'', or ``default'', or ``every N timeunits'', or simply ``N
280 timeunits'' - N is an unsigned integer, and timeunits is one of
281 the keywords msec, millisecond, sec, second, min, minute, hour or
282 the plural form of one of the above.
283 Internal limitations require the interval to be smaller than (ap‐
284 proximately) 74 hours. An interval value of zero is a synonym for
285 once. An interval of default means to use the default logging in‐
286 terval of 60 seconds; this default value may be changed to inter‐
287 val with the -t command line option.
288
289 The interval argument follows the syntax described in PCPIntro(1),
290 and in the simplest form may be an unsigned integer (the implied
291 units in this case are seconds).
292
293 6. Following the state and possible interval specifications comes a
294 ``{'', followed by a list of one or more metric specifications and
295 a closing ``}''. The list is white space (or comma) separated.
296 If there is only one metric specification in the list, the braces
297 are optional.
298
299 7. A metric specification consists of a metric name optionally fol‐
300 lowed by a set of instance names. The metric name follows the
301 standard PCP naming conventions, see PMNS(5), and if the metric
302 name is a non-leaf node in the PMNS (see PMNS(5)), then pmlogger
303 will recursively descend the PMNS and apply the logging specifica‐
304 tion to all descendent metric names that are leaf nodes in the
305 PMNS. The set of instance names is a ``['', followed by a list of
306 one or more space (or comma) separated names, numbers or strings,
307 and a closing ``]''. Elements in the list that are numbers are
308 assumed to be internal instance identifiers, other elements are
309 assumed to be external instance identifiers - see pmGetInDom(3)
310 for more information.
311
312 If no instances are given, then the logging specification is ap‐
313 plied to all instances of the associated metric.
314
315 8. There may be an arbitrary number of logging specifications.
316
317 9. As of PCP version 4.0 and later, any metric name specification
318 that does not resolve to a leaf node in the PMNS is added to an
319 internal list of possible dynamic subtree roots. PMDAs can dynam‐
320 ically create new metrics below a dynamic root node in their PMNS,
321 and send a notification to clients that the PMNS has changed, see
322 pmdaExtSetFlags(3) and in particular the METRIC CHANGES section
323 for API details. This mechanism is currently supported by pm‐
324 daopenmetrics(1) and pmdammv(1). When a fetch issued by pmlogger
325 returns with the PMDA_EXT_NAMES_CHANGE flag set, pmlogger will
326 traverse the internal list of possible dynamic subtree nodes and
327 dynamically discover any new metrics. In effect, as of PCP ver‐
328 sion 4.0 and later, pmlogger can be configured to dynamically log
329 new metrics that appear in the future, after the configuration
330 file is initially parsed.
331
332 10. Following all of the logging specifications, there may be an op‐
333 tional access control section, introduced by the literal token
334 [access]. Thereafter come access control rules that allow or dis‐
335 allow operations from particular hosts or groups of hosts.
336
337 The operations may be used to interrogate or control a running pm‐
338 logger using pmlc(1) and fall into the following classes:
339
340 enquire interrogate the status of pmlogger and the metrics
341 it is logging
342 advisory Change advisory logging.
343 mandatory Change mandatory logging.
344 all All of the above.
345
346 Access control rules are of the form ``allow hostlist : opera‐
347 tionlist ;'' and ``disallow hostlist : operationlist ;''.
348
349 The hostlist follows the syntax and semantics for the access con‐
350 trol mechanisms used by PMCD and are fully documented in pmcd(1).
351 An operationslist is a comma separated list of the operations ad‐
352 visory, mandatory, enquire and all.
353
354 A missing [access] section allows all access and is equivalent to
355 allow * : all;.
356
357 The configuration (either from standard input or conffile) is initially
358 scanned by pmcpp(1) with the options -rs and -I $PCP_VAR_DIR/config/pm‐
359 logger. This extends the configuration file syntax with include file
360 processing (%include), a common location to search for include files
361 ($PCP_VAR_DIR/config/pmlogger), macro definitions (%define), macro ex‐
362 pansion (%name and %{name}) and conditional inclusion of lines (%ifdef
363 name ... %else ... %endif and %ifndef name ... %else ... %endif).
364
366 The available command line options are:
367
368 -c conffile, --config=conffile
369 Specify the conffile file to use.
370
371 -C, --check
372 Parse configuration and exit.
373
374 -h host, --host=host
375 Fetch performance metrics from pmcd(1) on host, rather than from
376 the default localhost.
377
378 -H hostname, --labelhost=hostname
379 Specify the hostname to use instead of the one returned by
380 pmcd(1).
381
382 -I version, --pmlc-ipc-version=version
383 Normally, pmlogger and pmlc(1) will autonegotiate a mutually ac‐
384 ceptable version for their private IPC channel. Use -I to force
385 pmlogger to offer (at most) version as the version to be used.
386 This option may be required if pmlogger needs to be managed by an
387 older version of pmlc(1) that fails to autonegotiate correctly.
388
389 -K spec, --spec-local=spec
390 When fetching metrics from a local context (see -o), the -K option
391 may be used to control the DSO PMDAs that should be made accessi‐
392 ble. The spec argument conforms to the syntax described in pm‐
393 SpecLocalPMDA(3). More than one -K option may be used.
394
395 -l logfile, --log=logfile
396 Write all diagnostics to logfile instead of the default pmlog‐
397 ger.log.
398
399 -L, --linger
400 Run even if not the primary logger instance and nothing to log.
401
402 -m note, --note=note
403 Append note to the port map file for this instance.
404
405 -n pmnsfile, --namespace=pmnsfile
406 Load an alternative Performance Metrics Name Space (PMNS(5)) from
407 the file pmnsfile.
408
409 -N, --notify
410 Notify service manager such as systemd(1) as needed.
411
412 -o, --local-PMDA
413 Use a local context to collect metrics from DSO PMDAs on the local
414 host without PMCD. See also -K.
415
416 -p PID, --PID=PID
417 Log specified metrics for the lifetime of the pid PID.
418
419 -P, --primary
420 Run as primary logger instance. See above for more detailed de‐
421 scription of this.
422
423 -r, --report
424 Report record sizes and archive growth rate.
425
426 -s endsize, --size=endsize
427 Terminate after archive size exceeds endsize.
428
429 -t interval, --interval=interval
430 Specify the logging interval. The default value is 60 seconds.
431 Please refer to the ENVIRONMENT and FILES sections below regarding
432 the PMLOGGER_INTERVAL environment variable and its impact on the
433 default logging interval.
434
435 -T endtime, --finish=endtime
436 Specify the endtime when to end logging.
437
438 -u Use unbuffered output. This is the default (so this option does
439 nothing).
440
441 -U username, --username=username
442 When in daemon mode, run as user username.
443
444 -v volsize, --volsize=volsize
445 Switch volumes after reaching archive volume size volsize.
446
447 -V version, --version=version
448 Specify archive version. The default and the only accepted value
449 is 2.
450
451 -x fd
452 Allow asynchronous control requests on the file descriptor fd.
453
454 -y Use local timezone instead of the timezone from the pmcd(1) host.
455
456 -?, --help
457 Display usage message and exit.
458
460 For each PCP utility, there is a sample pmlogger configuration file
461 that could be used to create an archive suitable for replaying with
462 that tool (i.e. includes all of the performance metrics used by the
463 tool). For a tool named foo this configuration file is located in
464 $PCP_VAR_DIR/config/pmlogger/config.foo.
465
466 The following is a simple default configuration file for a primary pm‐
467 logger instance, and demonstrates most of the capabilities of the con‐
468 figuration specification language.
469
470 log mandatory on once { hinv.ncpu hinv.ndisk }
471 log mandatory on every 10 minutes {
472 disk.all.write
473 disk.all.read
474 network.interface.in.packets [ "et0" ]
475 network.interface.out.packets [ "et0" ]
476 nfs.server.reqs [ "lookup" "getattr" "read" "write" ]
477 }
478
479 log advisory on every 30 minutes {
480 environ.temp
481 pmcd.pdu_in.total
482 pmcd.pdu_out.total
483 }
484
485 %include "macros.default"
486
487 %ifdef %disk_detail
488 log mandatory on %disk_detail_freq {
489 disk.dev
490 }
491 %endif
492
493 [access]
494 disallow * : all except enquire;
495 allow localhost : mandatory, advisory;
496
498 The hostname of the PMCD that is providing metrics to pmlogger is used
499 in several ways.
500
501 PMCD's hostname (or the argument from the -H option) is included in the
502 archive label and may be used to ensure that subsequent operations on
503 multiple archives, e.g. pmlogextract(1), are only applied to archives
504 from the same host.
505
506 For pmlogger instances using a local PMCD that are launched and managed
507 by pmlogger_check(1) and pmlogger_daily(1), (or the systemd(1) or
508 cron(8) services that use these scripts), the local hostname may also
509 be used to construct the name of a directory where all the archives for
510 the one host are stored, e.g. $PCP_ARCHIVE_DIR/<hostname>.
511
512 And PMCD's hostname is also stored in the archive via the pmcd.pmlog‐
513 ger.hostname metric that is used as part of the checks to ensure that
514 there is continuity of performance data after the nightly archive rota‐
515 tion by pmlogger_daily(1).
516
517 The hostname of the PMCD host may change during boot time when the sys‐
518 tem transitions from a temporary hostname to a persistent hostname, or
519 by explicit administrative action anytime after the system has been
520 booted. When this happens, pmlogger may need to take special action,
521 specifically if the pmlogger instance was launched from pmlog‐
522 ger_check(1) or pmlogger_daily(1), then pmlogger must exit. Under nor‐
523 mal circumstances systemd(1) or cron(8) will launch a new pmlogger
524 shortly thereafter, and this new pmlogger instance will be operating in
525 the context of the new hostname for the host where PMCD is running.
526
528 The archives are sufficiently precious that pmlogger will not truncate
529 an existing physical file. A message of the form
530 ...: "foo.index" already exists, not over-written
531 ...: File exists
532 indicates this situation has arisen. You must explicitly remove the
533 files and launch pmlogger again.
534
535 There may be at most one primary pmlogger instance per monitored host;
536 attempting to bend this rule produces the error:
537 pmlogger: there is already a primary pmlogger running
538
539 Various other messages relating to the creation and/or deletion of
540 files in $PCP_TMP_DIR/pmlogger suggest a permission problem on this di‐
541 rectory, or some feral files have appeared therein.
542
544 archive.meta
545 metadata (metric descriptions, instance domains, etc.) for the ar‐
546 chive
547
548 archive.0
549 initial volume of metrics values (subsequent volumes have suffixes
550 1, 2, ...)
551
552 archive.index
553 temporal index to support rapid random access to the other files
554 in the archive
555
556 $PCP_TMP_DIR/pmlogger
557 pmlogger maintains the files in this directory as the map between
558 the process id of the pmlogger instance and the IPC port that may
559 be used to control each pmlogger instance (as used by pmlc(1))
560
561 $PCP_VAR_DIR/config/pmlogger/config.default
562 default configuration file for the primary logger instance
563 launched from $PCP_RC_DIR/pmlogger
564
565 $PCP_VAR_DIR/config/pmlogger/config.*
566 assorted configuration files suitable for creating logs that may
567 be subsequently replayed with the PCP visualization and monitoring
568 tools
569
570 $PCP_ARCHIVE_DIR/<hostname>
571 Default directory for PCP archive files for performance metric
572 values collected from the host <hostname>.
573
574 $PCP_SYSCONFIG_DIR/pmlogger
575 additional environment variables that will be set when the primary
576 pmlogger instance executes. Only settings of the form "PMLOG‐
577 GER_VARIABLE=value" will be honoured.
578
579 ./pmlogger.log
580 (or $PCP_ARCHIVE_DIR/<hostname>/pmlogger.log when started automat‐
581 ically by either $PCP_RC_DIR/pmlogger or one of the pmlogger(1)
582 monitoring scripts such as pmlogger_check(1))
583 all messages and diagnostics are directed here
584
586 Normally pmlogger creates a socket to receive control messages from
587 pmlc(1) on the first available TCP/IP port numbered 4330 or higher.
588 The environment variable PMLOGGER_PORT may be used to specify an alter‐
589 native starting port number.
590
591 If set to the value 1, the PMLOGGER_LOCAL environment variable will
592 cause pmlogger to run in a localhost-only mode of operation, where it
593 binds only to the loopback interface.
594
595 The PMLOGGER_REQUEST_TIMEOUT variable may be set by applications such
596 as pmlc(1) to specify a timeout in seconds for connection requests to
597 the pmlogger control port. If not set, connections may block indefi‐
598 nitely. This variable would not normally be set by pmlogger itself.
599
600 The PMLOGGER_MAXPENDING variable can be set to indicate the maximum
601 length to which the queue of pending pmlc connections may grow.
602
603 The default sampling interval used by pmlogger can be set using the PM‐
604 LOGGER_INTERVAL variable (if not set, 60 seconds will be used). Both
605 the command line and directives in the configuration file will override
606 this value. It is an integer in units of seconds.
607
608 On platforms using systemd(1), and when the -N option is given, the NO‐
609 TIFY_SOCKET environment variable would normally be set by the service
610 manager prior to launching pmlogger.
611
613 Environment variables with the prefix PCP_ are used to parameterize the
614 file and directory names used by PCP. On each installation, the file
615 /etc/pcp.conf contains the local values for these variables. The
616 $PCP_CONF variable may be used to specify an alternative configuration
617 file, as described in pcp.conf(5).
618
620 PCPIntro(1), pmcd(1), pmdumplog(1), pmlc(1), pmlogger_check(1), pmlog‐
621 ger_daily(1), systemctl(1), systemd(1), execvp(3), PMAPI(3), __pm‐
622 ServerNotifyServiceManagerReady(3), pmSpecLocalPMDA(3), strftime(3),
623 pcp.conf(5), pcp.env(5), pmlogger(5), PMNS(5), chkconfig(8) and
624 cron(8).
625
626
627
628Performance Co-Pilot PCP PMLOGGER(1)