1PMLOGGER.CONTROL(5)           File Formats Manual          PMLOGGER.CONTROL(5)
2
3
4

NAME

6       pmlogger.control  - control files for Performance Co-Pilot archive log‐
7       ging
8

DESCRIPTION

10       Historical archive logging of performance data for Performance Co-Pilot
11       (see  PCPIntro(1)) uses pmlogger(1) and one or more instances of pmlog‐
12       ger may be managed by pmlogger_check(1) and pmlogger_daily(1).
13
14       pmlogger_check(1) may be run at any time of the day and is intended  to
15       check  that the desired set of pmlogger processes are running.  If not,
16       it (re-)starts  any  missing  logger  processes.   By  default,  pmlog‐
17       ger_check(1)  also  calls pmlogger_daily(1) with a -K option to execute
18       any required archive compression tasks.
19
20       pmlogger_daily(1) is intended to be run once per day, preferably in the
21       early  morning,  as soon after midnight as practicable.  Its task is to
22       aggregate, rotate and perform general housekeeping for one or more sets
23       of PCP archives.
24
25       Both  pmlogger_check(1)  and  pmlogger_daily(1)  operate on a family of
26       shared control files, namely  the  $PCP_PMLOGGERCONTROL_PATH  file  and
27       files  within  the  $PCP_PMLOGGERCONTROL_PATH.d directory.  These files
28       must not be writable by any user other than root.
29
30       The control file(s) should be customized  according  to  the  following
31       rules  that  define  for  the current version (1.1) of the control file
32       format.
33
34       1.  Lines beginning with a ``#'' are comments.  A special case is lines
35           beginning  ``#!#''; these are control lines for a pmlogger that has
36           been stopped using pmlogctl(1).
37       2.  Lines beginning with a ``$'' are assumed to be assignments to envi‐
38           ronment variables in the style of sh(1), and all text following the
39           ``$'' will be eval'ed by the script reading the control  file,  and
40           the  corresponding variable exported into the environment.  This is
41           particularly useful to set and export variables into  the  environ‐
42           ment of the administrative scripts, e.g.
43               $ PMCD_CONNECT_TIMEOUT=20
44           If  the  value  to the right of the ``='' contains any white space,
45           then the value should be enclosed  in  double  (")  or  single  (')
46           quotes.
47       3.  There must be a version line in the control file of the form:
48               $version=1.1
49       4.  Fields  within  a line of the control file(s) are usually separated
50           by one or more spaces or tabs (although refer to the description of
51           the directory field below for some important exceptions).
52       5.  There  should  be one line in the control file(s) for each pmlogger
53           instance with at least 4 fields of the form:
54               host primary socks directory args ...
55       6.  The host field is the name of the host that is the  source  of  the
56           performance  metrics for this pmlogger instance.  The reserved word
57           LOCALHOSTNAME will be replaced by the name of the local host.
58       7.  The primary field indicates if this is a primary pmlogger  instance
59           (y)  or  not  (n).   Since the primary logger must run on the local
60           host, and there may be at most one primary logger for a  particular
61           host,  this  field  can  be y for at most one pmlogger instance, in
62           which case the host name must be the name of the local host (or LO‐
63           CALHOSTNAME).
64       8.  The  socks  field  indicates  if this pmlogger instance needs to be
65           started under the control of pmsocks(1) to  connect  to  a  pmcd(1)
66           through a firewall (y or n).
67       9.  The directory field is a directory name.  All archive files associ‐
68           ated with this pmlogger instance will be created in this directory,
69           and  this  will  be  the current directory for the execution of any
70           programs required to maintain those archives.  A useful  convention
71           is  that  primary  logger archives for the local host with hostname
72           myhost are  maintained  in  the  directory  $PCP_ARCHIVE_DIR/myhost
73           (this   is   where   the   default   pmlogger  start-up  script  in
74           $PCP_RC_DIR/pcp will create the archives), while archives  for  the
75           remote host mumble are maintained in $PCP_ARCHIVE_DIR/mumble.
76       10. The  directory field may contain embedded shell syntax that will be
77           evaluated by sh(1) to produce the real directory name to  be  used.
78           The allowed constructs are:
79           • Any  text  (including white space) enclosed with $( and ) will be
80             interpreted as a shell command.
81           • Any text (including white space) enclosed  with  `  and  `  (back
82             quotes) will be interpreted as a shell command.
83           • An initial double quote (") followed by arbitrary text (including
84             white space, but excluding an embedded double quote) and a  final
85             double quote.
86           • An initial single quote (') followed by arbitrary text (including
87             white space, but excluding an embedded single quote) and a  final
88             single quote.
89           • Any  word  containing  a  $  (assumed to introduce an environment
90             variable name).
91       11. In the directory field, the reserved word LOCALHOSTNAME will be re‐
92           placed by the name of the local host.
93       12. The optional args field and any remaining fields are interpreted as
94           arguments to be passed to pmlogger(1).  Most typically  this  would
95           be  at  least the -c option to specify the metrics to be logged and
96           the logging frequencies.
97
98       The following sample control lines specify a primary logger on the  lo‐
99       cal host (bozo), and non-primary loggers to collect and log performance
100       metrics from the hosts wobbly, boing and the local host (i.e. bozo).
101
102       $version=1.1
103       bozo          y  n  $PCP_ARCHIVE_DIR/bozo   -c config.default
104       wobbly        n  n  "/store/wobbly/$(date +%Y)"  -c ./wobbly.config
105       boing         n  n  $PCP_ARCHIVE_DIR/boing   -c ./pmlogger.config
106       LOCALHOSTNAME n  n /cluster/LOCALHOSTNAME   -c ./precious.config
107

SCHEDULED EXECUTION

109       The periodic execution of pmlogger_check(1)  and  pmlogger_daily(1)  is
110       controlled by either systemd(1) or cron(8).
111
112       Typical  crontab(5)  entries  are  provided  in $PCP_SYSCONF_DIR/pmlog‐
113       ger/crontab (unless installed by default in  /etc/cron.d  already)  and
114       shown below.
115
116       # daily processing of archive logs
117       14      0       *       *       *       $PCP_BINADM_DIR/pmlogger_daily
118       # every 30 minutes, check pmlogger instances are running
119       25,55   *       *       *       *       $PCP_BINADM_DIR/pmlogger_check
120
121       When  using  systemd(1)  on Linux, no crontab entries are needed as the
122       timer mechanism provided by systemd is used instead to achieve the same
123       period execution as the crontab example above.
124

FILES

126       $PCP_PMLOGGERCONTROL_PATH
127            the  PCP  logger  control  file.  For a new installation this file
128            contains no pmlogger(1) control lines (the real control files  are
129            all  in  the $PCP_PMLOGGERCONTROL_PATH.d directory), but this file
130            is still processed to support any  legacy  configurations  therein
131            from earlier PCP releases.
132            Warning:  this  file  must  not be writable by any user other than
133            root.
134
135       $PCP_PMLOGGERCONTROL_PATH.d
136            optional directory containing additional PCP logger control files,
137            with one or more per pmlogger specification per file.
138            Warning:  the  files herein must not be writable by any user other
139            than root.
140
141       $PCP_SYSCONF_DIR/pmlogger/crontab
142            sample crontab for automated script  execution  by  $PCP_USER  (or
143            root).    Exists  only  if  the  platform  does  not  support  the
144            /etc/cron.d mechanism.
145

PCP ENVIRONMENT

147       Environment variables with the prefix PCP_ are used to parameterize the
148       file  and  directory names used by PCP.  On each installation, the file
149       /etc/pcp.conf contains the  local  values  for  these  variables.   The
150       $PCP_CONF  variable may be used to specify an alternative configuration
151       file, as described in pcp.conf(5).
152

SEE ALSO

154       PCPIntro(1), pmcd(1), pmlogctl(1), pmlogger(1), pmlogger_check(1),  pm‐
155       logger_daily(1),  pmlogger_daily_report(1),  pmsocks(1), systemd(1) and
156       cron(8).
157
158
159
160Performance Co-Pilot                  PCP                  PMLOGGER.CONTROL(5)
Impressum