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

NAME

6       pmlc - configure active Performance Co-Pilot pmlogger(s) interactively
7

SYNOPSIS

9       pmlc  [-e]  [-h  host]  [-i] [-n pmnsfile] [-P] [-p port] [-Z timezone]
10       [-z] [pid]
11

DESCRIPTION

13       pmlc may be used to change those metrics and instances which  a  pmlog‐
14       ger(1)  writes to a Performance Co-Pilot archive (see PCPIntro(1)), the
15       frequency with which the metrics are collected and whether the  logging
16       is mandatory, advisory, on or off.  It also reports the current logging
17       status of metrics and instances.  pmlc may be used to control  pmlogger
18       instances on remote hosts as well as those on the local host.
19
20       Normally  pmlc  operates  on  the  distributed Performance Metrics Name
21       Space (PMNS), however if the -n  option  is  specified  an  alternative
22       local PMNS is loaded from the file pmnsfile.
23
24       If  the  -P option is specified, pmlc will attempt to start with a con‐
25       nection to the primary pmlogger on the local host.  If the -p option is
26       specified,  then  pmlc  will  attempt to start with a connection to the
27       pmlogger on this TCP/IP port.  Alternatively, if pid  is  specified,  a
28       connection  to  the  pmlogger  instance  with  that  process id will be
29       attempted on startup.  The -h option may only be used if -P, -p port or
30       a  pid  is also specified.  In that case pmlc will initially connect to
31       the specified (remote) pmlogger instance on host rather than the  local
32       host.   If  the connection to the specified pmlogger instance cannot be
33       established, pmlc will start with no connection.  These  options  typi‐
34       cally  allow  the same file of pmlc commands to be directed to multiple
35       pmlogger instances by varying the command line  arguments.   Note  that
36       -P, -p port, pid and -h are used only when making an initial connection
37       to a pmlogger instance.  They are not used as  defaults  if  subsequent
38       connections are made interactively (see the connect command below).
39
40       By  default,  pmlc reports the time of day according to the local time‐
41       zone on the system where pmlc is run.  The -Z option changes the  time‐
42       zone  to  timezone  in  the  format  of  the environment variable TZ as
43       described in environ(7).  The -z option changes  the  timezone  to  the
44       timezone  of  the  pmlogger  instance  from  which information is being
45       obtained.  Only one of -z or -Z may be specified.
46
47       If standard input is from a tty, pmlc  is  interactive,  with  prompts.
48       The -i flag may be used to force interactive behavior, and is typically
49       used in conjunction with -e to echo all command input on standard  out‐
50       put.
51
52       The following commands may be used:
53
54       show [ loggers ] [ @host ]
55           Displays  the  process identities of all pmlogger instances running
56           on the local host (or host, if specified).   The  primary  pmlogger
57           pid  is parenthesized because it can be referred to as "primary" as
58           well as by its pid.
59
60       connect pid [ @host ]
61       connect primary [ @host ]
62           Connects pmlc to the specified pmlogger process.  Any existing con‐
63           nection  to  a  pmlogger  instance  is closed first.  Each pmlogger
64           instance will accept at most one connection at a time,  so  if  the
65           connection  is successfully established, your pmlc will be the only
66           one controlling the pmlogger instance it is connected to.
67
68       new volume
69           This command works only while a connection to a  pmlogger  instance
70           is  established.  It tells the pmlogger to close the current volume
71           of the log and open a new volume.  Closed volumes may be  archived,
72           e.g.  as  part of a regular log management procedure to control the
73           size of the physical log files.
74
75       status
76           This command works only while a connection to a  pmlogger  instance
77           is  established.   It  prints  information  about  the state of the
78           pmlogger instance and its associated log.
79
80       timezone local | logger | "timezone"
81           This command sets the time zone used when times are printed.  local
82           means  use  the  time  zone of the machine that pmlc is running on.
83           logger means use the time zone of the machine  where  the  pmlogger
84           instance  is  running.  Alternatively an explicit timezone enclosed
85           in quotes may be supplied (refer to TZ in environ(7) for  details).
86           The  default  time zone is local unless one of the -z or -Z options
87           has been supplied on the command line.
88
89       flush
90           This command works only while a connection to a  pmlogger  instance
91           is established, and requests the pmlogger instance to flush to disk
92           all buffers associated with the current archive.   For  old-timers,
93           sync  is  a  synonym for flush.  In current versions of pmlogger(1)
94           all writes are unbuffered and aligned with the logical  records  in
95           the  external  files,  so  this  command  achieves  nothing, but is
96           retained for backwards compatibility.
97
98       help
99           Displays a summary of the available commands.
100           h and ? are synonyms for help.
101
102       quit
103           Exits from pmlc.
104
105       The remaining commands query and change the logging  state  of  metrics
106       and  instances.   They  will  work  only  if pmlc has a connection to a
107       pmlogger instance.  Metrics may be specified as fully  qualified  names
108       (e.g. hinv.ncpu) or subtrees of the PMNS (e.g. hinv) which are expanded
109       to include all metrics in the subtree (e.g.  hinv.ncpu,  hinv.cpuclock,
110       etc.).   Lists  of metrics may be specified by enclosing them in braces
111       with spaces or a comma between metrics (e.g.  {hinv.ncpu  hinv.ndisk}).
112       Subtrees of metrics may be included in such lists.
113
114       Each  individual  metric  specification may be further qualified with a
115       space or comma separated list of instances  in  square  brackets  (e.g.
116       kernel.all.load["1  minute",  "5 minute"]).  External instance names or
117       numeric internal instance identifiers or both may be used in  the  same
118       list (e.g. sample.colour.[red,1,"blue"]).  If an instance qualification
119       is applied to a subtree of the PMNS all of the metrics in  the  subtree
120       must have the same instance domain.  Instance qualifications may not be
121       applied to entire lists of metrics but may appear inside such lists.
122
123       If no instances are specified for a metric,  all  instances  are  used.
124       All  instances  means  all instances available at the time the pmlogger
125       instance in question fetches the metrics for logging.  If  an  instance
126       domain  changes  over  time  this  is not always the same as the set of
127       instances displayed by pmlc,  which  can  only  display  the  currently
128       available   instances.   To  prevent  unintentional  errors,  only  the
129       instances that are currently available to pmlc may appear  in  instance
130       specifications.
131
132       query metriclist
133           The  current  logging  state  of  each metric (and instances, where
134           applicable) in metriclist is displayed.  This includes the  logging
135           state  (e.g. on, maybe, off) and the logging interval for each met‐
136           ric (and instance) requested.  The following abbreviations pertain‐
137           ing to metrics (and instances) may appear in the output: adv, advi‐
138           sory; mand, mandatory; nl, not in the log; na, in the log  but  not
139           currently  available  from  its  Performance  Metrics  Domain Agent
140           (PMDA).  Where appropriate, an instance name will appear last on  a
141           line preceded by its numeric internal instance identifier.
142
143       [ log ] mandatory on interval metriclist
144           This  form of the log command turns on logging for the metrics (and
145           any instances) in metriclist.  interval  specifies  how  often  the
146           specified  metrics/instances should be logged.  once indicates that
147           the metrics/instances should appear at most once in the log.   More
148           often  one would use the optional keyword every followed by a posi‐
149           tive number and one of millisecond  (or  msec),  second  (or  sec),
150           minute (or min), hour or their plurals.
151           Note  that  the  keyword  default which may be used for the default
152           interval in a pmlogger(1) configuration  file  cannot  be  used  in
153           pmlc.
154           Internal limitations require the interval to be less than (approxi‐
155           mately) 74 hours.  An interval value of zero is a synonym for once.
156
157       [ log ] mandatory off metriclist
158           This tells the pmlogger  instance  not  to  log  any  of  the  met‐
159           rics/instances in metriclist.
160
161       [ log ] mandatory maybe metriclist
162           This  tells  the pmlogger instance to honor any subsequent advisory
163           logging requests for the metrics/instances in metriclist.   If  the
164           current logging state of the metrics/instances is mandatory (either
165           on or off) the new state will be set to maybe (effectively advisory
166           off).   If  the  current  state of the metrics/instances is already
167           advisory (either on or off) the state(s) for the  metrics/instances
168           will remain as they are.
169
170       [ log ] advisory on interval metriclist
171       [ log ] advisory off metriclist
172           Advisory logging is only applicable if the last logging state spec‐
173           ified for a metric/instance was "mandatory  maybe"  (which  permits
174           subsequent  advisory  logging  control)  or if the logging state is
175           already advisory.  These two statements turn advisory logging on or
176           off (respectively) for the specified metrics/instances.
177           The interpretation for interval is as above for the mandatory case.
178
179       There  is  no  continuation  character  required for commands that span
180       lines.
181
182       The word at may be used interchangeably with @.
183
184       A request to log all instances of a metric  will  supersede  any  prior
185       request  to  log  either  all or specific instances of a metric (if the
186       request specifies a permissible transition in the  logging  state).   A
187       request  to  log specific instances of a metric when all instances of a
188       metric are already being logged is refused by pmlogger.
189

ACCESS CONTROL

191       pmlc may have restricted access to and control  over  pmlogger(1)  pro‐
192       cesses.
193
194       If  a  pmlogger(1)  is  unable to export its control information to the
195       local pmcd(1), then that pmlogger(1) cannot cannot be connected to  nor
196       controlled  by  pmlc.   In practice, this means the pmlogger(1) process
197       has to be owned by the user  ``pcp''  and/or  the  group  ``pcp''.   If
198       pmlogger(1)  is running on the host ``foo'' then use ``pminfo -f -h foo
199       pmcd.pmlogger'' to verify that the pmlogger(1) of interest is known  to
200       pmcd(1), alternatively pmlogger(1) instances that are not reported from
201       the pmlc show loggers @foo command are not known to pmcd(1) on the host
202       ``foo''.
203
204       If  pmlogger(1)  is launched with a configuration file that contains an
205       [access] section, then pmlc will be unable to connect  to  that  pmlog‐
206       ger(1) unless the access controls allow some access from the host where
207       pmlc is being run.  Minimally this requires the enquire  access  to  be
208       permitted in the pmlogger(1) access control section.
209
210       If  pmlc  is  able  to connect to the pmlogger(1) of interest, then the
211       following table summarizes the permissions needed to perform  different
212       pmlc commands:
213
214             ┌──────────────────┬───────────────────────────────────────┐
215pmlc command    │       Required pmlogger access        │
216             ├──────────────────┼───────────────────────────────────────┤
217show loggers      │ Any                                   │
218connect           │ Any of enquire, advisory or mandatory 
219status            │ Any of enquire, advisory or mandatory 
220query ...         │ Any of enquire, advisory or mandatory 
221log advisory ...  │ advisory                              
222log mandatory ... │ mandatory                             
223new volume        mandatory                             
224             └──────────────────┴───────────────────────────────────────┘

PCP ENVIRONMENT

226       Environment variables with the prefix PCP_ are used to parameterize the
227       file and directory names used by PCP.  On each installation,  the  file
228       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
229       $PCP_CONF variable may be used to specify an alternative  configuration
230       file, as described in pcp.conf(5).
231

SEE ALSO

233       PCPIntro(1),    pmcd(1),    pmdumplog(1),   pmlogger(1),   pcp.conf(5),
234       pcp.env(5) and environ(7).
235

DIAGNOSTICS

237       Most error or warning messages are self-explanatory.  A message of  the
238       form
239               Warning: unable to change logging state for...
240       followed  by  a list of metrics (and possibly instances) indicates that
241       pmlogger refused the request  for  the  metrics  (and  instances)  that
242       appear.   Any  metrics  (and  instances) that were specified but do not
243       appear in the message have had their logging state updated successfully
244       (no  news  is good news).  Usually this warning results from requesting
245       advisory logging when a mandatory  control  is  already  in  place,  or
246       requesting  logging  for  specific  instances  when  all  instances are
247       already being logged.
248

CAVEAT

250       If all instances of a metric are being logged and a request is made  to
251       log specific instances of the metric with the same state and frequency,
252       the request may appear to succeed, even though pmlogger has refused the
253       request.   This  is not normally a problem, as the required information
254       will still be placed into the log by pmlogger.
255
256       However in the case where the metric is to be logged once, the  outcome
257       is not what might be expected.  When pmlogger receives a request to log
258       a metric once, it places the current value(s) of the  metric  into  the
259       log  as  soon as it can, regardless of whether the metric is already in
260       the log.  This may be used to  force  values  into  the  log.   When  a
261       request  to  log  specific instances of a metric arrives and is refused
262       because all instances of the metric are already being logged,  pmlogger
263       does  not  place  values  for the instances requested into the log.  It
264       returns the current logging state for each instance requested to  pmlc.
265       The  requested and returned states are identical, so pmlc doesn't raise
266       an error as it should.
267
268       To ensure that only certain instances of a metric are being logged, one
269       should always turn off logging for all instances of the metric prior to
270       turning on logging for the specific instances required.
271
272
273
274Performance Co-Pilot                  PCP                              PMLC(1)
Impressum